| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 public: | 64 public: |
| 65 ~CPluginSettings(); | 65 ~CPluginSettings(); |
| 66 | 66 |
| 67 static CPluginSettings* s_instance; | 67 static CPluginSettings* s_instance; |
| 68 | 68 |
| 69 static bool HasInstance(); | 69 static bool HasInstance(); |
| 70 static CPluginSettings* GetInstance(); | 70 static CPluginSettings* GetInstance(); |
| 71 | 71 |
| 72 bool IsPluginEnabled() const; | 72 bool IsPluginEnabled() const; |
| 73 | 73 |
| 74 std::map<CString, CString> GetFilterLanguageTitleList() const; | 74 std::map<std::wstring, std::wstring> GetFilterLanguageTitleList() const; |
| 75 | 75 |
| 76 void SetWorkingThreadId(); | 76 void SetWorkingThreadId(); |
| 77 void SetWorkingThreadId(DWORD id); | 77 void SetWorkingThreadId(DWORD id); |
| 78 bool IsWorkingThread(DWORD dwThread=0) const; | 78 bool IsWorkingThread(DWORD dwThread=0) const; |
| 79 | 79 |
| 80 DWORD m_WindowsBuildNumber; | 80 DWORD m_WindowsBuildNumber; |
| 81 | 81 |
| 82 public: | 82 public: |
| 83 | 83 |
| 84 void TogglePluginEnabled(); | 84 void TogglePluginEnabled(); |
| 85 bool GetPluginEnabled() const; | 85 bool GetPluginEnabled() const; |
| 86 | 86 |
| 87 void AddError(const CString& error, const CString& errorCode); | 87 void AddError(const CString& error, const CString& errorCode); |
|
Eric
2015/11/20 18:46:04
Removed in https://codereview.adblockplus.org/2932
| |
| 88 | 88 |
| 89 // Settings whitelist | 89 // Settings whitelist |
| 90 private: | 90 private: |
| 91 std::vector<std::wstring> m_whitelistedDomains; | 91 std::vector<std::wstring> m_whitelistedDomains; |
| 92 void ClearWhitelist(); | 92 void ClearWhitelist(); |
| 93 bool ReadWhitelist(bool bDebug=true); | 93 bool ReadWhitelist(bool bDebug=true); |
| 94 | 94 |
| 95 public: | 95 public: |
| 96 void AddWhiteListedDomain(const CString& domain); | 96 void AddWhiteListedDomain(const std::wstring& domain); |
| 97 void RemoveWhiteListedDomain(const CString& domain); | 97 void RemoveWhiteListedDomain(const std::wstring& domain); |
| 98 int GetWhiteListedDomainCount() const; | 98 int GetWhiteListedDomainCount() const; |
| 99 std::vector<std::wstring> GetWhiteListedDomainList(); | 99 std::vector<std::wstring> GetWhiteListedDomainList(); |
| 100 | 100 |
| 101 bool RefreshWhitelist(); | 101 bool RefreshWhitelist(); |
| 102 DWORD GetWindowsBuildNumber(); | 102 DWORD GetWindowsBuildNumber(); |
| 103 | 103 |
| 104 void SetSubscription(const std::wstring& url); | 104 void SetSubscription(const std::wstring& url); |
| 105 void SetDefaultSubscription(); | 105 std::wstring GetSubscription(); |
| 106 CString GetSubscription(); | |
| 107 CString GetAppLocale(); | |
| 108 CString GetDocumentationLink(); | |
|
Eric
2015/11/20 18:46:04
Inlined.
| |
| 109 }; | 106 }; |
| 110 | 107 |
| 111 std::wstring GetDataPath(const std::wstring& filename=L""); | 108 std::wstring GetDataPath(const std::wstring& filename=L""); |
| 112 | 109 |
| 113 #endif // _PLUGIN_SETTINGS_H_ | 110 #endif // _PLUGIN_SETTINGS_H_ |
| OLD | NEW |