summaryrefslogtreecommitdiffstats
path: root/client/application.cpp
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2009-10-16 00:21:43 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-10-18 17:42:37 +0200
commitef213c66c19d265140e9a55519b174d34ff1f16b (patch)
tree0a8e58217f5757881d4d4798d1316dbb3809f37a /client/application.cpp
parent308e4545cbf8d26d5d47ad6ab9f2c6e6e6648003 (diff)
downloadspice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.gz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.tar.xz
spice-ef213c66c19d265140e9a55519b174d34ff1f16b.zip
tunnel
Diffstat (limited to 'client/application.cpp')
-rw-r--r--client/application.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/application.cpp b/client/application.cpp
index b30baa84..65937156 100644
--- a/client/application.cpp
+++ b/client/application.cpp
@@ -40,6 +40,7 @@
#include "quic.h"
#include "mutex.h"
#include "cmd_line_parser.h"
+#include "tunnel_channel.h"
#include <log4cpp/BasicConfigurator.hh>
#include <log4cpp/FileAppender.hh>
@@ -236,7 +237,7 @@ enum AppCommands {
Application::Application()
: _client (*this)
- , _enabled_channels(RED_CHANNEL_END, true)
+ , _enabled_channels (RED_CHANNEL_END, true)
, _main_screen (NULL)
, _quitting (false)
, _active (false)
@@ -1323,6 +1324,7 @@ bool Application::set_channels_security(CmdLineParser& parser, bool on, char *va
channels_names["cursor"] = RED_CHANNEL_CURSOR;
channels_names["playback"] = RED_CHANNEL_PLAYBACK;
channels_names["record"] = RED_CHANNEL_RECORD;
+ channels_names["tunnel"] = RED_CHANNEL_TUNNEL;
if (!strcmp(val, "all")) {
if ((val = parser.next_argument())) {
@@ -1382,6 +1384,7 @@ bool Application::set_enable_channels(CmdLineParser& parser, bool enable, char *
channels_names["cursor"] = RED_CHANNEL_CURSOR;
channels_names["playback"] = RED_CHANNEL_PLAYBACK;
channels_names["record"] = RED_CHANNEL_RECORD;
+ channels_names["tunnel"] = RED_CHANNEL_TUNNEL;
if (!strcmp(val, "all")) {
if ((val = parser.next_argument())) {
@@ -1460,6 +1463,7 @@ bool Application::process_cmd_line(int argc, char** argv)
_peer_con_opt[RED_CHANNEL_CURSOR] = RedPeer::ConnectionOptions::CON_OP_INVALID;
_peer_con_opt[RED_CHANNEL_PLAYBACK] = RedPeer::ConnectionOptions::CON_OP_INVALID;
_peer_con_opt[RED_CHANNEL_RECORD] = RedPeer::ConnectionOptions::CON_OP_INVALID;
+ _peer_con_opt[RED_CHANNEL_TUNNEL] = RedPeer::ConnectionOptions::CON_OP_INVALID;
parser.begin(argc, argv);
@@ -1595,6 +1599,10 @@ bool Application::process_cmd_line(int argc, char** argv)
_client.register_channel_factory(RecordChannel::Factory());
}
+ if (_enabled_channels[RED_CHANNEL_TUNNEL]) {
+ _client.register_channel_factory(TunnelChannel::Factory());
+ }
+
_client.init(host.c_str(), port, sport, password.c_str(), auto_display_res);
if (auto_display_res) {
Monitor* mon = find_monitor(0);