OSDN Git Service

規定のブラウザとのクッキー共有機能実装
[nlite/nlite.git] / nlite / nlite_property.h
1 #pragma once
2
3 namespace nlite{
4
5
6
7         ///
8         ///\83R\83\81\83\93\83g\83r\83\85\81[\90Ý\92è
9         ///
10         struct CommentViewProperty{
11
12                 
13                 enum CommentTimeType{
14                         WriteTimeType,
15                         StreamingTimeType
16
17                 };
18
19         
20         
21
22         public:
23                 INT_PTR headerholSize[COMMENTVIEW_HEADERITEMSIZE];                      //\83w\83b\83_\89¡\83T\83C\83Y
24                 INT_PTR headerOrderArray[COMMENTVIEW_HEADERITEMSIZE];           //\83w\83b\83_\95À\82Ñ\8f\87\94z\97ñ
25                 BOOL commentFoldingFlag;                                                                        //\83R\83\81\83\93\83g\90Ü\82è\82½\82½\82Ý\83t\83\89\83O
26                 UINT_PTR commentTimeType;                                                                       //\83R\83\81\83\93\83g\8e\9e\8aÔ\95\\8e¦\83^\83C\83v
27                 COLORREF backColor;                                                                                     //\8aî\92ê\82Ì\94w\8ci\90F
28                 COLORREF selectBackColor;                                                                       //\91I\91ð\8e\9e\82Ì\94w\8ci\90F
29                 COLORREF selectSellLineColor;                                                           //\91I\91ð\8e\9e\82Ì\98g\90ü
30                 COLORREF normalSellLineColor;                                                           //\92Ê\8fí\8e\9e\82Ì\98g\90ü
31                 COLORREF baseStringColor;                                                                       //\8aî\92ê\82Ì\95\8e\9a\90F
32                 COLORREF ownerStringColor;                                                                      //\89^\89c\95\8e\9a\90F
33                 COLORREF linkStringColor;                                                                       //\8aî\92ê\82Ì\83n\83C\83p\81[\83\8a\83\93\83N\82Ì\90F
34                 COLORREF anonymousIDLinkColor;                                                          //\93½\96¼ID\95\\8e¦\90F
35                 COLORREF colLineColor;                                                                          //\8d\80\96Ú\82Ì\8fc\90ü
36
37
38                 ///
39                 ///\83R\83\93\83X\83g\83\89\83N\83^
40                 ///
41                 CommentViewProperty();
42         };
43
44         ///
45         ///\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\90Ý\92è
46         ///
47         struct CommentReadProperty{
48
49         public:
50
51                 BOOL commentReadFlag;                                                           //\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83t\83\89\83O
52                 BOOL ngWordReadFlag;                                                            //NG\83\8f\81[\83h\93Ç\82Ý\8fã\82°\83t\83\89\83O
53                 BOOL ngUserReadFlag;                                                            //NG\83\86\81[\83U\81[\93Ç\82Ý\8fã\82°\83t\83\89\83O
54                 BOOL administratorCommentReadFlag;                                      //\89^\89c\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83t\83\89\83O
55                 BOOL bspReadFlag;                                                                       //\83o\83b\83N\83X\83e\81[\83W\83p\83X\93Ç\82Ý\8fã\82°\83t\83\89\83O
56                 BOOL userCommentReadFlag;                                                       //\83\86\81[\83U\81[\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83t\83\89\83O
57                 BOOL teropReadFlag;                                                                     //\83e\83\8d\83b\83v\93Ç\82Ý\8fã\82°\83t\83\89\83O
58                 BOOL newLineReadFlag;                                                           //\89ü\8ds\93Ç\82Ý\8fã\82°\83t\83\89\83O
59                 BOOL besideLengthFlag;                                                          //\93Ç\82Ý\8fã\82°\83T\83C\83Y\8c\88\92è\83t\83\89\83O
60                 UINT_PTR maxCommentLength;                                                      //\93Ç\82Ý\8fã\82°\83T\83C\83Y\90Ý\92è\8e\9e\82Ì\8dÅ\91å\83T\83C\83Y
61                 CNLiteString shortComment;                                                      //\8fÈ\97ª\8e\9e\82É\93Ç\82Ý\8fã\82°\82é\95\8e\9a\97ñ
62                 CNLiteString outString;                                                         //\93Ç\82Ý\8fã\82°\8f\9c\8aO\95\8e\9a\97ñ
63                 
64                 ///
65                 ///\83R\83\93\83X\83g\83\89\83N\83^
66                 ///
67                 CommentReadProperty();
68         };
69
70         ///
71         ///\88ê\94Ê\90Ý\92è
72         ///
73         struct GeneralProperty{
74
75         public:
76                 CNLiteString browserPath;                                       //\83u\83\89\83E\83U\82Ì\83p\83X
77                 BOOL userCountUpdateFlag;                                       //\97\88\8fê\8eÒ\90\94\82ð\8dX\90V\82·\82é\82©\82Ì\83t\83\89\83O
78                 BOOL commentLogAutoSaveFlag;                            //\83R\83\81\83\93\83g\8e©\93®\95Û\91\97p\82Ì\83t\83\89\83O
79                 CNLiteString commentPath;                                       //\83R\83\81\83\93\83g\83\8d\83O\95Û\91\8fê\8f\8a
80                 BOOL defaultBrowserFlag;                                        //\83\8a\83\93\83N\82ð\8aJ\82­\8dÛ\82É\8aî\92ê\82Ì\83u\83\89\83E\83U\82ð\8eg\97p\82·\82é\82©\82Ì\83t\83\89\83O
81                 BOOL autoNameRegisterFlag;                                      //\83\86\81[\83U\96¼\8e©\93®\93o\98^\83t\83\89\83O
82                 BOOL autoNameUpdateFlag;                                        //\8dX\90V\82µ\82Ä\8e©\93®\93o\98^\82·\82é\83t\83\89\83O
83                 BOOL numberNameFlag;                                            //\90\94\8e\9a\82Ì\82Ý\82Ì\96¼\91O\82ð\8b\96\89Â\82·\82é\82©\82Ì\83t\83\89\83O
84                 BOOL  autoColorRegisterFlag;                            //\96¼\91O\93o\98^\8e\9d\82É\90F\82ð\8e©\93®\93I\82É\8ew\92è\82·\82é\82©\82Ì\83t\83\89\83O
85                 BOOL activeCountTimeFlag;                                       //\83A\83N\83e\83B\83u\90l\90\94\82ð\8e©\93®\8dX\90V\82·\82é\82©\82Ì\83t\83\89\83O
86                 BROWSERTYPE browserType;                                        //\83u\83\89\83E\83U\83^\83C\83v
87                 BOOL ncvUserSettingReadedFlag;                          //ncv\83\8a\83X\83i\81[\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý\8dÏ\82Ý\83t\83\89\83O
88                 
89
90                 ///
91                 ///\83R\83\93\83X\83g\83\89\83N\83^
92                 ///
93                 GeneralProperty();
94                 
95         };
96         
97
98         ///
99         ///\83\81\83C\83\93\90Ý\92è
100         ///
101         struct MainFrameProperty{
102
103
104         public:
105
106                 SIZE windowSize;                                                        //\83E\83B\83\93\83h\83E\83T\83C\83Y
107                 BOOL windowFrontFlag;                                           //\83E\83B\83\93\83h\83E\8dÅ\91O\96Ê\95\\8e¦\83t\83\89\83O
108
109
110                 ///
111                 ///\83R\83\93\83X\83g\83\89\83N\83^
112                 ///
113                 MainFrameProperty();
114                 
115                 
116
117         };
118
119         ///
120         ///nlite\90Ý\92è
121         ///
122         struct Property{
123
124         public:
125                 CommentViewProperty cvp;                                        //\83R\83\81\83\93\83g\83r\83\85\81[\83v\83\8d\83p\83e\83B
126                 MainFrameProperty mfp;                                          //\83\81\83C\83\93\83E\83B\83\93\83h\83E\83v\83\8d\83p\83e\83B
127                 GeneralProperty gp;                                                     //\8b¤\97L\83v\83\8d\83p\83e\83B
128                 CommentReadProperty crp;                                        //\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83v\83\8d\83p\83e\83B
129                 CNLiteString appLocalPath;                                      //\83\8d\81[\83J\83\8b\83t\83H\83\8b\83_\83p\83X
130                 CNLiteString propertyFolderPath;                        //\83v\83\8d\83p\83e\83B\94z\92u\82ª\8bL\8dÚ\82³\82ê\82½\83t\83H\83\8b\83_
131                 CNLiteString propertySaveFolderPath;            //\83v\83\8d\83p\83e\83B\83f\81[\83^\95Û\91\90æ\83t\83H\83\8b\83_
132                 CNLiteString propertyPath;                                      //\83v\83\8d\83p\83e\83B\83t\83@\83C\83\8b\83p\83X
133                 CNLiteString listenerDataPath;                          //\83\8a\83X\83i\81[\8fî\95ñ\90Ý\92è\83t\83@\83C\83\8b\83p\83X
134                 Property();
135
136                 ~Property();
137
138                 
139
140         private:
141                 VOID CreatePropertyFile();
142
143         public:
144                 VOID Initialize();
145
146                 VOID ReadProperty();
147
148
149                 VOID WriteProperty();
150
151                 BROWSERTYPE CookieSetting();
152
153                 
154
155         };
156
157
158         ///
159         ///\90Ý\92è\83t\83@\83C\83\8b\82Ìxml\93Ç\82Ý\8eæ\82è\97p\83N\83\89\83X
160         ///
161         class ReadPropertyXML:public CXmlParser{
162
163         private:
164
165                 Property &nliteProperty;
166
167                 struct Node{
168
169                         enum type{
170                                 None,
171                                 CommentReadProperty,
172                                 CommentViewProperty,
173                                 MainFrameProperty,
174                                 GeneralProperty
175                         };
176                 };
177
178                 
179                 Node::type propertyType;                        //\83v\83\8d\83p\83e\83B\82Ì\83^\83C\83v
180                 tstring nodeName;                                       //\83m\81[\83h\96¼
181
182
183
184         public:
185                 ///
186                 ///\83R\83\93\83X\83g\83\89\83N\83^
187                 ///
188                 ReadPropertyXML(Property &in_property);
189
190
191
192                 void OnStartElement (const XML_Char *pszName, const XML_Char **papszAttrs);
193
194                 void OnEndElement (const XML_Char *pszName);
195
196                 void OnCharacterData (const XML_Char *pszData, int nLength);
197         };
198
199
200         
201
202
203 }