author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 31 Aug 2010 16:06:03 +0300 | |
branch | RCL_3 |
changeset 65 | 0b68a1b0c15e |
parent 58 | ea43c23d28d2 |
child 66 | a9c0808a1095 |
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 "tprovidertest.h" |
|
28 |
||
29 |
#include "tprovidercallback.h" |
|
30 |
#include "liwlogiter.h" |
|
31 |
_LIT8(KLogIter , "Iterator") ; |
|
32 |
||
33 |
||
34 |
||
35 |
//------------------------------------------------------------- |
|
36 |
// Generic call back function implementation, used by logging |
|
37 |
// component |
|
38 |
//-------------------------------------------------------------- |
|
39 |
||
40 |
static TInt count = 0 ; |
|
41 |
||
42 |
//-------------------------------------------------------------- |
|
43 |
// Default constructor |
|
44 |
//-------------------------------------------------------------- |
|
45 |
||
46 |
NotifyCB :: NotifyCB() |
|
47 |
{ |
|
48 |
iScheduler = new CActiveSchedulerWait() ; |
|
49 |
//iConsumer = aConsumer ; |
|
50 |
} |
|
51 |
||
52 |
//---------------------------------------------------------------- |
|
53 |
// Default destructor |
|
54 |
//---------------------------------------------------------------- |
|
55 |
||
56 |
NotifyCB :: ~NotifyCB() |
|
57 |
{ |
|
58 |
delete iScheduler ; |
|
59 |
} |
|
60 |
||
61 |
//----------------------------------------------------------------- |
|
62 |
//Starts the async wait loop |
|
63 |
//----------------------------------------------------------------- |
|
64 |
||
65 |
||
66 |
void NotifyCB :: Start() |
|
67 |
{ |
|
68 |
iScheduler->Start() ; |
|
69 |
} |
|
70 |
||
71 |
TInt NotifyCB :: HandleNotifyL(TInt aCmdId,TInt aEventId, |
|
72 |
CLiwGenericParamList& aEventParamList, |
|
73 |
const CLiwGenericParamList& aInParamList) |
|
74 |
{ |
|
75 |
++count ; |
|
76 |
TInt pos=0; |
|
77 |
const TLiwGenericParam *LogIterParam = aEventParamList.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 |
//(const_cast<CLiwGenericParamList&>(aInParamList)).Reset() ; |
|
88 |
//delete &aEventParamList; |
|
89 |
//delete &aInParamList; |
|
90 |
if( count > 0 && (aEventId == KLiwEventCompleted || aEventId == KLiwEventError )) |
|
91 |
{ |
|
92 |
iScheduler->AsyncStop() ; |
|
93 |
} |
|
94 |
||
95 |
if( aEventId == KLiwEventInProgress ) |
|
96 |
{ |
|
97 |
iScheduler->AsyncStop() ; |
|
98 |
} |
|
99 |
iRetVal = KErrNone ; |
|
100 |
||
65
0b68a1b0c15e
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
58
diff
changeset
|
101 |
|
19 | 102 |
|
103 |
} |