|
1 /* |
|
2 * Copyright (c) 2009 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 the License "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 * %created_by: shreedha % |
|
16 * %date_created: Wed Feb 25 10:09:03 2009 % |
|
17 * |
|
18 */ |
|
19 |
|
20 /********************************************************************** |
|
21 * |
|
22 * Header %name: loggingsyncservice.h % |
|
23 * Instance: bh1sapi_1 |
|
24 * Description: |
|
25 * %created_by: shreedha % |
|
26 * %date_created: Wed Feb 25 10:09:03 2009 % |
|
27 * |
|
28 **********************************************************************/ |
|
29 #ifndef LOGGINGSERVICE_H |
|
30 #define LOGGINGSERVICE_H |
|
31 |
|
32 #include <logwrap.h> |
|
33 #include <logcli.h> |
|
34 |
|
35 |
|
36 /** |
|
37 * Forward declaration |
|
38 */ |
|
39 class CLogViewEvent ; |
|
40 class CLogIter ; |
|
41 |
|
42 /** |
|
43 * CLogSyncService: Deligator class declariation, this is a wrapper class |
|
44 * for all the functionalities offers by symbian logging service. |
|
45 * |
|
46 * This Class deligates the responsibilities to coreimp class for async |
|
47 * service |
|
48 */ |
|
49 |
|
50 class CLogSyncService: public CActive |
|
51 { |
|
52 |
|
53 public : |
|
54 |
|
55 /** |
|
56 * NewL: Two phased construction |
|
57 */ |
|
58 |
|
59 IMPORT_C static CLogSyncService *NewL() ; |
|
60 |
|
61 /** |
|
62 * NewLC: Creates an instance of CLogSyncServiceClass |
|
63 * Two Phased constructor |
|
64 * returns newly allocated object. |
|
65 */ |
|
66 |
|
67 static CLogSyncService* NewLC() ; |
|
68 |
|
69 /** |
|
70 * Add(): Adds a new event to event database.Synchronous |
|
71 * returns unique id of the event added in event database. |
|
72 */ |
|
73 |
|
74 IMPORT_C TLogId AddL( CLogEvent *aEvent ); |
|
75 |
|
76 /** |
|
77 * Deletes a event from the event database |
|
78 * @param aLogId Event id of the event in the database |
|
79 */ |
|
80 |
|
81 IMPORT_C TInt Delete( TLogId aId ) ; |
|
82 |
|
83 /** |
|
84 * GetList(): Gets the events as specified by filter |
|
85 * |
|
86 * @param aFilter, view filter |
|
87 */ |
|
88 |
|
89 CLogIter* GetListL( CLogFilter *aFilter ) ; |
|
90 |
|
91 /** |
|
92 * Returns the current event in the view |
|
93 */ |
|
94 |
|
95 inline const CLogEvent& Event() |
|
96 { |
|
97 return iLogViewEvents->Event() ; |
|
98 } |
|
99 |
|
100 /** |
|
101 * ReadRecentEvents, reads recentEvents from the list |
|
102 * |
|
103 * @param aRecentList, recentlist to be viewed |
|
104 * @param aFilter, filter for events to appear in view |
|
105 */ |
|
106 |
|
107 CLogIter* ReadRecentEventsL( TLogRecentList aRecentList , |
|
108 CLogFilter *aFilter = NULL ) ; |
|
109 |
|
110 /** |
|
111 * Gets the details of the event as specified by the |
|
112 * input paramater |
|
113 * |
|
114 * @param aEvent, details of the event to be fetched |
|
115 */ |
|
116 |
|
117 CLogIter* GetEventL( CLogEvent *aEvent ) ; |
|
118 |
|
119 |
|
120 /** |
|
121 * Default Destructor |
|
122 */ |
|
123 |
|
124 ~CLogSyncService() ; |
|
125 |
|
126 |
|
127 protected : |
|
128 |
|
129 /** |
|
130 * ConstructL(): Internal method to construct members |
|
131 */ |
|
132 |
|
133 void ConstructL() ; |
|
134 |
|
135 /** |
|
136 * Default constructor |
|
137 */ |
|
138 |
|
139 CLogSyncService() ; |
|
140 |
|
141 |
|
142 /** |
|
143 * DoInitialiseL(): Internal method to initialise members |
|
144 */ |
|
145 |
|
146 void DoInitialiseL() ; |
|
147 |
|
148 /** |
|
149 * From CActive |
|
150 */ |
|
151 |
|
152 void DoCancel() ; |
|
153 |
|
154 |
|
155 /** |
|
156 * From CActive |
|
157 */ |
|
158 void RunL() ; |
|
159 |
|
160 private: |
|
161 |
|
162 /** |
|
163 * Log Engine Handle |
|
164 */ |
|
165 CActiveSchedulerWait* iWaitScheduler; |
|
166 CLogClient* iLogClient ; |
|
167 CLogViewEvent* iLogViewEvents ; |
|
168 CLogViewRecent* iLogViewRecent ; |
|
169 RFs iFs ; |
|
170 TInt iTaskId ; |
|
171 |
|
172 |
|
173 }; |
|
174 |
|
175 #endif |