blob: 51ab78af5a1c972e692d4b2b7b59024819b63463 [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;
59 bool sendPtrEvents;
60 bool sendKeyEvents;
61 bool showToolbar;
62 bool clientCutText;
63 bool serverCutText;
64 bool disableWinKeys;
65 bool emulate3;
66 int pointerEventInterval;
67 bool protocol3_3;
68 bool acceptBell;
george82444e8862006-05-27 10:21:28 +000069 bool autoScaling;
george82444e8862006-05-27 10:21:28 +000070 int scale;
Constantin Kaplinsky729598c2006-05-25 05:12:25 +000071 CharArray userName;
72 void setUserName(const char* user);
73 PlainPasswd password;
74 void setPassword(const char* pwd);
75 CharArray configFileName;
76 void setConfigFileName(const char* cfn);
77 CharArray host;
78 void setHost(const char* h);
79 CharArray monitor;
80 void setMonitor(const char* m);
81 unsigned int menuKey;
82 void setMenuKey(const char* keyName);
83 char* menuKeyName();
84 bool autoReconnect;
85
86 bool customCompressLevel;
87 int compressLevel;
88 bool noJpeg;
89 int qualityLevel;
90
91 CharArray passwordFile;
92 };
93
94
95 };
96
97};
98
99#endif