| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 class CPluginSettings | 51 class CPluginSettings |
| 52 { | 52 { |
| 53 | 53 |
| 54 public: | 54 public: |
| 55 | 55 |
| 56 typedef std::map<CString, CString> TProperties; | 56 typedef std::map<CString, CString> TProperties; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 | 59 |
| 60 bool m_isFirstRun; | 60 bool m_isFirstRun; |
| 61 bool m_isFirstRunUpdate; | |
|
Wladimir Palant
2013/07/05 09:26:45
I think that these two properties and the correspo
| |
| 62 | 61 |
| 63 DWORD m_dwMainProcessId; | |
| 64 DWORD m_dwMainThreadId; | |
| 65 DWORD m_dwMainUiThreadId; | |
| 66 DWORD m_dwWorkingThreadId; | 62 DWORD m_dwWorkingThreadId; |
| 67 | 63 |
| 68 CString m_tabNumber; | |
| 69 | |
| 70 bool m_isDirty; | |
|
Wladimir Palant
2013/07/05 09:26:45
You can remove that property, all code using it ha
| |
| 71 | |
| 72 CString m_settingsVersion; | |
|
Wladimir Palant
2013/07/05 09:26:45
That property is unused.
| |
| 73 | |
| 74 static CComAutoCriticalSection s_criticalSectionLocal; | 64 static CComAutoCriticalSection s_criticalSectionLocal; |
| 75 #ifdef SUPPORT_WHITELIST | |
| 76 static CComAutoCriticalSection s_criticalSectionDomainHistory; | |
|
Wladimir Palant
2013/07/05 09:26:45
This property is unused.
| |
| 77 #endif | |
| 78 | 65 |
| 79 void Clear(); | 66 void Clear(); |
| 80 | 67 |
| 81 // Private constructor used by the singleton pattern | 68 // Private constructor used by the singleton pattern |
| 82 CPluginSettings(); | 69 CPluginSettings(); |
| 83 public: | 70 public: |
| 84 | 71 |
| 85 ~CPluginSettings(); | 72 ~CPluginSettings(); |
| 86 | 73 |
| 87 static CPluginSettings* s_instance; | 74 static CPluginSettings* s_instance; |
| 88 | 75 |
| 89 static bool s_isLightOnly; | |
|
Wladimir Palant
2013/07/05 09:26:45
This property seems unused.
| |
| 90 static bool HasInstance(); | 76 static bool HasInstance(); |
| 91 static CPluginSettings* GetInstance(); | 77 static CPluginSettings* GetInstance(); |
| 92 | 78 |
| 93 static CString GetDataPath(const CString& filename=L""); | 79 static CString GetDataPath(const CString& filename=L""); |
| 94 | 80 |
| 95 static CString GetTempPath(const CString& filename=L""); | |
| 96 static CString GetTempFile(const CString& prefix, const CString& extension=L"" ); | |
|
Wladimir Palant
2013/07/05 09:26:45
These two methods seem unused.
| |
| 97 | |
| 98 CString GetPluginId(); | |
|
Wladimir Palant
2013/07/05 09:26:45
This method isn't even implemented.
| |
| 99 | |
| 100 bool IsPluginEnabled() const; | 81 bool IsPluginEnabled() const; |
| 101 | 82 |
| 102 bool IsPluginSelftestEnabled(); | |
|
Wladimir Palant
2013/07/05 09:26:45
This method isn't even implemented.
| |
| 103 | |
| 104 bool FilterlistExpired(CString filterlist) const; | |
| 105 bool SetFilterRefreshDate(CString filterlist, time_t refreshtime); | |
|
Wladimir Palant
2013/07/05 09:26:45
These two methods aren't even implemented.
| |
| 106 | |
| 107 std::map<CString, CString> GetFilterLanguageTitleList() const; | 83 std::map<CString, CString> GetFilterLanguageTitleList() const; |
| 108 | |
| 109 void SetMainProcessId(); | |
| 110 void SetMainProcessId(DWORD id); | |
| 111 bool IsMainProcess(DWORD dwProcessId=0) const; | |
| 112 | |
| 113 void SetMainUiThreadId(); | |
| 114 void SetMainUiThreadId(DWORD id); | |
| 115 bool IsMainUiThread(DWORD dwThread=0) const; | |
| 116 | |
| 117 void SetMainThreadId(); | |
| 118 void SetMainThreadId(DWORD id); | |
| 119 bool IsMainThread(DWORD dwThread=0) const; | |
| 120 | 84 |
| 121 void SetWorkingThreadId(); | 85 void SetWorkingThreadId(); |
| 122 void SetWorkingThreadId(DWORD id); | 86 void SetWorkingThreadId(DWORD id); |
| 123 bool IsWorkingThread(DWORD dwThread=0) const; | 87 bool IsWorkingThread(DWORD dwThread=0) const; |
| 124 | 88 |
| 125 void SetFirstRun(); | 89 void SetFirstRun(); |
| 126 bool IsFirstRun() const; | 90 bool IsFirstRun() const; |
| 127 | |
| 128 void SetFirstRunUpdate(); | |
| 129 bool IsFirstRunUpdate() const; | |
| 130 | |
| 131 bool IsFirstRunAny() const; | |
| 132 | 91 |
| 133 static CString GetSystemLanguage(); | 92 static CString GetSystemLanguage(); |
| 134 DWORD m_WindowsBuildNumber; | 93 DWORD m_WindowsBuildNumber; |
| 135 | 94 |
| 136 private: | 95 private: |
| 137 | 96 |
| 138 bool m_isPluginEnabledTab; | 97 bool m_isPluginEnabledTab; |
| 139 | 98 |
| 140 public: | 99 public: |
| 141 | |
| 142 CString GetTabNumber() const; | |
| 143 | |
| 144 bool IncrementTabCount(); | |
| 145 bool DecrementTabCount(); | |
| 146 | 100 |
| 147 void TogglePluginEnabled(); | 101 void TogglePluginEnabled(); |
| 148 void SetPluginDisabled(); | 102 void SetPluginDisabled(); |
| 149 void SetPluginEnabled(); | 103 void SetPluginEnabled(); |
| 150 bool GetPluginEnabled() const; | 104 bool GetPluginEnabled() const; |
| 151 | 105 |
| 152 void AddError(const CString& error, const CString& errorCode); | 106 void AddError(const CString& error, const CString& errorCode); |
| 153 | 107 |
| 154 // Settings whitelist | 108 // Settings whitelist |
| 155 #ifdef SUPPORT_WHITELIST | 109 #ifdef SUPPORT_WHITELIST |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 166 int GetWhiteListedDomainCount() const; | 120 int GetWhiteListedDomainCount() const; |
| 167 std::vector<std::wstring> GetWhiteListedDomainList(); | 121 std::vector<std::wstring> GetWhiteListedDomainList(); |
| 168 #endif //SUPPORT_WHITELIST | 122 #endif //SUPPORT_WHITELIST |
| 169 | 123 |
| 170 bool RefreshWhitelist(); | 124 bool RefreshWhitelist(); |
| 171 DWORD GetWindowsBuildNumber(); | 125 DWORD GetWindowsBuildNumber(); |
| 172 | 126 |
| 173 void SetSubscription(const std::wstring& url); | 127 void SetSubscription(const std::wstring& url); |
| 174 void SetDefaultSubscription(); | 128 void SetDefaultSubscription(); |
| 175 CString GetSubscription(); | 129 CString GetSubscription(); |
| 176 void RefreshFilterlist(); | |
| 177 | 130 |
| 178 bool GetStatusBarAsked(); | 131 bool GetStatusBarAsked(); |
| 179 void SetStatusBarAsked(bool asked); | 132 void SetStatusBarAsked(); |
| 180 std::vector<SubscriptionDescription> m_subscriptions; | 133 std::vector<SubscriptionDescription> m_subscriptions; |
| 181 }; | 134 }; |
| 182 | 135 |
| 183 | 136 |
| 184 #endif // _PLUGIN_SETTINGS_H_ | 137 #endif // _PLUGIN_SETTINGS_H_ |
| LEFT | RIGHT |