Fix compilation when smartcard support is disabled

The addition of smartcard control to the controller doesn't handle
the case when smartcard support is disabled at compile time. When
this is the case, this causes compile errors.
This commit is contained in:
Christophe Fergeau 2012-02-29 11:48:15 +01:00
parent 4b7c66cafc
commit a50619e733
4 changed files with 8 additions and 0 deletions

View File

@ -1675,10 +1675,12 @@ void Application::set_title(const std::string& title)
}
}
#ifdef USE_SMARTCARD
void Application::enable_smartcard(bool enable)
{
_smartcard_options->enable = enable;
}
#endif
bool Application::is_key_set_pressed(const HotkeySet& key_set)
{

View File

@ -227,7 +227,9 @@ public:
void external_show();
void connect();
void switch_host(const std::string& host, int port, int sport, const std::string& cert_subject);
#ifdef USE_SMARTCARD
void enable_smartcard(bool enable);
#endif
const PeerConnectionOptMap& get_con_opt_map() {return _peer_con_opt;}
const RedPeer::HostAuthOptions& get_host_auth_opt() { return _host_auth_opt;}

View File

@ -334,9 +334,11 @@ bool ControllerConnection::handle_message(ControllerMsg *hdr)
case CONTROLLER_DELETE_MENU:
_handler->delete_menu();
break;
#if USE_SMARTCARD
case CONTROLLER_ENABLE_SMARTCARD:
_handler->enable_smartcard(value);
break;
#endif
case CONTROLLER_SEND_CAD:
default:
LOG_ERROR("Ignoring an unknown/SEND_CAD controller message %u", hdr->id);

View File

@ -50,7 +50,9 @@ public:
virtual Menu* get_app_menu() = 0;
virtual void set_menu(Menu* menu) = 0;
virtual void delete_menu() = 0;
#ifdef USE_SMARTCARD
virtual void enable_smartcard(bool enable) = 0;
#endif
};
class Controller : public NamedPipe::ListenerInterface {