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 |
#include "logclientop.h"
|
sl@0
|
17 |
|
sl@0
|
18 |
// User includes
|
sl@0
|
19 |
#include "logservcli.h"
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
CLogClientOp::CLogClientOp(RLogSession& aSession, CLogPackage& aPackage, TLogOperationType aType, TInt aPriority)
|
sl@0
|
23 |
: CActive(aPriority), iPackage(aPackage), iSession(aSession)
|
sl@0
|
24 |
//
|
sl@0
|
25 |
// Base client side operation
|
sl@0
|
26 |
//
|
sl@0
|
27 |
{
|
sl@0
|
28 |
iData().iOperationType = aType;
|
sl@0
|
29 |
CActiveScheduler::Add(this);
|
sl@0
|
30 |
}
|
sl@0
|
31 |
|
sl@0
|
32 |
CLogClientOp::~CLogClientOp()
|
sl@0
|
33 |
{
|
sl@0
|
34 |
Cancel();
|
sl@0
|
35 |
}
|
sl@0
|
36 |
|
sl@0
|
37 |
void CLogClientOp::Start(TRequestStatus& aObserver)
|
sl@0
|
38 |
//
|
sl@0
|
39 |
// Start the ball rolling - InitiateRequestToServerL called in RunL so it can leave
|
sl@0
|
40 |
//
|
sl@0
|
41 |
{
|
sl@0
|
42 |
iObserver = &aObserver;
|
sl@0
|
43 |
aObserver = KRequestPending;
|
sl@0
|
44 |
|
sl@0
|
45 |
// Just complete ourselves
|
sl@0
|
46 |
TRequestStatus* status = &iStatus;
|
sl@0
|
47 |
User::RequestComplete(status, KErrNone);
|
sl@0
|
48 |
SetActive();
|
sl@0
|
49 |
}
|
sl@0
|
50 |
|
sl@0
|
51 |
TInt CLogClientOp::Start()
|
sl@0
|
52 |
//
|
sl@0
|
53 |
// Synchronous way of running operations
|
sl@0
|
54 |
//
|
sl@0
|
55 |
{
|
sl@0
|
56 |
TInt result = KErrNone;
|
sl@0
|
57 |
TRAP(result, result = DoStartL());
|
sl@0
|
58 |
iData().iOperationId = KLogNullOperationId;
|
sl@0
|
59 |
return result;
|
sl@0
|
60 |
}
|
sl@0
|
61 |
|
sl@0
|
62 |
TInt CLogClientOp::DoStartL()
|
sl@0
|
63 |
{
|
sl@0
|
64 |
iData().iOperationId = iSession.AllocateIdOperation();
|
sl@0
|
65 |
InitiateRequestToServerL();
|
sl@0
|
66 |
User::WaitForRequest(iStatus);
|
sl@0
|
67 |
//We have an asynchronous request completed synchronously.
|
sl@0
|
68 |
//We have to do some iStatus cleanups.
|
sl@0
|
69 |
TRequestStatus status;//New TRequestStatus local variable. The default constructor will set iFlags data memebr to 0.
|
sl@0
|
70 |
status = iStatus.Int();//Only iStatus data member getzs initialized.
|
sl@0
|
71 |
iStatus = status;//Return back the same iStatus value but with iFlags data memeber cleared.
|
sl@0
|
72 |
User::LeaveIfError(iStatus.Int());
|
sl@0
|
73 |
|
sl@0
|
74 |
TInt result = iStatus.Int();
|
sl@0
|
75 |
CompleteL(result);
|
sl@0
|
76 |
iData().iOperationId = KLogNullOperationId;
|
sl@0
|
77 |
return result;
|
sl@0
|
78 |
}
|
sl@0
|
79 |
|
sl@0
|
80 |
void CLogClientOp::RunL()
|
sl@0
|
81 |
{
|
sl@0
|
82 |
LOGTEXT2("CLogClientOp::RunL(%d)", iStatus.Int());
|
sl@0
|
83 |
|
sl@0
|
84 |
User::LeaveIfError(iStatus.Int());
|
sl@0
|
85 |
|
sl@0
|
86 |
// Set ourselves up - make the actual request?
|
sl@0
|
87 |
if (iData().iOperationId == KLogNullOperationId)
|
sl@0
|
88 |
{
|
sl@0
|
89 |
// Get the id of the operation
|
sl@0
|
90 |
iData().iOperationId = iSession.AllocateIdOperation();
|
sl@0
|
91 |
|
sl@0
|
92 |
InitiateRequestToServerL();
|
sl@0
|
93 |
SetActive();
|
sl@0
|
94 |
}
|
sl@0
|
95 |
else
|
sl@0
|
96 |
{
|
sl@0
|
97 |
// Finish off the request
|
sl@0
|
98 |
iData().iOperationId = KLogNullOperationId;
|
sl@0
|
99 |
TInt result = iStatus.Int();
|
sl@0
|
100 |
CompleteL(result);
|
sl@0
|
101 |
User::RequestComplete(iObserver, result);
|
sl@0
|
102 |
}
|
sl@0
|
103 |
|
sl@0
|
104 |
LOGTEXT("CLogClientOp::RunL() - end");
|
sl@0
|
105 |
}
|
sl@0
|
106 |
|
sl@0
|
107 |
void CLogClientOp::DoCancel()
|
sl@0
|
108 |
//
|
sl@0
|
109 |
// Cancel the request to the server if we initiated one
|
sl@0
|
110 |
//
|
sl@0
|
111 |
{
|
sl@0
|
112 |
LOGTEXT2("CLogClientOp::DoCancel() - OperationId: %d", iData().iOperationId);
|
sl@0
|
113 |
|
sl@0
|
114 |
// Cancel this operation if we have an id
|
sl@0
|
115 |
if (iData().iOperationId > 0)
|
sl@0
|
116 |
{
|
sl@0
|
117 |
iSession.Send(ELogOperationCancel, TIpcArgs(&iData));
|
sl@0
|
118 |
//
|
sl@0
|
119 |
iData().iOperationId = KLogNullOperationId;
|
sl@0
|
120 |
}
|
sl@0
|
121 |
|
sl@0
|
122 |
User::RequestComplete(iObserver, KErrCancel);
|
sl@0
|
123 |
LOGTEXT("CLogClientOp::DoCancel() - end");
|
sl@0
|
124 |
}
|
sl@0
|
125 |
|
sl@0
|
126 |
// Just complete the observer on error
|
sl@0
|
127 |
TInt CLogClientOp::RunError(TInt aError)
|
sl@0
|
128 |
{
|
sl@0
|
129 |
iData().iOperationId = KLogNullOperationId;
|
sl@0
|
130 |
User::RequestComplete(iObserver, aError);
|
sl@0
|
131 |
return KErrNone;
|
sl@0
|
132 |
}
|
sl@0
|
133 |
|
sl@0
|
134 |
void CLogClientOp::CompleteL(TInt& /*aCompletionCode*/)
|
sl@0
|
135 |
//
|
sl@0
|
136 |
// By default operations don't do anything after completion
|
sl@0
|
137 |
//
|
sl@0
|
138 |
{
|
sl@0
|
139 |
}
|
sl@0
|
140 |
|
sl@0
|
141 |
void CLogClientOp::FetchResultFromServerL(TInt aResult)
|
sl@0
|
142 |
{
|
sl@0
|
143 |
iPackage.ResizeL(aResult);
|
sl@0
|
144 |
TPtr8 ptr(iPackage.Ptr());
|
sl@0
|
145 |
|
sl@0
|
146 |
User::LeaveIfError(iSession.Send(ELogOperationGetResult, TIpcArgs(&iData,&ptr,ptr.Length())));
|
sl@0
|
147 |
}
|
sl@0
|
148 |
|
sl@0
|
149 |
/**
|
sl@0
|
150 |
* Initialise the data slot values
|
sl@0
|
151 |
*/
|
sl@0
|
152 |
void CLogClientOp::SetDataSlot1(TInt aValue)
|
sl@0
|
153 |
{
|
sl@0
|
154 |
iData().iDataSlot1 = aValue;
|
sl@0
|
155 |
}
|
sl@0
|
156 |
|
sl@0
|
157 |
|
sl@0
|
158 |
|
sl@0
|
159 |
|
sl@0
|
160 |
|
sl@0
|
161 |
|
sl@0
|
162 |
|
sl@0
|
163 |
CLogAddEventClientOp::CLogAddEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
164 |
: CLogClientOp(aSession, aPackage, ELogOperationEventAdd, aPriority)
|
sl@0
|
165 |
{
|
sl@0
|
166 |
}
|
sl@0
|
167 |
|
sl@0
|
168 |
void CLogAddEventClientOp::Start(CLogEvent& aEvent, TRequestStatus& aObserver)
|
sl@0
|
169 |
{
|
sl@0
|
170 |
iEvent = &aEvent;
|
sl@0
|
171 |
CLogClientOp::Start(aObserver);
|
sl@0
|
172 |
}
|
sl@0
|
173 |
|
sl@0
|
174 |
void CLogAddEventClientOp::InitiateRequestToServerL()
|
sl@0
|
175 |
{
|
sl@0
|
176 |
iPackage.SetLogEventL(*iEvent);
|
sl@0
|
177 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, &iPackage.Ptr()), iStatus);
|
sl@0
|
178 |
}
|
sl@0
|
179 |
|
sl@0
|
180 |
void CLogAddEventClientOp::CompleteL(TInt& aResult)
|
sl@0
|
181 |
{
|
sl@0
|
182 |
FetchResultFromServerL(aResult);
|
sl@0
|
183 |
iPackage.GetLogEventL(*iEvent);
|
sl@0
|
184 |
}
|
sl@0
|
185 |
|
sl@0
|
186 |
|
sl@0
|
187 |
|
sl@0
|
188 |
|
sl@0
|
189 |
|
sl@0
|
190 |
|
sl@0
|
191 |
|
sl@0
|
192 |
CLogChangeEventClientOp::CLogChangeEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
193 |
: CLogClientOp(aSession, aPackage, ELogOperationEventChange, aPriority)
|
sl@0
|
194 |
{
|
sl@0
|
195 |
}
|
sl@0
|
196 |
|
sl@0
|
197 |
void CLogChangeEventClientOp::Start(const CLogEvent& aEvent, TRequestStatus& aObserver)
|
sl@0
|
198 |
{
|
sl@0
|
199 |
iEvent = &aEvent;
|
sl@0
|
200 |
CLogClientOp::Start(aObserver);
|
sl@0
|
201 |
}
|
sl@0
|
202 |
|
sl@0
|
203 |
void CLogChangeEventClientOp::InitiateRequestToServerL()
|
sl@0
|
204 |
{
|
sl@0
|
205 |
iPackage.SetLogEventL(*iEvent);
|
sl@0
|
206 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, &iPackage.Ptr()), iStatus);
|
sl@0
|
207 |
}
|
sl@0
|
208 |
|
sl@0
|
209 |
|
sl@0
|
210 |
|
sl@0
|
211 |
|
sl@0
|
212 |
|
sl@0
|
213 |
|
sl@0
|
214 |
CLogGetEventClientOp::CLogGetEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
215 |
: CLogClientOp(aSession, aPackage, ELogOperationEventGet, aPriority)
|
sl@0
|
216 |
{
|
sl@0
|
217 |
}
|
sl@0
|
218 |
|
sl@0
|
219 |
void CLogGetEventClientOp::Start(CLogEvent& aEvent, TRequestStatus& aObserver)
|
sl@0
|
220 |
{
|
sl@0
|
221 |
iEvent = &aEvent;
|
sl@0
|
222 |
CLogClientOp::Start(aObserver);
|
sl@0
|
223 |
}
|
sl@0
|
224 |
|
sl@0
|
225 |
void CLogGetEventClientOp::InitiateRequestToServerL()
|
sl@0
|
226 |
{
|
sl@0
|
227 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, iEvent->Id()), iStatus);
|
sl@0
|
228 |
}
|
sl@0
|
229 |
|
sl@0
|
230 |
void CLogGetEventClientOp::CompleteL(TInt& aResult)
|
sl@0
|
231 |
{
|
sl@0
|
232 |
FetchResultFromServerL(aResult);
|
sl@0
|
233 |
iPackage.GetLogEventL(*iEvent);
|
sl@0
|
234 |
}
|
sl@0
|
235 |
|
sl@0
|
236 |
|
sl@0
|
237 |
|
sl@0
|
238 |
|
sl@0
|
239 |
|
sl@0
|
240 |
|
sl@0
|
241 |
|
sl@0
|
242 |
CLogDeleteEventClientOp::CLogDeleteEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
243 |
: CLogClientOp(aSession, aPackage, ELogOperationEventDelete, aPriority)
|
sl@0
|
244 |
{
|
sl@0
|
245 |
}
|
sl@0
|
246 |
|
sl@0
|
247 |
void CLogDeleteEventClientOp::Start(TLogId aId, TRequestStatus& aObserver)
|
sl@0
|
248 |
{
|
sl@0
|
249 |
iId = aId;
|
sl@0
|
250 |
CLogClientOp::Start(aObserver);
|
sl@0
|
251 |
}
|
sl@0
|
252 |
|
sl@0
|
253 |
void CLogDeleteEventClientOp::InitiateRequestToServerL()
|
sl@0
|
254 |
{
|
sl@0
|
255 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, iId), iStatus);
|
sl@0
|
256 |
}
|
sl@0
|
257 |
|
sl@0
|
258 |
|
sl@0
|
259 |
|
sl@0
|
260 |
|
sl@0
|
261 |
|
sl@0
|
262 |
|
sl@0
|
263 |
|
sl@0
|
264 |
|
sl@0
|
265 |
|
sl@0
|
266 |
CLogAddTypeClientOp::CLogAddTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
267 |
: CLogClientOp(aSession, aPackage, ELogOperationTypeAdd, aPriority)
|
sl@0
|
268 |
{
|
sl@0
|
269 |
}
|
sl@0
|
270 |
|
sl@0
|
271 |
void CLogAddTypeClientOp::Start(const CLogEventType& aEventType, TRequestStatus& aObserver)
|
sl@0
|
272 |
{
|
sl@0
|
273 |
iEventType = &aEventType;
|
sl@0
|
274 |
CLogClientOp::Start(aObserver);
|
sl@0
|
275 |
}
|
sl@0
|
276 |
|
sl@0
|
277 |
void CLogAddTypeClientOp::InitiateRequestToServerL()
|
sl@0
|
278 |
{
|
sl@0
|
279 |
iPackage.SetLogEventTypeL(*iEventType);
|
sl@0
|
280 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, &iPackage.Ptr()), iStatus);
|
sl@0
|
281 |
}
|
sl@0
|
282 |
|
sl@0
|
283 |
|
sl@0
|
284 |
|
sl@0
|
285 |
|
sl@0
|
286 |
|
sl@0
|
287 |
|
sl@0
|
288 |
|
sl@0
|
289 |
|
sl@0
|
290 |
CLogChangeTypeClientOp::CLogChangeTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
291 |
: CLogClientOp(aSession, aPackage, ELogOperationTypeChange, aPriority)
|
sl@0
|
292 |
{
|
sl@0
|
293 |
}
|
sl@0
|
294 |
|
sl@0
|
295 |
void CLogChangeTypeClientOp::Start(const CLogEventType& aEventType, TRequestStatus& aObserver)
|
sl@0
|
296 |
{
|
sl@0
|
297 |
iEventType = &aEventType;
|
sl@0
|
298 |
CLogClientOp::Start(aObserver);
|
sl@0
|
299 |
}
|
sl@0
|
300 |
|
sl@0
|
301 |
void CLogChangeTypeClientOp::InitiateRequestToServerL()
|
sl@0
|
302 |
{
|
sl@0
|
303 |
iPackage.SetLogEventTypeL(*iEventType);
|
sl@0
|
304 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, &iPackage.Ptr()), iStatus);
|
sl@0
|
305 |
}
|
sl@0
|
306 |
|
sl@0
|
307 |
|
sl@0
|
308 |
|
sl@0
|
309 |
|
sl@0
|
310 |
|
sl@0
|
311 |
|
sl@0
|
312 |
|
sl@0
|
313 |
CLogGetTypeClientOp::CLogGetTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
314 |
: CLogClientOp(aSession, aPackage, ELogOperationTypeGet, aPriority)
|
sl@0
|
315 |
{
|
sl@0
|
316 |
}
|
sl@0
|
317 |
|
sl@0
|
318 |
void CLogGetTypeClientOp::Start(CLogEventType& aEventType, TRequestStatus& aObserver)
|
sl@0
|
319 |
{
|
sl@0
|
320 |
iEventType = &aEventType;
|
sl@0
|
321 |
CLogClientOp::Start(aObserver);
|
sl@0
|
322 |
}
|
sl@0
|
323 |
|
sl@0
|
324 |
void CLogGetTypeClientOp::InitiateRequestToServerL()
|
sl@0
|
325 |
{
|
sl@0
|
326 |
TIpcArgs args(&iData, iEventType->Uid().iUid);
|
sl@0
|
327 |
iSession.Send(ELogOperationInitiate, args, iStatus);
|
sl@0
|
328 |
}
|
sl@0
|
329 |
|
sl@0
|
330 |
void CLogGetTypeClientOp::CompleteL(TInt& aResult)
|
sl@0
|
331 |
{
|
sl@0
|
332 |
FetchResultFromServerL(aResult);
|
sl@0
|
333 |
iPackage.GetLogEventTypeL(*iEventType);
|
sl@0
|
334 |
}
|
sl@0
|
335 |
|
sl@0
|
336 |
|
sl@0
|
337 |
|
sl@0
|
338 |
|
sl@0
|
339 |
|
sl@0
|
340 |
|
sl@0
|
341 |
|
sl@0
|
342 |
|
sl@0
|
343 |
CLogDeleteTypeClientOp::CLogDeleteTypeClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
344 |
: CLogClientOp(aSession, aPackage, ELogOperationTypeDelete, aPriority)
|
sl@0
|
345 |
{
|
sl@0
|
346 |
}
|
sl@0
|
347 |
|
sl@0
|
348 |
void CLogDeleteTypeClientOp::Start(TUid aUid, TRequestStatus& aObserver)
|
sl@0
|
349 |
{
|
sl@0
|
350 |
iUid = aUid;
|
sl@0
|
351 |
CLogClientOp::Start(aObserver);
|
sl@0
|
352 |
}
|
sl@0
|
353 |
|
sl@0
|
354 |
void CLogDeleteTypeClientOp::InitiateRequestToServerL()
|
sl@0
|
355 |
{
|
sl@0
|
356 |
TIpcArgs args(&iData, iUid.iUid);
|
sl@0
|
357 |
iSession.Send(ELogOperationInitiate, args, iStatus);
|
sl@0
|
358 |
}
|
sl@0
|
359 |
|
sl@0
|
360 |
|
sl@0
|
361 |
|
sl@0
|
362 |
|
sl@0
|
363 |
|
sl@0
|
364 |
|
sl@0
|
365 |
|
sl@0
|
366 |
|
sl@0
|
367 |
CLogGetConfigClientOp::CLogGetConfigClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
368 |
: CLogClientOp(aSession, aPackage, ELogOperationConfigGet, aPriority)
|
sl@0
|
369 |
{
|
sl@0
|
370 |
}
|
sl@0
|
371 |
|
sl@0
|
372 |
void CLogGetConfigClientOp::Start(TLogConfig& aConfig, TRequestStatus& aObserver)
|
sl@0
|
373 |
{
|
sl@0
|
374 |
iConfig = &aConfig;
|
sl@0
|
375 |
CLogClientOp::Start(aObserver);
|
sl@0
|
376 |
}
|
sl@0
|
377 |
|
sl@0
|
378 |
void CLogGetConfigClientOp::InitiateRequestToServerL()
|
sl@0
|
379 |
{
|
sl@0
|
380 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData), iStatus);
|
sl@0
|
381 |
}
|
sl@0
|
382 |
|
sl@0
|
383 |
void CLogGetConfigClientOp::CompleteL(TInt& aResult)
|
sl@0
|
384 |
{
|
sl@0
|
385 |
FetchResultFromServerL(aResult);
|
sl@0
|
386 |
iPackage.GetLogConfigL(*iConfig);
|
sl@0
|
387 |
}
|
sl@0
|
388 |
|
sl@0
|
389 |
|
sl@0
|
390 |
|
sl@0
|
391 |
|
sl@0
|
392 |
|
sl@0
|
393 |
|
sl@0
|
394 |
|
sl@0
|
395 |
|
sl@0
|
396 |
|
sl@0
|
397 |
CLogChangeConfigClientOp::CLogChangeConfigClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
398 |
: CLogClientOp(aSession, aPackage, ELogOperationConfigChange, aPriority)
|
sl@0
|
399 |
{
|
sl@0
|
400 |
}
|
sl@0
|
401 |
|
sl@0
|
402 |
void CLogChangeConfigClientOp::Start(const TLogConfig& aConfig, TRequestStatus& aObserver)
|
sl@0
|
403 |
{
|
sl@0
|
404 |
iConfig = &aConfig;
|
sl@0
|
405 |
CLogClientOp::Start(aObserver);
|
sl@0
|
406 |
}
|
sl@0
|
407 |
|
sl@0
|
408 |
void CLogChangeConfigClientOp::InitiateRequestToServerL()
|
sl@0
|
409 |
{
|
sl@0
|
410 |
iPackage.SetLogConfigL(*iConfig);
|
sl@0
|
411 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, &iPackage.Ptr()), iStatus);
|
sl@0
|
412 |
}
|
sl@0
|
413 |
|
sl@0
|
414 |
|
sl@0
|
415 |
|
sl@0
|
416 |
|
sl@0
|
417 |
|
sl@0
|
418 |
|
sl@0
|
419 |
|
sl@0
|
420 |
|
sl@0
|
421 |
|
sl@0
|
422 |
CLogClearLogClientOp::CLogClearLogClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority) :
|
sl@0
|
423 |
CLogClientOp(aSession, aPackage, ELogOperationClearLog, aPriority)
|
sl@0
|
424 |
{
|
sl@0
|
425 |
}
|
sl@0
|
426 |
|
sl@0
|
427 |
void CLogClearLogClientOp::Start(const TTime& aDate, TRequestStatus& aObserver
|
sl@0
|
428 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
429 |
, TSimId aSimId
|
sl@0
|
430 |
#endif
|
sl@0
|
431 |
)
|
sl@0
|
432 |
{
|
sl@0
|
433 |
iDate = aDate; // UTC
|
sl@0
|
434 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
435 |
iSimId = aSimId;
|
sl@0
|
436 |
#endif
|
sl@0
|
437 |
CLogClientOp::Start(aObserver);
|
sl@0
|
438 |
}
|
sl@0
|
439 |
|
sl@0
|
440 |
void CLogClearLogClientOp::InitiateRequestToServerL()
|
sl@0
|
441 |
{
|
sl@0
|
442 |
const TInt64 dateVal(iDate.Int64());
|
sl@0
|
443 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
444 |
TIpcArgs args(&iData, I64LOW(dateVal), I64HIGH(dateVal), iSimId);
|
sl@0
|
445 |
#else
|
sl@0
|
446 |
TIpcArgs args(&iData, I64LOW(dateVal), I64HIGH(dateVal));
|
sl@0
|
447 |
#endif
|
sl@0
|
448 |
iSession.Send(ELogOperationInitiate, args, iStatus);
|
sl@0
|
449 |
}
|
sl@0
|
450 |
|
sl@0
|
451 |
|
sl@0
|
452 |
|
sl@0
|
453 |
|
sl@0
|
454 |
|
sl@0
|
455 |
|
sl@0
|
456 |
|
sl@0
|
457 |
|
sl@0
|
458 |
CLogClearRecentClientOp::CLogClearRecentClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
459 |
: CLogClientOp(aSession, aPackage, ELogOperationClearRecent, aPriority)
|
sl@0
|
460 |
{
|
sl@0
|
461 |
}
|
sl@0
|
462 |
|
sl@0
|
463 |
void CLogClearRecentClientOp::Start(TLogRecentList aList, TRequestStatus& aObserver
|
sl@0
|
464 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
465 |
, TSimId aSimId
|
sl@0
|
466 |
#endif
|
sl@0
|
467 |
)
|
sl@0
|
468 |
{
|
sl@0
|
469 |
iList = aList;
|
sl@0
|
470 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
471 |
iSimId = aSimId;
|
sl@0
|
472 |
#endif
|
sl@0
|
473 |
CLogClientOp::Start(aObserver);
|
sl@0
|
474 |
}
|
sl@0
|
475 |
|
sl@0
|
476 |
void CLogClearRecentClientOp::InitiateRequestToServerL()
|
sl@0
|
477 |
{
|
sl@0
|
478 |
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
|
sl@0
|
479 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, iList, iSimId), iStatus);
|
sl@0
|
480 |
#else
|
sl@0
|
481 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData, iList), iStatus);
|
sl@0
|
482 |
#endif
|
sl@0
|
483 |
}
|
sl@0
|
484 |
|
sl@0
|
485 |
|
sl@0
|
486 |
|
sl@0
|
487 |
|
sl@0
|
488 |
|
sl@0
|
489 |
|
sl@0
|
490 |
|
sl@0
|
491 |
CLogMaintainClientOp::CLogMaintainClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
492 |
: CLogClientOp(aSession, aPackage, ELogOperationMaintain, aPriority)
|
sl@0
|
493 |
{
|
sl@0
|
494 |
}
|
sl@0
|
495 |
|
sl@0
|
496 |
void CLogMaintainClientOp::InitiateRequestToServerL()
|
sl@0
|
497 |
{
|
sl@0
|
498 |
iSession.Send(ELogOperationInitiate, TIpcArgs(&iData), iStatus);
|
sl@0
|
499 |
}
|
sl@0
|
500 |
|
sl@0
|
501 |
|
sl@0
|
502 |
|
sl@0
|
503 |
|
sl@0
|
504 |
|
sl@0
|
505 |
|
sl@0
|
506 |
|
sl@0
|
507 |
|
sl@0
|
508 |
CLogViewSetupClientOp::CLogViewSetupClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
509 |
: CLogClientOp(aSession, aPackage, ELogOperationViewSetup, aPriority)
|
sl@0
|
510 |
{
|
sl@0
|
511 |
}
|
sl@0
|
512 |
|
sl@0
|
513 |
TInt CLogViewSetupClientOp::Start(TLogViewId aViewId, const CLogFilterList& aFilterList, TInt aParam, TLogFilterConstructionType aFilterConstructionType)
|
sl@0
|
514 |
{
|
sl@0
|
515 |
// Synchronous!
|
sl@0
|
516 |
iViewId = aViewId;
|
sl@0
|
517 |
iFilterList = &aFilterList;
|
sl@0
|
518 |
iParam = aParam;
|
sl@0
|
519 |
SetDataSlot1(aFilterConstructionType);
|
sl@0
|
520 |
//
|
sl@0
|
521 |
return CLogClientOp::Start();
|
sl@0
|
522 |
}
|
sl@0
|
523 |
|
sl@0
|
524 |
void CLogViewSetupClientOp::InitiateRequestToServerL()
|
sl@0
|
525 |
{
|
sl@0
|
526 |
TIpcArgs args (&iData, iViewId, &iPackage.Ptr(), iParam);
|
sl@0
|
527 |
iSession.Send(ELogViewOperationInitiate, args, iStatus);
|
sl@0
|
528 |
}
|
sl@0
|
529 |
|
sl@0
|
530 |
|
sl@0
|
531 |
|
sl@0
|
532 |
|
sl@0
|
533 |
|
sl@0
|
534 |
|
sl@0
|
535 |
|
sl@0
|
536 |
CLogViewRemoveEventClientOp::CLogViewRemoveEventClientOp(RLogSession& aSession, CLogPackage& aPackage, TInt aPriority)
|
sl@0
|
537 |
: CLogClientOp(aSession, aPackage, ELogOperationViewRemoveEvent, aPriority)
|
sl@0
|
538 |
{
|
sl@0
|
539 |
}
|
sl@0
|
540 |
|
sl@0
|
541 |
TInt CLogViewRemoveEventClientOp::Start(TLogViewId aViewId, TLogId aId)
|
sl@0
|
542 |
{
|
sl@0
|
543 |
// Synchronous!
|
sl@0
|
544 |
iViewId = aViewId;
|
sl@0
|
545 |
iId = aId;
|
sl@0
|
546 |
return CLogClientOp::Start();
|
sl@0
|
547 |
}
|
sl@0
|
548 |
|
sl@0
|
549 |
void CLogViewRemoveEventClientOp::InitiateRequestToServerL()
|
sl@0
|
550 |
{
|
sl@0
|
551 |
TIpcArgs args(&iData, iViewId, iId, 0);
|
sl@0
|
552 |
iSession.Send(ELogViewOperationInitiate, args, iStatus);
|
sl@0
|
553 |
}
|
sl@0
|
554 |
|
sl@0
|
555 |
|
sl@0
|
556 |
|
sl@0
|
557 |
|
sl@0
|
558 |
|