[Spice-devel] [PATCH 3/5] client: handle CONTROLLER_ENABLE_SMARTCARD (rhbz 641828)

Alon Levy alevy at redhat.com
Sun Feb 26 08:43:33 PST 2012


---
 client/application.cpp |    5 +++++
 client/application.h   |    1 +
 client/controller.cpp  |    3 +++
 client/controller.h    |    1 +
 4 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/client/application.cpp b/client/application.cpp
index 1d4da8b..5d1f73a 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -1675,6 +1675,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 c513d94..cbbcaa3 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 93805bc..385c65b 100644
--- a/client/controller.cpp
+++ b/client/controller.cpp
@@ -337,6 +337,9 @@ bool ControllerConnection::handle_message(ControllerMsg *hdr)
     case CONTROLLER_SEND_CAD:
         LOG_ERROR("TODO: CONTROLLER_SEND_CAD is not impelemented");
         break;
+    case CONTROLLER_ENABLE_SMARTCARD:
+        _handler->enable_smartcard(value);
+        break;
     default:
         LOG_ERROR("Ignoring an unknown controller message %u", hdr->id);
         return false;
diff --git a/client/controller.h b/client/controller.h
index bf92707..ef996e9 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 {
-- 
1.7.9.1



More information about the Spice-devel mailing list