author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 11 May 2010 17:01:36 +0300 | |
branch | RCL_3 |
changeset 58 | ea43c23d28d2 |
parent 33 | 50974a8b132e |
child 65 | 0b68a1b0c15e |
permissions | -rw-r--r-- |
19 | 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 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#include <e32svr.h> |
|
19 |
#include <e32std.h> |
|
20 |
#include <StifParser.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
21 |
#include <StifTestInterface.h> |
19 | 22 |
#include <logcli.h> |
23 |
#include <logwrap.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
24 |
#include <liwservicehandler.h> |
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
25 |
#include <liwcommon.h> |
19 | 26 |
|
27 |
#include "tlogprovidertest.h" |
|
28 |
||
29 |
#include "tcallback.h" |
|
30 |
#include "liwlogiter.h" |
|
31 |
#include"tconstants.h" |
|
32 |
// _LIT8(KLogIter , "Iterator") ; |
|
33 |
||
34 |
||
35 |
||
36 |
//------------------------------------------------------------- |
|
37 |
// Generic call back function implementation, used by logging |
|
38 |
// component |
|
39 |
//-------------------------------------------------------------- |
|
40 |
||
41 |
static TInt count = 0 ; |
|
42 |
||
43 |
//-------------------------------------------------------------- |
|
44 |
// Default constructor |
|
45 |
//-------------------------------------------------------------- |
|
46 |
||
47 |
tcallback :: tcallback() |
|
48 |
{ |
|
49 |
iScheduler = new CActiveSchedulerWait() ; |
|
50 |
} |
|
51 |
||
52 |
//---------------------------------------------------------------- |
|
53 |
// Default destructor |
|
54 |
//---------------------------------------------------------------- |
|
55 |
||
56 |
tcallback :: ~tcallback() |
|
57 |
{ |
|
58 |
delete iScheduler ; |
|
59 |
} |
|
60 |
||
61 |
//----------------------------------------------------------------- |
|
62 |
//Starts the async wait loop |
|
63 |
//----------------------------------------------------------------- |
|
64 |
||
65 |
||
66 |
void tcallback :: Start() |
|
67 |
{ |
|
68 |
iScheduler->Start() ; |
|
69 |
} |
|
70 |
||
71 |
TInt tcallback :: HandleNotifyL(TInt aCmdId,TInt aEventId, |
|
72 |
CLiwGenericParamList& aEventParamList, |
|
73 |
const CLiwGenericParamList& aInParamList) |
|
74 |
{ |
|
75 |
++count ; |
|
76 |
TInt pos=0; |
|
77 |
const TLiwGenericParam *LogIterParam = aInParamList.FindFirst(pos , KLogIter) ; |
|
78 |
||
79 |
if(pos != KErrNotFound) |
|
80 |
{ |
|
81 |
CLiwIterable *liwiter = (LogIterParam->Value()).AsIterable() ; |
|
82 |
liwiter->Reset() ; |
|
83 |
||
84 |
} |
|
85 |
||
86 |
aEventParamList.Reset(); |
|
87 |
//aInParamList.Reset(); |
|
88 |
/*(const_cast<CLiwGenericParamList&>(aInParamList)).Reset() ; |
|
89 |
delete &aEventParamList; |
|
90 |
delete &aInParamList;*/ |
|
91 |
if(count > 0) |
|
92 |
{ |
|
93 |
if(iScheduler->IsStarted()) |
|
94 |
iScheduler->AsyncStop() ; |
|
95 |
} |
|
96 |
iRetVal = KErrNone ; |
|
97 |
||
58
ea43c23d28d2
Revision: 201016
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
33
diff
changeset
|
98 |
return 0; |
19 | 99 |
|
100 |
} |