| LEFT | RIGHT |
| (no file at all) | |
| 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 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 bool m_isFirstRun; | 63 bool m_isFirstRun; |
| 64 bool m_isFirstRunUpdate; | 64 bool m_isFirstRunUpdate; |
| 65 | 65 |
| 66 DWORD m_dwMainProcessId; | 66 DWORD m_dwMainProcessId; |
| 67 DWORD m_dwMainThreadId; | 67 DWORD m_dwMainThreadId; |
| 68 DWORD m_dwMainUiThreadId; | 68 DWORD m_dwMainUiThreadId; |
| 69 DWORD m_dwWorkingThreadId; | 69 DWORD m_dwWorkingThreadId; |
| 70 | 70 |
| 71 CString m_tabNumber; | 71 CString m_tabNumber; |
| 72 | 72 |
| 73 #ifdef SUPPORT_WHITELIST | |
| 74 TDomainList m_domainList; | |
| 75 TDomainHistory m_domainHistory; | |
| 76 #endif | |
| 77 | |
| 78 CPluginSettings::TProperties m_properties; | 73 CPluginSettings::TProperties m_properties; |
| 79 | 74 |
| 80 bool m_isDirty; | 75 bool m_isDirty; |
| 81 | 76 |
| 82 CString m_settingsVersion; | 77 CString m_settingsVersion; |
| 83 std::auto_ptr<CPluginIniFileW> m_settingsFile; | 78 std::auto_ptr<CPluginIniFileW> m_settingsFile; |
| 84 | 79 |
| 85 static WCHAR* s_dataPath; | 80 static WCHAR* s_dataPath; |
| 86 static WCHAR* s_dataPathParent; | 81 static WCHAR* s_dataPathParent; |
| 87 | 82 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 bool IsPluginUpdateAvailable() const; | 132 bool IsPluginUpdateAvailable() const; |
| 138 | 133 |
| 139 bool IsPluginSelftestEnabled(); | 134 bool IsPluginSelftestEnabled(); |
| 140 | 135 |
| 141 bool FilterlistExpired(CString filterlist) const; | 136 bool FilterlistExpired(CString filterlist) const; |
| 142 bool FilterShouldLoad(CString filterlist) const; | 137 bool FilterShouldLoad(CString filterlist) const; |
| 143 bool SetFilterRefreshDate(CString filterlist, time_t refreshtime); | 138 bool SetFilterRefreshDate(CString filterlist, time_t refreshtime); |
| 144 | 139 |
| 145 std::map<CString, CString> GetFilterLanguageTitleList() const; | 140 std::map<CString, CString> GetFilterLanguageTitleList() const; |
| 146 | 141 |
| 147 #ifdef SUPPORT_WHITELIST | |
| 148 | |
| 149 void AddDomainToHistory(const CString& domain); | |
| 150 TDomainHistory GetDomainHistory() const; | |
| 151 | |
| 152 #endif // SUPPORT_WHITELIST | |
| 153 | |
| 154 void SetMainProcessId(); | 142 void SetMainProcessId(); |
| 155 void SetMainProcessId(DWORD id); | 143 void SetMainProcessId(DWORD id); |
| 156 bool IsMainProcess(DWORD dwProcessId=0) const; | 144 bool IsMainProcess(DWORD dwProcessId=0) const; |
| 157 | 145 |
| 158 void SetMainUiThreadId(); | 146 void SetMainUiThreadId(); |
| 159 void SetMainUiThreadId(DWORD id); | 147 void SetMainUiThreadId(DWORD id); |
| 160 bool IsMainUiThread(DWORD dwThread=0) const; | 148 bool IsMainUiThread(DWORD dwThread=0) const; |
| 161 | 149 |
| 162 void SetMainThreadId(); | 150 void SetMainThreadId(); |
| 163 void SetMainThreadId(DWORD id); | 151 void SetMainThreadId(DWORD id); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 void IncrementTabVersion(const CString& key); | 208 void IncrementTabVersion(const CString& key); |
| 221 | 209 |
| 222 // Settings whitelist | 210 // Settings whitelist |
| 223 #ifdef SUPPORT_WHITELIST | 211 #ifdef SUPPORT_WHITELIST |
| 224 | 212 |
| 225 private: | 213 private: |
| 226 | 214 |
| 227 bool m_isDirtyWhitelist; | 215 bool m_isDirtyWhitelist; |
| 228 DWORD m_WindowsBuildNumber; | 216 DWORD m_WindowsBuildNumber; |
| 229 | 217 |
| 230 TDomainList m_whitelist; | |
| 231 TDomainList m_whitelistToGo; | |
| 232 | |
| 233 std::auto_ptr<CPluginIniFileW> m_settingsFileWhitelist; | 218 std::auto_ptr<CPluginIniFileW> m_settingsFileWhitelist; |
| 219 std::vector<std::string> m_whitelistedDomains; |
| 234 | 220 |
| 235 void ClearWhitelist(); | 221 void ClearWhitelist(); |
| 236 | |
| 237 bool ReadWhitelist(bool bDebug=true); | 222 bool ReadWhitelist(bool bDebug=true); |
| 238 bool WriteWhitelist(bool bDebug=true); | 223 |
| 239 | 224 public: |
| 240 public: | 225 |
| 241 | 226 void AddWhiteListedDomain(const CString& domain); |
| 242 void AddWhiteListedDomain(const CString& domain, int reason=1, bool isToGo=fal
se); | |
| 243 void RemoveWhiteListedDomainsToGo(const TDomainList& domains); | |
| 244 void ReplaceWhiteListedDomains(const TDomainList& domains); | |
| 245 bool IsWhiteListedDomain(const CString& domain) const; | 227 bool IsWhiteListedDomain(const CString& domain) const; |
| 246 int GetWhiteListedDomainCount() const; | 228 int GetWhiteListedDomainCount() const; |
| 247 TDomainList GetWhiteListedDomainList(bool isToGo=false) const; | 229 std::vector<std::string> GetWhiteListedDomainList(bool isToGo=false); |
| 248 | 230 |
| 249 bool MakeRequestForUpdate(); | 231 bool MakeRequestForUpdate(); |
| 250 bool RefreshWhitelist(); | 232 bool RefreshWhitelist(); |
| 251 DWORD GetWindowsBuildNumber(); | 233 DWORD GetWindowsBuildNumber(); |
| 252 | 234 |
| 253 void SetSubscription(BSTR language); | 235 void SetSubscription(BSTR language); |
| 254 void SetSubscription(std::string language); | 236 void SetSubscription(std::string language); |
| 255 CString GetSubscription(); | 237 CString GetSubscription(); |
| 256 void RefreshFilterlist(); | 238 void RefreshFilterlist(); |
| 257 #endif //SUPPORT_WHITELIST | 239 #endif //SUPPORT_WHITELIST |
| 258 | 240 |
| 259 std::vector<AdblockPlus::SubscriptionPtr> m_subscriptions; | 241 std::vector<AdblockPlus::SubscriptionPtr> m_subscriptions; |
| 260 }; | 242 }; |
| 261 | 243 |
| 262 | 244 |
| 263 #endif // _PLUGIN_SETTINGS_H_ | 245 #endif // _PLUGIN_SETTINGS_H_ |
| LEFT | RIGHT |