| OLD | NEW |
| 1 /** | 1 /** |
| 2 * This class contains all client functionality of the IE plugin | 2 * This class contains all client functionality of the IE plugin |
| 3 * | 3 * |
| 4 * Exception errors are tested by calls to ExceptionsTest from: Main ... | 4 * Exception errors are tested by calls to ExceptionsTest from: Main ... |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef _PLUGIN_SETTINGS_H_ | 7 #ifndef _PLUGIN_SETTINGS_H_ |
| 8 #define _PLUGIN_SETTINGS_H_ | 8 #define _PLUGIN_SETTINGS_H_ |
| 9 | 9 |
| 10 | 10 |
| 11 #include "PluginTypedef.h" | 11 #include "PluginTypedef.h" |
| 12 #include "AdblockPlusClient.h" | 12 #include "AdblockPlusClient.h" |
| 13 | 13 |
| 14 // Main settings | 14 // Main settings |
| 15 | 15 |
| 16 #define SETTING_PLUGIN_INFO_PANEL L"plugininfopanel" | 16 #define SETTING_PLUGIN_INFO_PANEL L"plugininfopanel" |
| 17 #define SETTING_PLUGIN_VERSION L"pluginversion" | 17 #define SETTING_PLUGIN_VERSION L"pluginversion" |
| 18 #define SETTING_PLUGIN_UPDATE_URL L"pluginupdateurl" | |
| 19 #define SETTING_PLUGIN_UPDATE_VERSION L"pluginupdateversion" | 18 #define SETTING_PLUGIN_UPDATE_VERSION L"pluginupdateversion" |
| 20 #define SETTING_PLUGIN_UPDATE_TIME L"pluginupdatetime" | |
| 21 #define SETTING_PLUGIN_SELFTEST L"pluginselftest" | 19 #define SETTING_PLUGIN_SELFTEST L"pluginselftest" |
| 22 #define SETTING_LANGUAGE L"language" | 20 #define SETTING_LANGUAGE L"language" |
| 23 | 21 |
| 24 #ifdef SUPPORT_CONFIG | 22 #ifdef SUPPORT_CONFIG |
| 25 #define SETTING_CONFIG_VERSION L"configversion" | 23 #define SETTING_CONFIG_VERSION L"configversion" |
| 26 #endif | 24 #endif |
| 27 #define SETTING_LAST_UPDATE_TIME L"lastupdatetime" | |
| 28 #define SETTING_DICTIONARY_VERSION L"dictionaryversion" | 25 #define SETTING_DICTIONARY_VERSION L"dictionaryversion" |
| 29 | 26 |
| 30 // Tab settings | 27 // Tab settings |
| 31 | 28 |
| 32 #define SETTING_TAB_PLUGIN_ENABLED L"pluginenabled" | 29 #define SETTING_TAB_PLUGIN_ENABLED L"pluginenabled" |
| 33 #define SETTING_TAB_COUNT L"tabcount" | 30 #define SETTING_TAB_COUNT L"tabcount" |
| 34 #define SETTING_TAB_START_TIME L"tabstart" | 31 #define SETTING_TAB_START_TIME L"tabstart" |
| 35 #define SETTING_TAB_UPDATE_ON_START L"updateonstart" | 32 #define SETTING_TAB_UPDATE_ON_START L"updateonstart" |
| 36 #define SETTING_TAB_UPDATE_ON_START_REMOVE L"updateonstartremove" | 33 #define SETTING_TAB_UPDATE_ON_START_REMOVE L"updateonstartremove" |
| 37 #define SETTING_TAB_DICTIONARY_VERSION L"dictionaryversion" | 34 #define SETTING_TAB_DICTIONARY_VERSION L"dictionaryversion" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 CString GetString(const CString& key, const CString& defaultValue=L"") const; | 112 CString GetString(const CString& key, const CString& defaultValue=L"") const; |
| 116 void SetString(const CString& key, const CString& value); | 113 void SetString(const CString& key, const CString& value); |
| 117 | 114 |
| 118 int GetValue(const CString& key, int defaultValue=0) const; | 115 int GetValue(const CString& key, int defaultValue=0) const; |
| 119 void SetValue(const CString& key, int value); | 116 void SetValue(const CString& key, int value); |
| 120 | 117 |
| 121 bool GetBool(const CString& key, bool defaultValue) const; | 118 bool GetBool(const CString& key, bool defaultValue) const; |
| 122 void SetBool(const CString& key, bool value); | 119 void SetBool(const CString& key, bool value); |
| 123 | 120 |
| 124 bool IsPluginEnabled() const; | 121 bool IsPluginEnabled() const; |
| 125 bool IsPluginUpdateAvailable() const; | |
| 126 | 122 |
| 127 bool IsPluginSelftestEnabled(); | 123 bool IsPluginSelftestEnabled(); |
| 128 | 124 |
| 129 bool FilterlistExpired(CString filterlist) const; | 125 bool FilterlistExpired(CString filterlist) const; |
| 130 bool SetFilterRefreshDate(CString filterlist, time_t refreshtime); | 126 bool SetFilterRefreshDate(CString filterlist, time_t refreshtime); |
| 131 | 127 |
| 132 std::map<CString, CString> GetFilterLanguageTitleList() const; | 128 std::map<CString, CString> GetFilterLanguageTitleList() const; |
| 133 | 129 |
| 134 void SetMainProcessId(); | 130 void SetMainProcessId(); |
| 135 void SetMainProcessId(DWORD id); | 131 void SetMainProcessId(DWORD id); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 void ClearWhitelist(); | 205 void ClearWhitelist(); |
| 210 bool ReadWhitelist(bool bDebug=true); | 206 bool ReadWhitelist(bool bDebug=true); |
| 211 | 207 |
| 212 public: | 208 public: |
| 213 void AddWhiteListedDomain(const CString& domain); | 209 void AddWhiteListedDomain(const CString& domain); |
| 214 bool IsWhiteListedDomain(const CString& domain) const; | 210 bool IsWhiteListedDomain(const CString& domain) const; |
| 215 int GetWhiteListedDomainCount() const; | 211 int GetWhiteListedDomainCount() const; |
| 216 std::vector<std::string> GetWhiteListedDomainList(); | 212 std::vector<std::string> GetWhiteListedDomainList(); |
| 217 #endif //SUPPORT_WHITELIST | 213 #endif //SUPPORT_WHITELIST |
| 218 | 214 |
| 219 bool MakeRequestForUpdate(); | |
| 220 bool RefreshWhitelist(); | 215 bool RefreshWhitelist(); |
| 221 DWORD GetWindowsBuildNumber(); | 216 DWORD GetWindowsBuildNumber(); |
| 222 | 217 |
| 223 void SetSubscription(BSTR language); | 218 void SetSubscription(BSTR language); |
| 224 void SetSubscription(std::string language); | 219 void SetSubscription(std::string language); |
| 225 void SetDefaultSubscription(); | 220 void SetDefaultSubscription(); |
| 226 CString GetSubscription(); | 221 CString GetSubscription(); |
| 227 void RefreshFilterlist(); | 222 void RefreshFilterlist(); |
| 228 | 223 |
| 229 std::vector<SubscriptionDescription> m_subscriptions; | 224 std::vector<SubscriptionDescription> m_subscriptions; |
| 230 }; | 225 }; |
| 231 | 226 |
| 232 | 227 |
| 233 #endif // _PLUGIN_SETTINGS_H_ | 228 #endif // _PLUGIN_SETTINGS_H_ |
| OLD | NEW |