1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
/*
IEView Plugin for Miranda IM
Copyright (C) 2005-2010 Piotr Piastucki
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
class ProtocolSettings;
class Options;
#ifndef OPTIONS_INCLUDED
#define OPTIONS_INCLUDED
//#include "FontList.h"
#include "stdafx.h"
#define DBS_BASICFLAGS "GeneralFlags"
#define DBS_SRMM_ENABLE "SRMMEnable"
#define DBS_SRMM_MODE "SRMMMode"
#define DBS_SRMM_FLAGS "SRMMFlags"
#define DBS_SRMM_BACKGROUND "SRMMBackgroundFile"
#define DBS_SRMM_CSS "SRMMCSSFile"
#define DBS_SRMM_TEMPLATE "SRMMTemplateFile"
#define DBS_CHAT_ENABLE "ChatEnable"
#define DBS_CHAT_MODE "ChatMode"
#define DBS_CHAT_FLAGS "ChatFlags"
#define DBS_CHAT_BACKGROUND "ChatBackgroundFile"
#define DBS_CHAT_CSS "ChatCSSFile"
#define DBS_CHAT_TEMPLATE "ChatTemplateFile"
#define DBS_HISTORY_ENABLE "HistoryEnable"
#define DBS_HISTORY_MODE "HistoryMode"
#define DBS_HISTORY_FLAGS "HistoryFlags"
#define DBS_HISTORY_BACKGROUND "HistoryBackgroundFile"
#define DBS_HISTORY_CSS "HistoryCSSFile"
#define DBS_HISTORY_TEMPLATE "HistoryTemplateFile"
extern int IEViewOptInit(WPARAM wParam, LPARAM lParam);
class ProtocolSettings {
private:
char *protocolName;
ProtocolSettings *next;
bool srmmEnable;
int srmmMode;
int srmmFlags;
char *srmmBackgroundFilename;
char *srmmCssFilename;
char *srmmTemplateFilename;
bool srmmEnableTemp;
int srmmModeTemp;
int srmmFlagsTemp;
char *srmmBackgroundFilenameTemp;
char *srmmCssFilenameTemp;
char *srmmTemplateFilenameTemp;
bool chatEnable;
int chatMode;
int chatFlags;
char *chatBackgroundFilename;
char *chatCssFilename;
char *chatTemplateFilename;
bool chatEnableTemp;
int chatModeTemp;
int chatFlagsTemp;
char *chatBackgroundFilenameTemp;
char *chatCssFilenameTemp;
char *chatCssFilenameRtlTemp;
char *chatTemplateFilenameTemp;
bool historyEnable;
int historyMode;
int historyFlags;
char *historyBackgroundFilename;
char *historyCssFilename;
char *historyCssFilenameRtl;
char *historyTemplateFilename;
bool historyEnableTemp;
int historyModeTemp;
int historyFlagsTemp;
char *historyBackgroundFilenameTemp;
char *historyCssFilenameTemp;
char *historyCssFilenameRtlTemp;
char *historyTemplateFilenameTemp;
public:
ProtocolSettings(const char *protocolName);
~ProtocolSettings();
void setNext(ProtocolSettings *next);
const char *getProtocolName();
ProtocolSettings *getNext();
void setSRMMEnable(bool enable);
bool isSRMMEnable();
void setSRMMMode(int flags);
int getSRMMMode();
void setSRMMFlags(int flags);
int getSRMMFlags();
void setSRMMBackgroundFilename(const char *filename);
const char *getSRMMBackgroundFilename();
void setSRMMCssFilename(const char *filename);
const char *getSRMMCssFilename();
void setSRMMTemplateFilename(const char *filename);
const char *getSRMMTemplateFilename();
void setSRMMEnableTemp(bool enable);
bool isSRMMEnableTemp();
void setSRMMModeTemp(int flags);
int getSRMMModeTemp();
void setSRMMFlagsTemp(int flags);
int getSRMMFlagsTemp();
void setSRMMBackgroundFilenameTemp(const char *filename);
const char *getSRMMBackgroundFilenameTemp();
void setSRMMCssFilenameTemp(const char *filename);
const char *getSRMMCssFilenameTemp();
void setSRMMTemplateFilenameTemp(const char *filename);
const char *getSRMMTemplateFilenameTemp();
void setChatEnable(bool enable);
bool isChatEnable();
void setChatMode(int flags);
int getChatMode();
void setChatFlags(int flags);
int getChatFlags();
void setChatBackgroundFilename(const char *filename);
const char *getChatBackgroundFilename();
void setChatCssFilename(const char *filename);
const char *getChatCssFilename();
void setChatCssFilenameRtl(const char *filename);
const char *getChatCssFilenameRtl();
void setChatTemplateFilename(const char *filename);
const char *getChatTemplateFilename();
void setChatEnableTemp(bool enable);
bool isChatEnableTemp();
void setChatModeTemp(int flags);
int getChatModeTemp();
void setChatFlagsTemp(int flags);
int getChatFlagsTemp();
void setChatBackgroundFilenameTemp(const char *filename);
const char *getChatBackgroundFilenameTemp();
void setChatCssFilenameTemp(const char *filename);
const char *getChatCssFilenameTemp();
void setChatTemplateFilenameTemp(const char *filename);
const char *getChatTemplateFilenameTemp();
void setHistoryEnable(bool enable);
bool isHistoryEnable();
void setHistoryMode(int flags);
int getHistoryMode();
void setHistoryFlags(int flags);
int getHistoryFlags();
void setHistoryBackgroundFilename(const char *filename);
const char *getHistoryBackgroundFilename();
void setHistoryCssFilename(const char *filename);
const char *getHistoryCssFilename();
void setHistoryTemplateFilename(const char *filename);
const char *getHistoryTemplateFilename();
void setHistoryEnableTemp(bool enable);
bool isHistoryEnableTemp();
void setHistoryModeTemp(int flags);
int getHistoryModeTemp();
void setHistoryFlagsTemp(int flags);
int getHistoryFlagsTemp();
void setHistoryBackgroundFilenameTemp(const char *filename);
const char *getHistoryBackgroundFilenameTemp();
void setHistoryCssFilenameTemp(const char *filename);
const char *getHistoryCssFilenameTemp();
void setHistoryTemplateFilenameTemp(const char *filename);
const char *getHistoryTemplateFilenameTemp();
void copyToTemp();
void copyFromTemp();
};
class Options {
private:
static int generalFlags;
static bool isInited;
static bool bSmileyAdd;
static int avatarServiceFlags;
static ProtocolSettings* protocolList;
public:
enum MODES {
MODE_COMPATIBLE = 0,
MODE_CSS = 1,
MODE_TEMPLATE = 2
};
enum OPTIONS {
GENERAL_ENABLE_BBCODES = 0x000001,
GENERAL_ENABLE_FLASH = 0x000004,
GENERAL_SMILEYINNAMES = 0x000010,
GENERAL_NO_BORDER = 0x000020,
GENERAL_ENABLE_EMBED = 0x000040,
LOG_SHOW_NICKNAMES = 0x000100,
LOG_SHOW_TIME = 0x000200,
LOG_SHOW_DATE = 0x000400,
LOG_SHOW_SECONDS = 0x000800,
LOG_LONG_DATE = 0x001000,
LOG_RELATIVE_DATE = 0x002000,
LOG_GROUP_MESSAGES = 0x004000,
LOG_IMAGE_ENABLED = 0x010000,
LOG_IMAGE_SCROLL = 0x020000
};
enum AVATARSERVICEFLAGS {
AVATARSERVICE_PRESENT = 0x0001,
};
static void setGeneralFlags(int flags);
static int getGeneralFlags();
static void setEmbedsize(int size);
static int getEmbedsize();
static bool isSmileyAdd();
static int getAvatarServiceFlags();
static void init();
static void uninit();
static void saveProtocolSettings();
static void resetProtocolSettings();
static ProtocolSettings*getProtocolSettings();
static ProtocolSettings*getProtocolSettings(const char *protocolName);
};
#endif
|