sl@0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __LOGCLIENTOP_H__
|
sl@0
|
17 |
#define __LOGCLIENTOP_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <e32base.h>
|
sl@0
|
20 |
#include "logpackage.h"
|
sl@0
|
21 |
#include <logcli.h>
|
sl@0
|
22 |
#include "logservcli.h"
|
sl@0
|
23 |
#include "LogServShared.h"
|
sl@0
|
24 |
|
sl@0
|
25 |
/**
|
sl@0
|
26 |
@internalComponent
|
sl@0
|
27 |
*/
|
sl@0
|
28 |
NONSHARABLE_CLASS(CLogClientOp) : public CActive
|
sl@0
|
29 |
{
|
sl@0
|
30 |
public:
|
sl@0
|
31 |
void Start(TRequestStatus& aObserver);
|
sl@0
|
32 |
TInt Start();
|
sl@0
|
33 |
|
sl@0
|
34 |
protected:
|
sl@0
|
35 |
CLogClientOp(RLogSession& aSession, CLogPackage& aPackage, TLogOperationType aType, TInt aPriority);
|
sl@0
|
36 |
~CLogClientOp();
|
sl@0
|
37 |
void FetchResultFromServerL(TInt aResult);
|
sl@0
|
38 |
void SetDataSlot1(TInt aValue);
|
sl@0
|
39 |
|
sl@0
|
40 |
private:
|
sl@0
|
41 |
void RunL();
|
sl@0
|
42 |
void DoCancel();
|
sl@0
|
43 |
TInt RunError(TInt aError);
|
sl@0
|
44 |
TInt DoStartL();
|
sl@0
|
45 |
virtual void InitiateRequestToServerL()=0;
|
sl@0
|
46 |
virtual void CompleteL(TInt& aResult);
|
sl@0
|
47 |
|
sl@0
|
48 |
protected:
|
sl@0
|
49 |
CLogPackage& iPackage;
|
sl@0
|
50 |
RLogSession& iSession;
|
sl@0
|
51 |
TPckgBuf<TLogClientServerData> iData;
|
sl@0
|
52 |
|
sl@0
|
53 |
private:
|
sl@0
|
54 |
/**
|
sl@0
|
55 |
* The observer's request status
|
sl@0
|
56 |
*/
|
sl@0
|
57 |
TRequestStatus* iObserver;
|
sl@0
|
58 |
};
|
sl@0
|
59 |
|
sl@0
|
60 |
/**
|
sl@0
|
61 |
Add an event to the database
|
sl@0
|
62 |
@internalComponent
|
sl@0
|
63 |
*/
|
sl@0
|
64 |
NONSHARABLE_CLASS(CLogAddEventClientOp) : public CLogClientOp
|
sl@0
|
65 |
{
|
sl@0
|
66 |
public:
|
sl@0
|
67 |
CLogAddEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
68 |
void Start(CLogEvent& aEvent, TRequestStatus& aObserver);
|
sl@0
|
69 |
//
|
sl@0
|
70 |
private:
|
sl@0
|
71 |
void InitiateRequestToServerL();
|
sl@0
|
72 |
void CompleteL(TInt& aResult);
|
sl@0
|
73 |
//
|
sl@0
|
74 |
private:
|
sl@0
|
75 |
CLogEvent* iEvent;
|
sl@0
|
76 |
};
|
sl@0
|
77 |
|
sl@0
|
78 |
/**
|
sl@0
|
79 |
Change an event in the database
|
sl@0
|
80 |
@internalComponent
|
sl@0
|
81 |
*/
|
sl@0
|
82 |
NONSHARABLE_CLASS(CLogChangeEventClientOp) : public CLogClientOp
|
sl@0
|
83 |
{
|
sl@0
|
84 |
public:
|
sl@0
|
85 |
CLogChangeEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
86 |
void Start(const CLogEvent& aEvent, TRequestStatus& aObserver);
|
sl@0
|
87 |
//
|
sl@0
|
88 |
private:
|
sl@0
|
89 |
void InitiateRequestToServerL();
|
sl@0
|
90 |
//
|
sl@0
|
91 |
private:
|
sl@0
|
92 |
const CLogEvent* iEvent;
|
sl@0
|
93 |
};
|
sl@0
|
94 |
|
sl@0
|
95 |
/**
|
sl@0
|
96 |
Get an event from the database
|
sl@0
|
97 |
@internalComponent
|
sl@0
|
98 |
*/
|
sl@0
|
99 |
NONSHARABLE_CLASS(CLogGetEventClientOp) : public CLogClientOp
|
sl@0
|
100 |
{
|
sl@0
|
101 |
public:
|
sl@0
|
102 |
CLogGetEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
103 |
void Start(CLogEvent& aEvent, TRequestStatus& aObserver);
|
sl@0
|
104 |
//
|
sl@0
|
105 |
private:
|
sl@0
|
106 |
void InitiateRequestToServerL();
|
sl@0
|
107 |
void CompleteL(TInt& aResult);
|
sl@0
|
108 |
//
|
sl@0
|
109 |
private:
|
sl@0
|
110 |
CLogEvent* iEvent;
|
sl@0
|
111 |
};
|
sl@0
|
112 |
|
sl@0
|
113 |
/**
|
sl@0
|
114 |
Delete an event from the database
|
sl@0
|
115 |
@internalComponent
|
sl@0
|
116 |
*/
|
sl@0
|
117 |
NONSHARABLE_CLASS(CLogDeleteEventClientOp) : public CLogClientOp
|
sl@0
|
118 |
{
|
sl@0
|
119 |
public:
|
sl@0
|
120 |
CLogDeleteEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
121 |
void Start(TLogId aId, TRequestStatus& aObserver);
|
sl@0
|
122 |
//
|
sl@0
|
123 |
private:
|
sl@0
|
124 |
void InitiateRequestToServerL();
|
sl@0
|
125 |
//
|
sl@0
|
126 |
private:
|
sl@0
|
127 |
TLogId iId;
|
sl@0
|
128 |
};
|
sl@0
|
129 |
|
sl@0
|
130 |
/**
|
sl@0
|
131 |
Add an event type to the database
|
sl@0
|
132 |
@internalComponent
|
sl@0
|
133 |
*/
|
sl@0
|
134 |
NONSHARABLE_CLASS(CLogAddTypeClientOp) : public CLogClientOp
|
sl@0
|
135 |
{
|
sl@0
|
136 |
public:
|
sl@0
|
137 |
CLogAddTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
138 |
void Start(const CLogEventType& aEventType, TRequestStatus& aObserver);
|
sl@0
|
139 |
//
|
sl@0
|
140 |
private:
|
sl@0
|
141 |
void InitiateRequestToServerL();
|
sl@0
|
142 |
//
|
sl@0
|
143 |
private:
|
sl@0
|
144 |
const CLogEventType* iEventType;
|
sl@0
|
145 |
};
|
sl@0
|
146 |
|
sl@0
|
147 |
/**
|
sl@0
|
148 |
Change an event type in the database
|
sl@0
|
149 |
@internalComponent
|
sl@0
|
150 |
*/
|
sl@0
|
151 |
NONSHARABLE_CLASS(CLogChangeTypeClientOp) : public CLogClientOp
|
sl@0
|
152 |
{
|
sl@0
|
153 |
public:
|
sl@0
|
154 |
CLogChangeTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
155 |
void Start(const CLogEventType& aEventType, TRequestStatus& aObserver);
|
sl@0
|
156 |
//
|
sl@0
|
157 |
private:
|
sl@0
|
158 |
void InitiateRequestToServerL();
|
sl@0
|
159 |
//
|
sl@0
|
160 |
private:
|
sl@0
|
161 |
const CLogEventType* iEventType;
|
sl@0
|
162 |
};
|
sl@0
|
163 |
|
sl@0
|
164 |
/**
|
sl@0
|
165 |
Get event type details
|
sl@0
|
166 |
@internalComponent
|
sl@0
|
167 |
*/
|
sl@0
|
168 |
NONSHARABLE_CLASS(CLogGetTypeClientOp) : public CLogClientOp
|
sl@0
|
169 |
{
|
sl@0
|
170 |
public:
|
sl@0
|
171 |
CLogGetTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
172 |
void Start(CLogEventType& aEventType, TRequestStatus& aObserver);
|
sl@0
|
173 |
//
|
sl@0
|
174 |
private:
|
sl@0
|
175 |
void InitiateRequestToServerL();
|
sl@0
|
176 |
void CompleteL(TInt& aResult);
|
sl@0
|
177 |
//
|
sl@0
|
178 |
private:
|
sl@0
|
179 |
CLogEventType* iEventType;
|
sl@0
|
180 |
};
|
sl@0
|
181 |
|
sl@0
|
182 |
/**
|
sl@0
|
183 |
Delete an event type
|
sl@0
|
184 |
@internalComponent
|
sl@0
|
185 |
*/
|
sl@0
|
186 |
NONSHARABLE_CLASS(CLogDeleteTypeClientOp) : public CLogClientOp
|
sl@0
|
187 |
{
|
sl@0
|
188 |
public:
|
sl@0
|
189 |
CLogDeleteTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
190 |
void Start(TUid aUid, TRequestStatus& aObserver);
|
sl@0
|
191 |
//
|
sl@0
|
192 |
private:
|
sl@0
|
193 |
void InitiateRequestToServerL();
|
sl@0
|
194 |
//
|
sl@0
|
195 |
private:
|
sl@0
|
196 |
TUid iUid;
|
sl@0
|
197 |
};
|
sl@0
|
198 |
|
sl@0
|
199 |
/**
|
sl@0
|
200 |
Get engine configuration
|
sl@0
|
201 |
@internalComponent
|
sl@0
|
202 |
*/
|
sl@0
|
203 |
NONSHARABLE_CLASS(CLogGetConfigClientOp) : public CLogClientOp
|
sl@0
|
204 |
{
|
sl@0
|
205 |
public:
|
sl@0
|
206 |
CLogGetConfigClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
207 |
void Start(TLogConfig& aConfig, TRequestStatus& aObserver);
|
sl@0
|
208 |
//
|
sl@0
|
209 |
private:
|
sl@0
|
210 |
void InitiateRequestToServerL();
|
sl@0
|
211 |
void CompleteL(TInt& aResult);
|
sl@0
|
212 |
//
|
sl@0
|
213 |
private:
|
sl@0
|
214 |
TLogConfig* iConfig;
|
sl@0
|
215 |
};
|
sl@0
|
216 |
|
sl@0
|
217 |
/**
|
sl@0
|
218 |
Change the configuration
|
sl@0
|
219 |
@internalComponent
|
sl@0
|
220 |
*/
|
sl@0
|
221 |
NONSHARABLE_CLASS(CLogChangeConfigClientOp) : public CLogClientOp
|
sl@0
|
222 |
{
|
sl@0
|
223 |
public:
|
sl@0
|
224 |
CLogChangeConfigClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
225 |
void Start(const TLogConfig& aConfig, TRequestStatus& aObserver);
|
sl@0
|
226 |
//
|
sl@0
|
227 |
private:
|
sl@0
|
228 |
void InitiateRequestToServerL();
|
sl@0
|
229 |
//
|
sl@0
|
230 |
private:
|
sl@0
|
231 |
const TLogConfig* iConfig;
|
sl@0
|
232 |
};
|
sl@0
|
233 |
|
sl@0
|
234 |
/**
|
sl@0
|
235 |
Clear the main event log
|
sl@0
|
236 |
@internalComponent
|
sl@0
|
237 |
*/
|
sl@0
|
238 |
NONSHARABLE_CLASS(CLogClearLogClientOp) : public CLogClientOp
|
sl@0
|
239 |
{
|
sl@0
|
240 |
public:
|
sl@0
|
241 |
CLogClearLogClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
242 |
void Start(const TTime& aDate, TRequestStatus& aObserver
|
sl@0
|
243 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
244 |
, TSimId aSimId = KLogNullSimId
|
sl@0
|
245 |
#endif
|
sl@0
|
246 |
);
|
sl@0
|
247 |
//
|
sl@0
|
248 |
private:
|
sl@0
|
249 |
void InitiateRequestToServerL();
|
sl@0
|
250 |
//
|
sl@0
|
251 |
private:
|
sl@0
|
252 |
TTime iDate; // UTC
|
sl@0
|
253 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
254 |
TSimId iSimId;
|
sl@0
|
255 |
#endif
|
sl@0
|
256 |
};
|
sl@0
|
257 |
|
sl@0
|
258 |
/**
|
sl@0
|
259 |
Clear a recent event log
|
sl@0
|
260 |
@internalComponent
|
sl@0
|
261 |
*/
|
sl@0
|
262 |
NONSHARABLE_CLASS(CLogClearRecentClientOp) : public CLogClientOp
|
sl@0
|
263 |
{
|
sl@0
|
264 |
public:
|
sl@0
|
265 |
CLogClearRecentClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
266 |
void Start(TLogRecentList aList, TRequestStatus& aObserver
|
sl@0
|
267 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
268 |
, TSimId aSimId = KLogNullSimId
|
sl@0
|
269 |
#endif
|
sl@0
|
270 |
);
|
sl@0
|
271 |
//
|
sl@0
|
272 |
private:
|
sl@0
|
273 |
void InitiateRequestToServerL();
|
sl@0
|
274 |
//
|
sl@0
|
275 |
private:
|
sl@0
|
276 |
TLogRecentList iList;
|
sl@0
|
277 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
278 |
TSimId iSimId;
|
sl@0
|
279 |
#endif
|
sl@0
|
280 |
};
|
sl@0
|
281 |
|
sl@0
|
282 |
/**
|
sl@0
|
283 |
Setup a view - Only synch version provided
|
sl@0
|
284 |
@internalComponent
|
sl@0
|
285 |
*/
|
sl@0
|
286 |
NONSHARABLE_CLASS(CLogViewSetupClientOp) : public CLogClientOp
|
sl@0
|
287 |
{
|
sl@0
|
288 |
public:
|
sl@0
|
289 |
CLogViewSetupClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
290 |
TInt Start(TLogViewId aViewId, const CLogFilterList& aFilterList, TInt aParam, TLogFilterConstructionType aFilterConstructionType);
|
sl@0
|
291 |
//
|
sl@0
|
292 |
private:
|
sl@0
|
293 |
void InitiateRequestToServerL();
|
sl@0
|
294 |
//
|
sl@0
|
295 |
private:
|
sl@0
|
296 |
TLogViewId iViewId;
|
sl@0
|
297 |
const CLogFilterList* iFilterList;
|
sl@0
|
298 |
TInt iParam;
|
sl@0
|
299 |
};
|
sl@0
|
300 |
|
sl@0
|
301 |
/**
|
sl@0
|
302 |
Remove an event from a view - Only synch version provided
|
sl@0
|
303 |
@internalComponent
|
sl@0
|
304 |
*/
|
sl@0
|
305 |
NONSHARABLE_CLASS(CLogViewRemoveEventClientOp) : public CLogClientOp
|
sl@0
|
306 |
{
|
sl@0
|
307 |
public:
|
sl@0
|
308 |
CLogViewRemoveEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
309 |
TInt Start(TLogViewId aViewId, TLogId aId);
|
sl@0
|
310 |
//
|
sl@0
|
311 |
private:
|
sl@0
|
312 |
void InitiateRequestToServerL();
|
sl@0
|
313 |
//
|
sl@0
|
314 |
private:
|
sl@0
|
315 |
TLogViewId iViewId;
|
sl@0
|
316 |
TLogId iId;
|
sl@0
|
317 |
};
|
sl@0
|
318 |
|
sl@0
|
319 |
/**
|
sl@0
|
320 |
Do maintenance on the database - for view creation?
|
sl@0
|
321 |
@internalComponent
|
sl@0
|
322 |
*/
|
sl@0
|
323 |
NONSHARABLE_CLASS(CLogMaintainClientOp) : public CLogClientOp
|
sl@0
|
324 |
{
|
sl@0
|
325 |
public:
|
sl@0
|
326 |
CLogMaintainClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority);
|
sl@0
|
327 |
//
|
sl@0
|
328 |
private:
|
sl@0
|
329 |
void InitiateRequestToServerL();
|
sl@0
|
330 |
};
|
sl@0
|
331 |
|
sl@0
|
332 |
#endif
|