summaryrefslogtreecommitdiffstats
path: root/client/application.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/application.h')
-rw-r--r--client/application.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/client/application.h b/client/application.h
index e924ce14..213308f3 100644
--- a/client/application.h
+++ b/client/application.h
@@ -72,6 +72,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;
+};
+
struct KeyInfo {
uint32_t _make;
uint32_t _break;
@@ -109,6 +121,11 @@ typedef struct StickyInfo {
AutoRef<StickyKeyTimer> timer;
} StickyInfo;
+class SwitchHostTimer: public Timer {
+public:
+ virtual void response(AbstractProcessLoop& events_loop);
+};
+
class Application : public ProcessLoop,
public Platform::EventListener,
public Platform::DisplayModeListner,
@@ -154,6 +171,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;}
@@ -225,6 +244,7 @@ private:
friend class MonitorsQuery;
friend class AutoAbort;
friend class StickyKeyTimer;
+ friend class SwitchHostTimer;
private:
RedClient _client;
@@ -252,6 +272,8 @@ private:
StickyInfo _sticky_info;
std::vector<int> _canvas_types;
AutoRef<Menu> _app_menu;
+ bool _during_host_switch;
+ AutoRef<SwitchHostTimer> _switch_host_timer;
};
#endif