blob: d010d172b61d0e3903010539885bcc361a9e5e9c [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
27#include <rfb/Password.h>
28
29namespace rfb {
30
31 namespace win32 {
32
33 //
34 // -=- Options structure. Each viewer option has a corresponding
35 // entry in CConnOptions. The viewer options are set by calling
36 // CConn::applyOptions(...)
37 // The CConnOptions structure automatically picks up the default
38 // value of each option from the Configuration system
39 // The readFromFile and writeFromFile methods can be used to load
40 // and save VNC configuration files. readFromFile is backwards
41 // compatible with 3.3 releases, while writeToFile is not.
42
43 class CConnOptions {
44 public:
45 CConnOptions();
46 CConnOptions(const CConnOptions& o) {operator=(o);}
47 CConnOptions& operator=(const CConnOptions& o);
48 void readFromFile(const char* filename_);
49 void writeToFile(const char* filename_);
50 void writeDefaults();
51 bool useLocalCursor;
52 bool useDesktopResize;
53 bool fullScreen;
54 bool fullColour;
55 int lowColourLevel;
56 int preferredEncoding;
57 bool autoSelect;
58 bool shared;
Pierre Ossmand6d19942009-03-24 12:29:50 +000059 CharArray desktopSize;
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000060 bool sendPtrEvents;
61 bool sendKeyEvents;
62 bool showToolbar;
63 bool clientCutText;
64 bool serverCutText;
65 bool disableWinKeys;
66 bool emulate3;
67 int pointerEventInterval;
68 bool protocol3_3;
69 bool acceptBell;
george82444e8862006-05-27 10:21:28 +000070 bool autoScaling;
george82444e8862006-05-27 10:21:28 +000071 int scale;
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000072 CharArray userName;
73 void setUserName(const char* user);
74 PlainPasswd password;
75 void setPassword(const char* pwd);
76 CharArray configFileName;
77 void setConfigFileName(const char* cfn);
78 CharArray host;
79 void setHost(const char* h);
80 CharArray monitor;
81 void setMonitor(const char* m);
82 unsigned int menuKey;
83 void setMenuKey(const char* keyName);
84 char* menuKeyName();
85 bool autoReconnect;
86
87 bool customCompressLevel;
88 int compressLevel;
89 bool noJpeg;
90 int qualityLevel;
91
92 CharArray passwordFile;
93 };
94
95
96 };
97
98};
99
100#endif