blob: 76f0d68ef3ae987591c1338ccea1d63ce382ec72 [file] [log] [blame]
Constantin Kaplinsky729598c2006-05-25 05:12:25 +00001/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18
19// -=- CConnOptions.h
20
21// Definition of the CConnOptions class, responsible for storing the
22// current & requested VNC Viewer options.
23
24#ifndef __RFB_WIN32_CCONN_OPTIONS_H__
25#define __RFB_WIN32_CCONN_OPTIONS_H__
26
Adam Tkac3fed5a42010-12-08 13:48:29 +000027#include <rdr/types.h>
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000028#include <rfb/Password.h>
29
Adam Tkac3fed5a42010-12-08 13:48:29 +000030#include <list>
31
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000032namespace rfb {
33
34 namespace win32 {
35
36 //
37 // -=- Options structure. Each viewer option has a corresponding
38 // entry in CConnOptions. The viewer options are set by calling
39 // CConn::applyOptions(...)
40 // The CConnOptions structure automatically picks up the default
41 // value of each option from the Configuration system
42 // The readFromFile and writeFromFile methods can be used to load
43 // and save VNC configuration files. readFromFile is backwards
44 // compatible with 3.3 releases, while writeToFile is not.
45
46 class CConnOptions {
47 public:
48 CConnOptions();
49 CConnOptions(const CConnOptions& o) {operator=(o);}
50 CConnOptions& operator=(const CConnOptions& o);
51 void readFromFile(const char* filename_);
52 void writeToFile(const char* filename_);
53 void writeDefaults();
54 bool useLocalCursor;
55 bool useDesktopResize;
56 bool fullScreen;
57 bool fullColour;
58 int lowColourLevel;
59 int preferredEncoding;
60 bool autoSelect;
61 bool shared;
Pierre Ossmand6d19942009-03-24 12:29:50 +000062 CharArray desktopSize;
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000063 bool sendPtrEvents;
64 bool sendKeyEvents;
65 bool showToolbar;
66 bool clientCutText;
67 bool serverCutText;
68 bool disableWinKeys;
69 bool emulate3;
70 int pointerEventInterval;
71 bool protocol3_3;
72 bool acceptBell;
george82444e8862006-05-27 10:21:28 +000073 bool autoScaling;
george82444e8862006-05-27 10:21:28 +000074 int scale;
Adam Tkac3fed5a42010-12-08 13:48:29 +000075 std::list<rdr::U32> secTypes;
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000076 CharArray userName;
77 void setUserName(const char* user);
78 PlainPasswd password;
79 void setPassword(const char* pwd);
80 CharArray configFileName;
81 void setConfigFileName(const char* cfn);
82 CharArray host;
83 void setHost(const char* h);
84 CharArray monitor;
85 void setMonitor(const char* m);
86 unsigned int menuKey;
87 void setMenuKey(const char* keyName);
88 char* menuKeyName();
89 bool autoReconnect;
90
91 bool customCompressLevel;
92 int compressLevel;
93 bool noJpeg;
94 int qualityLevel;
95
96 CharArray passwordFile;
97 };
98
99
100 };
101
102};
103
104#endif