Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginConfiguration.h

Issue 11013110: Cleanup (Closed)
Patch Set: More beautification and addressing comments Created July 29, 2013, 12:13 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/PluginConfig.cpp ('k') | src/plugin/PluginConfiguration.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef _PLUGIN_CONFIGURATION_H_
2 #define _PLUGIN_CONFIGURATION_H_
3
4
5 #include "PluginTypedef.h"
6
7
8 class CPluginConfiguration
9 {
10
11 public:
12
13 // Inject the userid and version id into the class when constructing
14 CPluginConfiguration();
15
16 // Refresh (download) configuration
17 bool Download();
18 void Invalidate();
19
20 // Is configuration valid
21 bool IsValid() const;
22 bool IsValidUserId() const;
23 bool IsValidPluginExpired() const;
24 bool IsValidPluginInfoPanel() const;
25 bool IsValidDictionary() const;
26 #ifdef SUPPORT_FILTER
27 bool IsValidFilter() const;
28 #endif
29 #ifdef SUPPORT_WHITELIST
30 bool IsValidWhiteList() const;
31 #endif
32 #ifdef SUPPORT_CONFIG
33 bool IsValidConfig() const;
34 #endif
35
36 // General plugin status
37 bool IsPluginActivated() const;
38 bool IsPluginRegistered() const;
39 bool IsPluginActivateEnabled() const;
40 bool IsPluginExpired() const;
41
42 int GetAdBlockLimit() const;
43 CString GetUserId() const;
44
45 int GetPluginInfoPanel() const;
46
47 // Dictionary information
48 int GetDictionaryVersion() const;
49 CString GetDictionaryUrl() const;
50
51 #ifdef SUPPORT_CONFIG
52 CString GetConfigUrl() const;
53 int GetConfigVersion() const;
54 #endif // SUPPORT_CONFIG
55
56 private:
57
58 bool m_isValid;
59 bool m_isValidUserId;
60 bool m_isValidPluginActivated;
61 bool m_isValidPluginActivateEnabled;
62 bool m_isValidPluginExpired;
63 bool m_isValidPluginInfoPanel;
64 bool m_isValidDictionary;
65 bool m_isPluginRegistered;
66 int m_adBlockLimit;
67 #ifdef SUPPORT_WHITELIST
68 bool m_isValidWhiteList;
69 #endif
70 #ifdef SUPPORT_FILTER
71 bool m_isValidFilter;
72 #endif
73 #ifdef SUPPORT_CONFIG
74 bool m_isValidConfig;
75 #endif
76
77 // General plugin status
78 bool m_isPluginActivated;
79 bool m_isPluginActivateEnabled;
80 bool m_isPluginExpired;
81
82 // User registration
83 CString m_userId;
84
85 // Dictionary that currently can be downloaded from the server
86 int m_dictionaryVersion;
87 CString m_dictionaryUrl;
88
89 int m_pluginInfoPanel;
90
91 #ifdef SUPPORT_FILTER
92 int m_filterVersion;
93 std::map<CString, CString> m_filterFileNameList;
94 #endif
95
96 #ifdef SUPPORT_CONFIG
97 CString m_configUrl;
98 int m_configVersion;
99 #endif // SUPPORT_CONFIG
100 };
101
102
103 #endif // _PLUGIN_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « src/plugin/PluginConfig.cpp ('k') | src/plugin/PluginConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld