|
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 |
|
29 #include "tlogging.h" |
|
30 #include "tlogcallback.h" |
|
31 #include "loggingevent.h" |
|
32 |
|
33 |
|
34 //------------------------------------------------------------------ |
|
35 //Concurrenttest1, core class for concurrent async calls |
|
36 // GetList and request notification |
|
37 //------------------------------------------------------------------ |
|
38 |
|
39 TInt concurrenttest2(void) |
|
40 { |
|
41 TInt ret ; |
|
42 TInt flag ; |
|
43 |
|
44 |
|
45 CLoggingService *LogService = CLoggingService :: NewL() ; |
|
46 CLogsFilter *filter = CLogsFilter :: NewL() ; |
|
47 MLogCallback MyCb ; |
|
48 CLogsEvent *event = CLogsEvent :: NewL() ; |
|
49 |
|
50 |
|
51 |
|
52 LogService->NotifyUpdatesL(1 ,900 , &MyCb) ; |
|
53 filter->SetRequestType( EReadEvents); |
|
54 ret = LogService->GetListL(2 , filter , &MyCb) ; |
|
55 |
|
56 if(ret == KErrServerBusy) |
|
57 { |
|
58 flag = KErrNone ; |
|
59 } |
|
60 else |
|
61 { |
|
62 flag = ret ; |
|
63 } |
|
64 |
|
65 |
|
66 delete filter ; |
|
67 delete event ; |
|
68 delete LogService ; |
|
69 |
|
70 return flag ; |
|
71 |
|
72 |
|
73 } |
|
74 |