Left: | ||
Right: |
OLD | NEW |
---|---|
1 #ifndef _CONFIG_H | 1 #ifndef _CONFIG_H |
2 #define _CONFIG_H | 2 #define _CONFIG_H |
3 | 3 |
4 // ---------------------------------------------------------------------------- | 4 // ---------------------------------------------------------------------------- |
5 // Filter configuration | 5 // Filter configuration |
6 // ---------------------------------------------------------------------------- | 6 // ---------------------------------------------------------------------------- |
7 | 7 |
8 #ifdef NDEBUG | 8 #ifdef NDEBUG |
9 #undef _DEBUG | 9 #undef _DEBUG |
10 #endif | 10 #endif |
Wladimir Palant
2013/07/05 09:26:45
We shouldn't do that in the config, it's already d
| |
11 | 11 |
12 // Define filter configuration | 12 // Define filter configuration |
13 #if (defined PRODUCT_ADBLOCKPLUS) | 13 #if (defined PRODUCT_ADBLOCKPLUS) |
14 #define FILTERS_PROTOCOL "https://" | 14 #define FILTERS_PROTOCOL "https://" |
15 #define FILTERS_HOST "easylist-downloads.adblockplus.org" | 15 #define FILTERS_HOST "easylist-downloads.adblockplus.org" |
Wladimir Palant
2013/07/05 09:26:45
These two macros are unused and can be removed.
| |
16 #endif | 16 #endif |
17 | 17 |
18 // ---------------------------------------------------------------------------- | 18 // ---------------------------------------------------------------------------- |
19 // Define default protocols, hosts, scripts and pages | 19 // Define default protocols, hosts, scripts and pages |
20 // ---------------------------------------------------------------------------- | 20 // ---------------------------------------------------------------------------- |
21 | 21 |
22 #define USERS_PROTOCOL L"http://" | 22 #define USERS_PROTOCOL L"http://" |
23 #define USERS_PATH L"" | 23 #define USERS_PATH L"" |
24 #define USERS_PORT INTERNET_DEFAULT_HTTP_PORT | 24 #define USERS_PORT INTERNET_DEFAULT_HTTP_PORT |
25 | 25 |
26 #define USERS_SCRIPT_SETTINGS L"/user_manager.php" | 26 #define USERS_SCRIPT_SETTINGS L"/user_manager.php" |
27 #define USERS_SCRIPT_ABOUT L"/user_about.php" | 27 #define USERS_SCRIPT_ABOUT L"/user_about.php" |
28 #define USERS_SCRIPT_FAQ L"/user_faq.php" | 28 #define USERS_SCRIPT_FAQ L"/user_faq.php" |
29 #define USERS_SCRIPT_FEEDBACK L"/user_feedback.php" | 29 #define USERS_SCRIPT_FEEDBACK L"/user_feedback.php" |
30 #define USERS_SCRIPT_INFO L"/user_info.php" | 30 #define USERS_SCRIPT_INFO L"/user_info.php" |
31 #define USERS_SCRIPT_WELCOME L"/user_welcome.php" | 31 #define USERS_SCRIPT_WELCOME L"/user_welcome.php" |
32 #define USERS_SCRIPT_USER_SETTINGS L"/user_mysettings.php" | 32 #define USERS_SCRIPT_USER_SETTINGS L"/user_mysettings.php" |
33 #define USERS_SCRIPT_INVITATION L"/user_invitation.php" | 33 #define USERS_SCRIPT_INVITATION L"/user_invitation.php" |
34 #define USERS_SCRIPT_UPGRADE L"/user_upgrade.php" | 34 #define USERS_SCRIPT_UPGRADE L"/user_upgrade.php" |
Wladimir Palant
2013/07/05 09:26:45
All these macros need to be removed along with the
| |
35 | 35 |
36 // ---------------------------------------------------------------------------- | 36 // ---------------------------------------------------------------------------- |
37 // Define actual configurations | 37 // Define actual configurations |
38 // ---------------------------------------------------------------------------- | 38 // ---------------------------------------------------------------------------- |
39 | 39 |
40 // AdblockPlus configuration | 40 // AdblockPlus configuration |
41 | 41 |
42 | 42 |
43 #if (defined PRODUCT_ADBLOCKPLUS) | 43 #if (defined PRODUCT_ADBLOCKPLUS) |
44 #define ABPDOMAIN L"adblockplus.org" | 44 #define ABPDOMAIN L"adblockplus.org" |
45 #ifdef ADBLOCKPLUS_TEST_MODE | 45 #ifdef ADBLOCKPLUS_TEST_MODE |
46 #define USERS_HOST L"127.0.0.1" | 46 #define USERS_HOST L"127.0.0.1" |
Wladimir Palant
2013/07/05 09:26:45
These two macros should be removed along with thei
| |
47 #elif (defined ADBLOCKPLUS_PRODUCTION_MODE) | 47 #elif (defined ADBLOCKPLUS_PRODUCTION_MODE) |
48 #ifdef _DEBUG | 48 #ifdef _DEBUG |
49 #define USERS_HOST L"127.0.0.1" | 49 #define USERS_HOST L"127.0.0.1" |
50 #else | 50 #else |
51 #define USERS_HOST L"update.adblockplus.org" | 51 #define USERS_HOST L"update.adblockplus.org" |
52 #endif | 52 #endif |
53 #else | 53 #else |
54 #error "Undefined mode. Please use configuation Release Production/Test or Debug Production/Test" | 54 #error "Undefined mode. Please use configuation Release Production/Test or Debug Production/Test" |
55 #endif | 55 #endif |
56 #else | 56 #else |
57 #error "Undefined product. Please specify PRODUCT_ADBLOCKPLUS in configuration" | 57 #error "Undefined product. Please specify PRODUCT_ADBLOCKPLUS in configuration" |
58 #endif | 58 #endif |
59 | 59 |
60 // ---------------------------------------------------------------------------- | 60 // ---------------------------------------------------------------------------- |
61 // Timers | 61 // Timers |
62 // ---------------------------------------------------------------------------- | 62 // ---------------------------------------------------------------------------- |
63 | 63 |
64 // Time interval between user registration trials | 64 // Time interval between user registration trials |
65 #define TIMER_INTERVAL_USER_REGISTRATION 1000 | 65 #define TIMER_INTERVAL_USER_REGISTRATION 1000 |
66 | 66 |
67 // How long time should we wait between each try of initializing the server clie nt (ms) | 67 // How long time should we wait between each try of initializing the server clie nt (ms) |
68 #ifdef _DEBUG | 68 #ifdef _DEBUG |
69 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 10000 | 69 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 10000 |
70 #else | 70 #else |
71 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 120000 | 71 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 120000 |
72 #endif | 72 #endif |
Wladimir Palant
2013/07/05 09:26:45
This macro is unused and can be removed.
| |
73 | 73 |
74 // How long time sleep in background thread (ms) | 74 // How long time sleep in background thread (ms) |
75 #define TIMER_THREAD_SLEEP_USER_REGISTRATION 10000 | 75 #define TIMER_THREAD_SLEEP_USER_REGISTRATION 10000 |
76 #define TIMER_THREAD_SLEEP_MAIN_LOOP 60000 | 76 #define TIMER_THREAD_SLEEP_MAIN_LOOP 60000 |
Wladimir Palant
2013/07/05 09:26:45
This macro is unused and can be removed.
| |
77 #define TIMER_THREAD_SLEEP_TAB_LOOP 10000 | 77 #define TIMER_THREAD_SLEEP_TAB_LOOP 10000 |
78 | 78 |
79 | 79 |
80 // Should we to on debug information | 80 // Should we to on debug information |
81 #ifdef _DEBUG | 81 #ifdef _DEBUG |
82 #define ENABLE_DEBUG_INFO | 82 #define ENABLE_DEBUG_INFO |
83 #define ENABLE_DEBUG_GENERAL | 83 #define ENABLE_DEBUG_GENERAL |
84 #define ENABLE_DEBUG_ERROR | 84 #define ENABLE_DEBUG_ERROR |
85 #undef ENABLE_DEBUG_BLOCKER | 85 #undef ENABLE_DEBUG_BLOCKER |
86 #undef ENABLE_DEBUG_FILTER | 86 #undef ENABLE_DEBUG_FILTER |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 | 203 |
204 // ---------------------------------------------------------------------------- | 204 // ---------------------------------------------------------------------------- |
205 // Miscellaneous | 205 // Miscellaneous |
206 // ---------------------------------------------------------------------------- | 206 // ---------------------------------------------------------------------------- |
207 | 207 |
208 //For debugging production build | 208 //For debugging production build |
209 //#define ENABLE_DEBUG_INFO | 209 //#define ENABLE_DEBUG_INFO |
210 | 210 |
211 | 211 |
212 // Max elements in white list menus | 212 // Max elements in white list menus |
213 #define DOMAIN_HISTORY_MAX_COUNT 5 | 213 #define DOMAIN_HISTORY_MAX_COUNT 5 |
Wladimir Palant
2013/07/05 09:26:45
This macro is only used to set unused macros WM_WH
| |
214 | 214 |
215 // Max registration attempts | 215 // Max registration attempts |
216 #define REGISTRATION_MAX_ATTEMPTS 5 | 216 #define REGISTRATION_MAX_ATTEMPTS 5 |
Wladimir Palant
2013/07/05 09:26:45
This macro is unused and can be removed.
| |
217 | 217 |
218 // If defined, we will surround most of the methods with try catch | 218 // If defined, we will surround most of the methods with try catch |
219 #undef CATCHALL | 219 #undef CATCHALL |
220 | 220 |
221 // If defined, we will throw exceptions for errors | 221 // If defined, we will throw exceptions for errors |
222 // Otherwise we will try to handle it in a silent way, and only report | 222 // Otherwise we will try to handle it in a silent way, and only report |
223 #undef THROW_ON_ERROR | 223 #undef THROW_ON_ERROR |
224 | 224 |
225 // Should we report errors to the local filesystem and/or to the ad plugin serve r | 225 // Should we report errors to the local filesystem and/or to the ad plugin serve r |
226 #ifdef ADBLOCKPLUS_PRODUCTION_MODE | 226 #ifdef ADBLOCKPLUS_PRODUCTION_MODE |
227 #undef REPORT_ERROR_FILE | 227 #undef REPORT_ERROR_FILE |
228 #undef REPORT_ERROR_SERVER | 228 #undef REPORT_ERROR_SERVER |
229 #else | 229 #else |
230 #define REPORT_ERROR_FILE | 230 #define REPORT_ERROR_FILE |
231 #define REPORT_ERROR_SERVER | 231 #define REPORT_ERROR_SERVER |
232 #endif | 232 #endif |
Wladimir Palant
2013/07/05 09:26:45
These two macros are unused and can be removed as
| |
233 | 233 |
234 // Should we shut down plugin automatically before starting the | 234 // Should we shut down plugin automatically before starting the |
235 // installer? Remember to change the dictionary POSTDOWNLOADTEXT text | 235 // installer? Remember to change the dictionary POSTDOWNLOADTEXT text |
236 // to correspond to this behaviour. | 236 // to correspond to this behaviour. |
237 // ex. AUTOMATIC_SHUTDOWN - "If you choose to install the new plugin, you Explor er will close before installation." | 237 // ex. AUTOMATIC_SHUTDOWN - "If you choose to install the new plugin, you Explor er will close before installation." |
238 // or NO_AUTOMATIC_SHUTDOWN" - "If you choose to install the new plugin, you ha ve to restart Explorer for the update to take effect" | 238 // or NO_AUTOMATIC_SHUTDOWN" - "If you choose to install the new plugin, you ha ve to restart Explorer for the update to take effect" |
239 #define AUTOMATIC_SHUTDOWN | 239 #define AUTOMATIC_SHUTDOWN |
Wladimir Palant
2013/07/05 09:26:45
This macro is only being used in the unused CPlugi
| |
240 | 240 |
241 | 241 |
242 #if (defined PRODUCT_ADBLOCKPLUS) | 242 #if (defined PRODUCT_ADBLOCKPLUS) |
243 //This is used as an agent string for HTTP requests to our servers from the plug in | 243 //This is used as an agent string for HTTP requests to our servers from the plug in |
244 #define BHO_NAME _T("Adblock Plus BHO/1.0") | 244 #define BHO_NAME _T("Adblock Plus BHO/1.0") |
Wladimir Palant
2013/07/05 09:26:45
This macro is only used in PluginHttpRequest that'
| |
245 #endif | 245 #endif |
246 | 246 |
247 // Name of ini file in Windows directory for uninstall | 247 // Name of ini file in Windows directory for uninstall |
248 #if (defined PRODUCT_ADBLOCKPLUS) | 248 #if (defined PRODUCT_ADBLOCKPLUS) |
249 #define UNINSTALL_INI_FILE "AdBlockPlus.ini" | 249 #define UNINSTALL_INI_FILE "AdBlockPlus.ini" |
Wladimir Palant
2013/07/05 09:26:45
This macro is also unused and can be removed.
| |
250 #endif | 250 #endif |
251 | 251 |
252 // Prefix on temp dir files | 252 // Prefix on temp dir files |
253 #if (defined PRODUCT_ADBLOCKPLUS) | 253 #if (defined PRODUCT_ADBLOCKPLUS) |
254 #define TEMP_FILE_PREFIX "ab_" | 254 #define TEMP_FILE_PREFIX "ab_" |
Wladimir Palant
2013/07/05 09:26:45
This macro is only used in PluginConfig.cpp that's
| |
255 #endif | 255 #endif |
256 | 256 |
257 // Dictionary filename | |
258 #if (defined PRODUCT_ADBLOCKPLUS) | |
259 #define DICTIONARY_INI_FILE "dictionary_w.ini" | |
260 #else | |
261 #define DICTIONARY_INI_FILE "dictionary.ini" | |
262 #endif | |
263 #define DICTIONARY_DIR_NAME "Languages\\" | 257 #define DICTIONARY_DIR_NAME "Languages\\" |
264 #define DEFAULT_LANGUAGE "en-US" | 258 #define DEFAULT_LANGUAGE "en-US" |
Wladimir Palant
2013/07/05 09:26:45
These two macros are also unused and can be remove
| |
265 | 259 |
266 #define SETTING_PAGE_INI_FILE "settings_page_w.ini" | |
267 | |
268 // Config filename | 260 // Config filename |
269 #ifdef SUPPORT_CONFIG | 261 #ifdef SUPPORT_CONFIG |
270 #define CONFIG_INI_FILE "config.ini" | 262 #define CONFIG_INI_FILE "config.ini" |
Wladimir Palant
2013/07/05 09:26:45
This macro is only used in PluginConfig.cpp that i
| |
271 #endif | 263 #endif |
272 | 264 |
273 // Settings filename | |
274 #define SETTINGS_INI_FILE "settings.ini" | |
275 | |
276 // Settings tab filename | |
277 #define SETTINGS_INI_FILE_TAB "settings_tab.ini" | |
278 | |
279 // Setting whitelist filename | |
280 #ifdef SUPPORT_WHITELIST | |
281 #define SETTINGS_INI_FILE_WHITELIST "settings_whitelist.ini" | |
282 #endif | |
283 | |
284 // Personal filter filename | |
285 #ifdef SUPPORT_FILTER | |
286 #define PERSONAL_FILTER_FILE "filter_personal.txt" | |
287 #define PERSONAL_FILTER_FILE_OLD "easylist_personal.txt" | |
288 #endif | |
289 | |
290 // Install MSI filename | 265 // Install MSI filename |
291 #if (defined PRODUCT_ADBLOCKPLUS) | 266 #if (defined PRODUCT_ADBLOCKPLUS) |
292 #define INSTALL_MSI_FILE "adblock.msi" | 267 #define INSTALL_MSI_FILE "adblock.msi" |
293 #define INSTALL_EXE_FILE "Setup.exe" | 268 #define INSTALL_EXE_FILE "Setup.exe" |
Wladimir Palant
2013/07/05 09:26:45
These two macros are unused and can be removed.
| |
294 #endif | 269 #endif |
295 | 270 |
296 // Status bar pane name | 271 // Status bar pane name |
297 #if (defined PRODUCT_ADBLOCKPLUS) | 272 #if (defined PRODUCT_ADBLOCKPLUS) |
298 #define STATUSBAR_PANE_NAME "AdblockPlusStatusBarPane" | 273 #define STATUSBAR_PANE_NAME "AdblockPlusStatusBarPane" |
299 #endif | 274 #endif |
300 | 275 |
301 // Status bar pane number | 276 // Status bar pane number |
302 #if (defined PRODUCT_ADBLOCKPLUS) | 277 #if (defined PRODUCT_ADBLOCKPLUS) |
303 #define STATUSBAR_PANE_NUMBER 2 | 278 #define STATUSBAR_PANE_NUMBER 2 |
304 #endif | 279 #endif |
305 | 280 |
306 | 281 |
307 | 282 |
308 #endif // _CONFIG_H | 283 #endif // _CONFIG_H |
OLD | NEW |