diff options
author | Alon Levy <alevy@redhat.com> | 2012-02-26 12:45:28 +0100 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-02-28 14:41:33 +0200 |
commit | 7f1ed9283fd69b237938db9fd8de73f1ce9b84ce (patch) | |
tree | 68fa17510a74a2e7b501a2b00c61432e27f054f2 | |
parent | 8b0dcb5e0cf5a5acfbbb0ee4bb815a0bf710d41b (diff) | |
download | spice-7f1ed9283fd69b237938db9fd8de73f1ce9b84ce.tar.gz spice-7f1ed9283fd69b237938db9fd8de73f1ce9b84ce.tar.xz spice-7f1ed9283fd69b237938db9fd8de73f1ce9b84ce.zip |
client: handle CONTROLLER_ENABLE_SMARTCARD (rhbz 641828)
-rw-r--r-- | client/application.cpp | 5 | ||||
-rw-r--r-- | client/application.h | 1 | ||||
-rw-r--r-- | client/controller.cpp | 5 | ||||
-rw-r--r-- | client/controller.h | 1 |
4 files changed, 11 insertions, 1 deletions
diff --git a/client/application.cpp b/client/application.cpp index 08fa4fcb..cecc7126 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -1689,6 +1689,11 @@ void Application::set_title(const std::string& title) } } +void Application::enable_smartcard(bool enable) +{ + _smartcard_options->enable = enable; +} + bool Application::is_key_set_pressed(const HotkeySet& key_set) { HotkeySet::const_iterator iter = key_set.begin(); diff --git a/client/application.h b/client/application.h index ac51cd2a..72501dd4 100644 --- a/client/application.h +++ b/client/application.h @@ -227,6 +227,7 @@ public: void external_show(); void connect(); void switch_host(const std::string& host, int port, int sport, const std::string& cert_subject); + void enable_smartcard(bool enable); const PeerConnectionOptMap& get_con_opt_map() {return _peer_con_opt;} const RedPeer::HostAuthOptions& get_host_auth_opt() { return _host_auth_opt;} diff --git a/client/controller.cpp b/client/controller.cpp index 91c00212..a0269be3 100644 --- a/client/controller.cpp +++ b/client/controller.cpp @@ -334,9 +334,12 @@ bool ControllerConnection::handle_message(ControllerMsg *hdr) case CONTROLLER_DELETE_MENU: _handler->delete_menu(); break; + case CONTROLLER_ENABLE_SMARTCARD: + _handler->enable_smartcard(value); + break; case CONTROLLER_SEND_CAD: default: - LOG_ERROR("Ignoring an unknown controller message %u", hdr->id); + LOG_ERROR("Ignoring an unknown/SEND_CAD controller message %u", hdr->id); return false; } return true; diff --git a/client/controller.h b/client/controller.h index bf927073..ef996e94 100644 --- a/client/controller.h +++ b/client/controller.h @@ -50,6 +50,7 @@ public: virtual Menu* get_app_menu() = 0; virtual void set_menu(Menu* menu) = 0; virtual void delete_menu() = 0; + virtual void enable_smartcard(bool enable) = 0; }; class Controller : public NamedPipe::ListenerInterface { |