LEFT | RIGHT |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 public: | 62 public: |
63 ~CPluginSettings(); | 63 ~CPluginSettings(); |
64 | 64 |
65 static CPluginSettings* s_instance; | 65 static CPluginSettings* s_instance; |
66 | 66 |
67 static bool HasInstance(); | 67 static bool HasInstance(); |
68 static CPluginSettings* GetInstance(); | 68 static CPluginSettings* GetInstance(); |
69 | 69 |
70 bool IsPluginEnabled() const; | 70 bool IsPluginEnabled() const; |
71 | 71 |
72 std::map<CString, CString> GetFilterLanguageTitleList() const; | 72 std::map<std::wstring, std::wstring> GetFilterLanguageTitleList() const; |
73 | |
74 DWORD m_WindowsBuildNumber; | |
75 | 73 |
76 public: | 74 public: |
77 | 75 |
78 void TogglePluginEnabled(); | 76 void TogglePluginEnabled(); |
79 bool GetPluginEnabled() const; | 77 bool GetPluginEnabled() const; |
80 | 78 |
81 void AddError(const CString& error, const CString& errorCode); | 79 void AddError(const CString& error, const CString& errorCode); |
82 | 80 |
83 // Settings whitelist | 81 // Settings whitelist |
84 private: | 82 private: |
85 std::vector<std::wstring> m_whitelistedDomains; | 83 std::vector<std::wstring> m_whitelistedDomains; |
86 void ClearWhitelist(); | 84 void ClearWhitelist(); |
87 bool ReadWhitelist(bool bDebug=true); | 85 bool ReadWhitelist(bool bDebug=true); |
88 | 86 |
89 public: | 87 public: |
90 void AddWhiteListedDomain(const CString& domain); | 88 void AddWhiteListedDomain(const std::wstring& domain); |
91 void RemoveWhiteListedDomain(const CString& domain); | 89 void RemoveWhiteListedDomain(const std::wstring& domain); |
92 int GetWhiteListedDomainCount() const; | 90 int GetWhiteListedDomainCount() const; |
93 std::vector<std::wstring> GetWhiteListedDomainList(); | 91 std::vector<std::wstring> GetWhiteListedDomainList(); |
94 | 92 |
95 bool RefreshWhitelist(); | 93 bool RefreshWhitelist(); |
96 DWORD GetWindowsBuildNumber(); | |
97 | 94 |
98 void SetSubscription(const std::wstring& url); | 95 void SetSubscription(const std::wstring& url); |
99 void SetDefaultSubscription(); | 96 std::wstring GetSubscription(); |
100 CString GetSubscription(); | |
101 CString GetAppLocale(); | |
102 CString GetDocumentationLink(); | |
103 }; | 97 }; |
104 | 98 |
105 #endif // _PLUGIN_SETTINGS_H_ | 99 #endif // _PLUGIN_SETTINGS_H_ |
LEFT | RIGHT |