|
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> |
|
21 #include <Stiftestinterface.h> |
|
22 #include <logcli.h> |
|
23 #include <logwrap.h> |
|
24 |
|
25 #include "loggingasyncservice.h" |
|
26 #include "loggingservice.h" |
|
27 #include "loggingfilter.h" |
|
28 #include "loggingevent.h" |
|
29 #include "logiter.h" |
|
30 #include "tlogging.h" |
|
31 #include "tlogcallback.h" |
|
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 MLogCallback :: MLogCallback() |
|
47 { |
|
48 iScheduler = new CActiveSchedulerWait() ; |
|
49 |
|
50 } |
|
51 |
|
52 //---------------------------------------------------------------- |
|
53 // Default destructor |
|
54 //---------------------------------------------------------------- |
|
55 |
|
56 MLogCallback :: ~MLogCallback() |
|
57 { |
|
58 delete iScheduler ; |
|
59 } |
|
60 |
|
61 //----------------------------------------------------------------- |
|
62 //Starts the async wait loop |
|
63 //----------------------------------------------------------------- |
|
64 |
|
65 |
|
66 void MLogCallback :: Start() |
|
67 { |
|
68 iScheduler->Start() ; |
|
69 } |
|
70 |
|
71 void MLogCallback :: HandleNotifyL(TUint aTransid ,TUint aStatus , CLogIter *iter ) |
|
72 { |
|
73 ++count ; |
|
74 |
|
75 delete iter ; |
|
76 if(count > 0) |
|
77 { |
|
78 iScheduler->AsyncStop() ; |
|
79 } |
|
80 |
|
81 |
|
82 } |
|
83 |
|
84 void MLogCallback :: CancelNotifyL( TUint aTransid ) |
|
85 { |
|
86 |
|
87 |
|
88 } |
|
89 |