summaryrefslogtreecommitdiffstats
path: root/server/spice-migration.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2014-10-24 16:59:30 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2014-11-27 14:27:18 +0100
commit6f798ba1f75360e6c66260b0ac2de76efa0a7d1d (patch)
tree7cea10af758345cf11475b018b0b36d5488f36b3 /server/spice-migration.h
parentd26604ce65ff51e2820a27e16b62a2eb17ab994d (diff)
downloadspice-6f798ba1f75360e6c66260b0ac2de76efa0a7d1d.tar.gz
spice-6f798ba1f75360e6c66260b0ac2de76efa0a7d1d.tar.xz
spice-6f798ba1f75360e6c66260b0ac2de76efa0a7d1d.zip
Split spice.h
Make it easier to read the Spice server API.
Diffstat (limited to 'server/spice-migration.h')
-rw-r--r--server/spice-migration.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/server/spice-migration.h b/server/spice-migration.h
new file mode 100644
index 00000000..e2fc92eb
--- /dev/null
+++ b/server/spice-migration.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2009-2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SPICE_MIGRATION_H_
+#define SPICE_MIGRATION_H_
+
+#if !defined(SPICE_H_INSIDE) && !defined(SPICE_SERVER_INTERNAL)
+#error "Only spice.h can be included directly."
+#endif
+
+#include "spice-core.h"
+
+/* migration interface */
+#define SPICE_INTERFACE_MIGRATION "migration"
+#define SPICE_INTERFACE_MIGRATION_MAJOR 1
+#define SPICE_INTERFACE_MIGRATION_MINOR 1
+typedef struct SpiceMigrateInterface SpiceMigrateInterface;
+typedef struct SpiceMigrateInstance SpiceMigrateInstance;
+typedef struct SpiceMigrateState SpiceMigrateState;
+
+struct SpiceMigrateInterface {
+ SpiceBaseInterface base;
+ void (*migrate_connect_complete)(SpiceMigrateInstance *sin);
+ void (*migrate_end_complete)(SpiceMigrateInstance *sin);
+};
+
+struct SpiceMigrateInstance {
+ SpiceBaseInstance base;
+ SpiceMigrateState *st;
+};
+
+/* spice switch-host client migration */
+int spice_server_migrate_info(SpiceServer *s, const char* dest,
+ int port, int secure_port,
+ const char* cert_subject);
+int spice_server_migrate_switch(SpiceServer *s);
+
+/* server status */
+int spice_server_get_num_clients(SpiceServer *s);
+
+/* spice (semi-)seamless client migration */
+int spice_server_migrate_connect(SpiceServer *s, const char* dest,
+ int port, int secure_port,
+ const char* cert_subject);
+int spice_server_migrate_start(SpiceServer *s);
+int spice_server_migrate_end(SpiceServer *s, int completed);
+
+void spice_server_set_seamless_migration(SpiceServer *s, int enable);
+
+#endif /* SPICE_MIGRATION_H_ */