| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 #ifndef _CONFIG_H | 1 #ifndef _CONFIG_H |
| 2 #define _CONFIG_H | 2 #define _CONFIG_H |
| 3 | 3 |
| 4 // ---------------------------------------------------------------------------- | |
| 5 // Filter configuration | |
| 6 // ---------------------------------------------------------------------------- | |
| 7 | |
| 8 #ifdef NDEBUG | |
| 9 #undef _DEBUG | |
| 10 #endif | |
|
Wladimir Palant
2013/07/05 09:26:45
We shouldn't do that in the config, it's already d
| |
| 11 | |
| 12 // Define filter configuration | |
| 13 #if (defined PRODUCT_ADBLOCKPLUS) | |
| 14 #define FILTERS_PROTOCOL "https://" | |
| 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 | |
| 17 | |
| 18 // ---------------------------------------------------------------------------- | |
| 19 // Define default protocols, hosts, scripts and pages | |
| 20 // ---------------------------------------------------------------------------- | |
| 21 | |
| 22 #define USERS_PROTOCOL L"http://" | |
| 23 #define USERS_PATH L"" | |
| 24 #define USERS_PORT INTERNET_DEFAULT_HTTP_PORT | |
| 25 | |
| 26 #define USERS_SCRIPT_SETTINGS L"/user_manager.php" | |
| 27 #define USERS_SCRIPT_ABOUT L"/user_about.php" | |
| 28 #define USERS_SCRIPT_FAQ L"/user_faq.php" | |
| 29 #define USERS_SCRIPT_FEEDBACK L"/user_feedback.php" | |
| 30 #define USERS_SCRIPT_INFO L"/user_info.php" | |
| 31 #define USERS_SCRIPT_WELCOME L"/user_welcome.php" | |
| 32 #define USERS_SCRIPT_USER_SETTINGS L"/user_mysettings.php" | |
| 33 #define USERS_SCRIPT_INVITATION L"/user_invitation.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 | |
| 36 // ---------------------------------------------------------------------------- | |
| 37 // Define actual configurations | |
| 38 // ---------------------------------------------------------------------------- | |
| 39 | |
| 40 // AdblockPlus configuration | |
| 41 | |
| 42 | |
| 43 #if (defined PRODUCT_ADBLOCKPLUS) | |
| 44 #define ABPDOMAIN L"adblockplus.org" | |
| 45 #ifdef ADBLOCKPLUS_TEST_MODE | |
| 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) | |
| 48 #ifdef _DEBUG | |
| 49 #define USERS_HOST L"127.0.0.1" | |
| 50 #else | |
| 51 #define USERS_HOST L"update.adblockplus.org" | |
| 52 #endif | |
| 53 #else | |
| 54 #error "Undefined mode. Please use configuation Release Production/Test or Debug Production/Test" | |
| 55 #endif | |
| 56 #else | |
| 57 #error "Undefined product. Please specify PRODUCT_ADBLOCKPLUS in configuration" | |
| 58 #endif | |
| 59 | |
| 60 // ---------------------------------------------------------------------------- | |
| 61 // Timers | |
| 62 // ---------------------------------------------------------------------------- | |
| 63 | |
| 64 // Time interval between user registration trials | |
| 65 #define TIMER_INTERVAL_USER_REGISTRATION 1000 | |
| 66 | |
| 67 // How long time should we wait between each try of initializing the server clie nt (ms) | |
| 68 #ifdef _DEBUG | |
| 69 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 10000 | |
| 70 #else | |
| 71 #define TIMER_INTERVAL_SERVER_CLIENT_INIT 120000 | |
| 72 #endif | |
|
Wladimir Palant
2013/07/05 09:26:45
This macro is unused and can be removed.
| |
| 73 | |
| 74 // How long time sleep in background thread (ms) | |
| 75 #define TIMER_THREAD_SLEEP_USER_REGISTRATION 10000 | |
| 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 | 4 #define TIMER_THREAD_SLEEP_TAB_LOOP 10000 |
| 78 | |
| 79 | 5 |
| 80 // Should we to on debug information | 6 // Should we to on debug information |
| 81 #ifdef _DEBUG | 7 #ifdef _DEBUG |
| 82 #define ENABLE_DEBUG_INFO | 8 #define ENABLE_DEBUG_INFO |
| 83 #define ENABLE_DEBUG_GENERAL | 9 #define ENABLE_DEBUG_GENERAL |
| 84 #define ENABLE_DEBUG_ERROR | 10 #define ENABLE_DEBUG_ERROR |
| 85 #undef ENABLE_DEBUG_BLOCKER | 11 #undef ENABLE_DEBUG_BLOCKER |
| 86 #undef ENABLE_DEBUG_FILTER | 12 #undef ENABLE_DEBUG_FILTER |
| 87 #undef ENABLE_DEBUG_SETTINGS | 13 #undef ENABLE_DEBUG_SETTINGS |
| 88 #undef ENABLE_DEBUG_THREAD | 14 #undef ENABLE_DEBUG_THREAD |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 #undef DEBUG_ERROR_LOG | 114 #undef DEBUG_ERROR_LOG |
| 189 #define DEBUG_ERROR_LOG(err, id, subid, description) CPluginClient::LogPluginErr or(err, id, subid, description); | 115 #define DEBUG_ERROR_LOG(err, id, subid, description) CPluginClient::LogPluginErr or(err, id, subid, description); |
| 190 | 116 |
| 191 // ---------------------------------------------------------------------------- | 117 // ---------------------------------------------------------------------------- |
| 192 // Features | 118 // Features |
| 193 // ---------------------------------------------------------------------------- | 119 // ---------------------------------------------------------------------------- |
| 194 | 120 |
| 195 #if (defined PRODUCT_ADBLOCKPLUS) | 121 #if (defined PRODUCT_ADBLOCKPLUS) |
| 196 #define SUPPORT_FILTER | 122 #define SUPPORT_FILTER |
| 197 #define SUPPORT_WHITELIST | 123 #define SUPPORT_WHITELIST |
| 198 #undef SUPPORT_FILE_DOWNLOAD | |
| 199 #undef SUPPORT_CONFIG | |
| 200 #define SUPPORT_DOM_TRAVERSER | 124 #define SUPPORT_DOM_TRAVERSER |
| 201 #define SUPPORT_FRAME_CACHING | 125 #define SUPPORT_FRAME_CACHING |
| 202 #endif | 126 #endif |
| 203 | 127 |
| 204 // ---------------------------------------------------------------------------- | 128 // ---------------------------------------------------------------------------- |
| 205 // Miscellaneous | 129 // Miscellaneous |
| 206 // ---------------------------------------------------------------------------- | 130 // ---------------------------------------------------------------------------- |
| 207 | 131 |
| 208 //For debugging production build | 132 //For debugging production build |
| 209 //#define ENABLE_DEBUG_INFO | 133 //#define ENABLE_DEBUG_INFO |
| 210 | 134 |
| 211 | |
| 212 // Max elements in white list menus | |
| 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 | |
| 215 // Max registration attempts | |
| 216 #define REGISTRATION_MAX_ATTEMPTS 5 | |
|
Wladimir Palant
2013/07/05 09:26:45
This macro is unused and can be removed.
| |
| 217 | |
| 218 // If defined, we will surround most of the methods with try catch | 135 // If defined, we will surround most of the methods with try catch |
| 219 #undef CATCHALL | 136 #undef CATCHALL |
| 220 | 137 |
| 221 // If defined, we will throw exceptions for errors | 138 // If defined, we will throw exceptions for errors |
| 222 // Otherwise we will try to handle it in a silent way, and only report | 139 // Otherwise we will try to handle it in a silent way, and only report |
| 223 #undef THROW_ON_ERROR | 140 #undef THROW_ON_ERROR |
| 224 | |
| 225 // Should we report errors to the local filesystem and/or to the ad plugin serve r | |
| 226 #ifdef ADBLOCKPLUS_PRODUCTION_MODE | |
| 227 #undef REPORT_ERROR_FILE | |
| 228 #undef REPORT_ERROR_SERVER | |
| 229 #else | |
| 230 #define REPORT_ERROR_FILE | |
| 231 #define REPORT_ERROR_SERVER | |
| 232 #endif | |
|
Wladimir Palant
2013/07/05 09:26:45
These two macros are unused and can be removed as
| |
| 233 | |
| 234 // Should we shut down plugin automatically before starting the | |
| 235 // installer? Remember to change the dictionary POSTDOWNLOADTEXT text | |
| 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." | |
| 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 | |
|
Wladimir Palant
2013/07/05 09:26:45
This macro is only being used in the unused CPlugi
| |
| 240 | |
| 241 | |
| 242 #if (defined PRODUCT_ADBLOCKPLUS) | |
| 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") | |
|
Wladimir Palant
2013/07/05 09:26:45
This macro is only used in PluginHttpRequest that'
| |
| 245 #endif | |
| 246 | |
| 247 // Name of ini file in Windows directory for uninstall | |
| 248 #if (defined PRODUCT_ADBLOCKPLUS) | |
| 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 | |
| 251 | |
| 252 // Prefix on temp dir files | |
| 253 #if (defined PRODUCT_ADBLOCKPLUS) | |
| 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 | |
| 256 | |
| 257 #define DICTIONARY_DIR_NAME "Languages\\" | |
| 258 #define DEFAULT_LANGUAGE "en-US" | |
|
Wladimir Palant
2013/07/05 09:26:45
These two macros are also unused and can be remove
| |
| 259 | |
| 260 // Config filename | |
| 261 #ifdef SUPPORT_CONFIG | |
| 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
| |
| 263 #endif | |
| 264 | |
| 265 // Install MSI filename | |
| 266 #if (defined PRODUCT_ADBLOCKPLUS) | |
| 267 #define INSTALL_MSI_FILE "adblock.msi" | |
| 268 #define INSTALL_EXE_FILE "Setup.exe" | |
|
Wladimir Palant
2013/07/05 09:26:45
These two macros are unused and can be removed.
| |
| 269 #endif | |
| 270 | 141 |
| 271 // Status bar pane name | 142 // Status bar pane name |
| 272 #if (defined PRODUCT_ADBLOCKPLUS) | 143 #if (defined PRODUCT_ADBLOCKPLUS) |
| 273 #define STATUSBAR_PANE_NAME "AdblockPlusStatusBarPane" | 144 #define STATUSBAR_PANE_NAME "AdblockPlusStatusBarPane" |
| 274 #endif | 145 #endif |
| 275 | 146 |
| 276 // Status bar pane number | 147 // Status bar pane number |
| 277 #if (defined PRODUCT_ADBLOCKPLUS) | 148 #if (defined PRODUCT_ADBLOCKPLUS) |
| 278 #define STATUSBAR_PANE_NUMBER 2 | 149 #define STATUSBAR_PANE_NUMBER 2 |
| 279 #endif | 150 #endif |
| 280 | 151 |
| 281 | 152 |
| 282 | 153 |
| 283 #endif // _CONFIG_H | 154 #endif // _CONFIG_H |
| LEFT | RIGHT |