|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Implements interface for Logs event |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __Logs_Engine_CLogsEngine_H__ |
|
21 #define __Logs_Engine_CLogsEngine_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <f32file.h> |
|
26 #include <logcli.h> |
|
27 |
|
28 #include "MLogsObserver.h" |
|
29 #include "MLogsCallObserver.h" |
|
30 #include "TLogsEventStrings.h" |
|
31 #include "LogsEng.hrh" |
|
32 #include "CLogsClearNewMissed.h" |
|
33 #include "MLogsClearNewMissed.h" |
|
34 |
|
35 // FORWARD DECLARATION |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 class MLogsModel; |
|
40 class MLogsClearLog; |
|
41 class MLogsStateHolder; |
|
42 class MLogsReader; |
|
43 //class TPreferredPbkStore; |
|
44 class MLogsConfig; |
|
45 class MLogsGetEvent; |
|
46 class MLogsSharedData; |
|
47 class MLogsSystemAgent; |
|
48 class CCnvCharacterSetConverter; |
|
49 class CLogsCntLinkChecker; |
|
50 |
|
51 /** |
|
52 * Implements entry point class to LogsEngine.dll |
|
53 */ |
|
54 class CLogsEngine : public CBase, |
|
55 public MLogsObserver, |
|
56 public MLogsCallObserver |
|
57 { |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Constructor. |
|
63 * |
|
64 * @return CLogsEngine object |
|
65 */ |
|
66 IMPORT_C static CLogsEngine* NewL(); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 IMPORT_C virtual ~CLogsEngine(); |
|
72 |
|
73 private: |
|
74 |
|
75 /** |
|
76 * C++ default constructor. |
|
77 */ |
|
78 CLogsEngine(); |
|
79 |
|
80 |
|
81 /** |
|
82 * Second phase of construction |
|
83 */ |
|
84 void ConstructL(); |
|
85 |
|
86 void DeleteClearNewMissedL(); |
|
87 |
|
88 |
|
89 public: |
|
90 |
|
91 /** |
|
92 * Model getter |
|
93 * |
|
94 * @param aModel model identificator |
|
95 * @return pointer to model |
|
96 */ |
|
97 IMPORT_C MLogsModel* Model( TLogsModel aModel ) const; |
|
98 |
|
99 /** |
|
100 * DB clearer getter |
|
101 * |
|
102 * @return pointer to db clearer object |
|
103 */ |
|
104 IMPORT_C MLogsClearLog* ClearLogsL(); |
|
105 |
|
106 /** |
|
107 * Event writer getter |
|
108 * |
|
109 * @return pointer to event writer object |
|
110 */ |
|
111 IMPORT_C MLogsClearNewMissed* ClearNewMissedL(); |
|
112 |
|
113 /** |
|
114 * DB event updater |
|
115 * @param aStore preferred phonebook storage for searching contacts |
|
116 * |
|
117 * @return pointer to db event updater |
|
118 */ |
|
119 IMPORT_C MLogsReader* EventUpdaterL(); |
|
120 |
|
121 /** |
|
122 * CntLinkChecker getter |
|
123 * |
|
124 * @return pointer to CntLink checker object |
|
125 */ |
|
126 IMPORT_C CLogsCntLinkChecker* CntLinkCheckerL(); |
|
127 |
|
128 /** |
|
129 * DB configurator getter |
|
130 * |
|
131 * @return pointer to db configurator |
|
132 */ |
|
133 IMPORT_C MLogsConfig* ConfigL(); |
|
134 |
|
135 /** |
|
136 * Getter for log event getter |
|
137 * |
|
138 * @return pointer to log event getter |
|
139 */ |
|
140 IMPORT_C MLogsGetEvent* GetEventL(); |
|
141 |
|
142 /** |
|
143 * Shared data getter |
|
144 * |
|
145 * @return pointer to shared data object |
|
146 */ |
|
147 IMPORT_C MLogsSharedData* SharedDataL(); |
|
148 |
|
149 /** |
|
150 * System agent getter |
|
151 * |
|
152 * @return pointer to system agent object |
|
153 */ |
|
154 IMPORT_C MLogsSystemAgent* SystemAgentL(); |
|
155 |
|
156 /** |
|
157 * Deletes log event getter |
|
158 */ |
|
159 IMPORT_C void DeleteGetEvent(); |
|
160 |
|
161 /** |
|
162 * Deletes log event updater |
|
163 */ |
|
164 IMPORT_C void DeleteEventUpdater(); |
|
165 |
|
166 /** |
|
167 * Deletes CntLink checker |
|
168 */ |
|
169 IMPORT_C void DeleteCntLinkChecker(); |
|
170 |
|
171 /** |
|
172 * Deletes sms event updater |
|
173 */ |
|
174 IMPORT_C void DeleteSMSEventUpdater(); |
|
175 |
|
176 /** |
|
177 * Deletes system agent object |
|
178 */ |
|
179 IMPORT_C void DeleteSystemAgent(); |
|
180 |
|
181 /** |
|
182 * Deletes log db configurator |
|
183 */ |
|
184 IMPORT_C void DeleteConfig(); |
|
185 |
|
186 /** |
|
187 * Deletes log db clearer |
|
188 */ |
|
189 IMPORT_C void DeleteClearLog(); |
|
190 |
|
191 /** |
|
192 * Model creator |
|
193 * |
|
194 * @param aModel model identificator |
|
195 */ |
|
196 IMPORT_C void CreateModelL( TLogsModel aModel ); |
|
197 |
|
198 /** |
|
199 * Starts matching SMS events with the phonebook and updating |
|
200 * @param aStore preferred phonebook storage for searching contacts |
|
201 */ |
|
202 IMPORT_C void StartSMSEventUpdaterL(); |
|
203 |
|
204 /** |
|
205 * Shared Data creator |
|
206 */ |
|
207 // IMPORT_C void CreateSharedDataL(); |
|
208 |
|
209 /** |
|
210 * Deletes all not-needed resources when switching the logs to |
|
211 * background mode. |
|
212 */ |
|
213 IMPORT_C void FreeResourcesForBGModeL(); |
|
214 |
|
215 /** |
|
216 * Converts 8-bit descriptor data to 16-bit format. |
|
217 * @param aForeignText Text to be converted |
|
218 * @param aConvertedText Text converted. model identificator |
|
219 * |
|
220 * @return KErrNone, if converted ok. Otherwise error code. |
|
221 */ |
|
222 IMPORT_C TInt ConvertToUnicode(const TDesC8& aForeignText, |
|
223 TDes16& aConvertedText); |
|
224 |
|
225 /** |
|
226 * Returns identification strings used by Log database |
|
227 * |
|
228 * @return strings used by Log database |
|
229 */ |
|
230 IMPORT_C TLogsEventStrings CLogsEngine::LogDbStrings(); |
|
231 |
|
232 /** |
|
233 * Returns reference to CLogClient. |
|
234 * |
|
235 * @return pointer to CLogClient |
|
236 */ |
|
237 IMPORT_C CLogClient* CLogClientRef(); |
|
238 |
|
239 public: // from MLogsObserver |
|
240 |
|
241 void StateChangedL( MLogsStateHolder* aHolder ); |
|
242 |
|
243 public: // from MLogsCallObserver |
|
244 |
|
245 void CallStateChangedL( TInt aCallState ); |
|
246 |
|
247 private: // data |
|
248 |
|
249 /// Ref: |
|
250 CLogClient* iLogClient; |
|
251 |
|
252 /// Own: |
|
253 TLogsEventStrings iStrings; |
|
254 |
|
255 /// Own: file server session |
|
256 RFs iFsSession; |
|
257 |
|
258 /// Own: main ( log ) model |
|
259 MLogsModel* iMainModel; |
|
260 |
|
261 /// Own: recent received model |
|
262 MLogsModel* iReceivedModel; |
|
263 |
|
264 /// Own: recent dialled model |
|
265 MLogsModel* iDialledModel; |
|
266 |
|
267 /// Own: recent missed model |
|
268 MLogsModel* iMissedModel; |
|
269 |
|
270 /// Own: clearing log db object |
|
271 MLogsClearLog* iClearLogs; |
|
272 |
|
273 CLogsClearNewMissed* iClearNewMissed; |
|
274 |
|
275 /// Own: sms event updater |
|
276 MLogsReader* iSMSUpdater; |
|
277 |
|
278 /// Own: event updater |
|
279 MLogsReader* iEventUpdater; |
|
280 |
|
281 /// Own: CntLink checker |
|
282 CLogsCntLinkChecker* iCntLinkChecker; |
|
283 |
|
284 /// Own: log db configuration |
|
285 MLogsConfig* iConfig; |
|
286 |
|
287 /// Own: log get event |
|
288 MLogsGetEvent* iGetEvent; |
|
289 |
|
290 /// Own: shared data |
|
291 MLogsSharedData* iSharedData; |
|
292 |
|
293 /// Own: system agent |
|
294 MLogsSystemAgent* iSystemAgent; |
|
295 |
|
296 /// Own: Unicode converter |
|
297 CCnvCharacterSetConverter* iConverter; |
|
298 }; |
|
299 |
|
300 #endif // __Logs_Engine_CLogsEngine_H__ |
|
301 |
|
302 |
|
303 |
|
304 // End of File |