summaryrefslogtreecommitdiffstats
path: root/migration.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-12-13 17:30:12 +0100
committerGerd Hoffmann <kraxel@redhat.com>2011-01-24 15:13:54 +0100
commit99a0db9b8dd72ea20a2d4cd99fe91b08903ae857 (patch)
treeb537aab449052a24a630f90ad3405c0d573644db /migration.h
parent0bfe006c5380c5f8a485a55ded3329fbbc224396 (diff)
downloadhqemu-99a0db9b8dd72ea20a2d4cd99fe91b08903ae857.zip
hqemu-99a0db9b8dd72ea20a2d4cd99fe91b08903ae857.tar.gz
add migration state change notifiers
This patch adds functions to register and unregister notifiers for migration state changes and a function to query the migration state. The notifier is called on every state change. Once after establishing a new migration object (which is in active state then) and once when the state changes from active to completed, canceled or error. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'migration.h')
-rw-r--r--migration.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/migration.h b/migration.h
index d13ed4f..2170792 100644
--- a/migration.h
+++ b/migration.h
@@ -16,6 +16,7 @@
#include "qdict.h"
#include "qemu-common.h"
+#include "notify.h"
#define MIG_STATE_ERROR -1
#define MIG_STATE_COMPLETED 0
@@ -134,4 +135,8 @@ static inline FdMigrationState *migrate_to_fms(MigrationState *mig_state)
return container_of(mig_state, FdMigrationState, mig_state);
}
+void add_migration_state_change_notifier(Notifier *notify);
+void remove_migration_state_change_notifier(Notifier *notify);
+int get_migration_state(void);
+
#endif
OpenPOWER on IntegriCloud