summaryrefslogtreecommitdiffstats
path: root/client/application.h
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2010-03-31 17:45:12 +0300
committerAlexander Larsson <alexl@redhat.com>2010-04-06 14:56:46 +0200
commit88aa56045a57e760beb35e659731741dc15f3aac (patch)
tree2444ebdcbd6aa35081b965ba699745c0c3b4bf42 /client/application.h
parent91bc0e8625d8878d93648dbb452c37fcf85305f5 (diff)
downloadspice-88aa56045a57e760beb35e659731741dc15f3aac.tar.gz
spice-88aa56045a57e760beb35e659731741dc15f3aac.tar.xz
spice-88aa56045a57e760beb35e659731741dc15f3aac.zip
client: handling SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST
disconnecting from the current host and connecting to the target host.
Diffstat (limited to 'client/application.h')
-rw-r--r--client/application.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/client/application.h b/client/application.h
index adf25175..e5f4e1f2 100644
--- a/client/application.h
+++ b/client/application.h
@@ -86,6 +86,18 @@ private:
std::vector<MonitorInfo> _monitors;
};
+class SwitchHostEvent: public Event {
+public:
+ SwitchHostEvent(const char* host, int port, int sport, const char* cert_subject);
+ virtual void response(AbstractProcessLoop& events_loop);
+
+private:
+ std::string _host;
+ int _port;
+ int _sport;
+ std::string _cert_subject;
+};
+
enum CanvasOption {
CANVAS_OPTION_INVALID,
CANVAS_OPTION_CAIRO,
@@ -186,6 +198,8 @@ public:
void show();
void external_show();
void connect();
+ void switch_host(const std::string& host, int port, int sport, const std::string& cert_subject);
+
const PeerConnectionOptMap& get_con_opt_map() {return _peer_con_opt;}
const RedPeer::HostAuthOptions& get_host_auth_opt() { return _host_auth_opt;}
const std::string& get_connection_ciphers() { return _con_ciphers;}
@@ -317,6 +331,7 @@ private:
#ifdef GUI_DEMO
AutoRef<TestTimer> _gui_test_timer;
#endif
+ bool _during_host_switch;
State _state;
};