|
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 <e32base.h> |
|
19 #include <BADESCA.H> |
|
20 #include<LiwCommon.h> |
|
21 #include <f32file.h> |
|
22 |
|
23 class CLiwServiceHandler; |
|
24 |
|
25 /** |
|
26 * Callback class for asynchronous SAPI message header |
|
27 */ |
|
28 |
|
29 class CCalCallback : public MLiwNotifyCallback |
|
30 { |
|
31 public: |
|
32 |
|
33 static CCalCallback* NewL(CActiveSchedulerWait* aWaitSchedular, MLiwInterface* aInterface, TInt& aRes, TInt& aFlag); |
|
34 |
|
35 virtual ~CCalCallback(){} |
|
36 |
|
37 TInt HandleNotifyL(TInt aCmdId, |
|
38 TInt aEventId, |
|
39 CLiwGenericParamList& aEventParamList, |
|
40 const CLiwGenericParamList& aInParamList); |
|
41 |
|
42 private: |
|
43 |
|
44 CCalCallback(CActiveSchedulerWait* aWaitSchedular, MLiwInterface* aInterface, TInt& aRes, TInt& aFlag):iWaitSchedular(aWaitSchedular), iInterface(aInterface), iResult(aRes), iOption(aFlag){ } |
|
45 |
|
46 CActiveSchedulerWait* iWaitSchedular; |
|
47 MLiwInterface* iInterface ; |
|
48 TInt& iResult; |
|
49 TInt& iOption; |
|
50 }; |
|
51 |
|
52 |
|
53 class CTestAsync : public CActive |
|
54 { |
|
55 public: |
|
56 static CTestAsync* NewL(); |
|
57 ~CTestAsync(); |
|
58 TInt Start(TInt aFlag, TBool); |
|
59 void CancelNotification(); |
|
60 |
|
61 |
|
62 private: |
|
63 void ConstructL(); |
|
64 CTestAsync(); |
|
65 |
|
66 virtual void DoCancel(); |
|
67 virtual void RunL(); |
|
68 |
|
69 |
|
70 int TestFunc(); |
|
71 |
|
72 private: |
|
73 CLiwServiceHandler* iServiceHandler; |
|
74 CActiveSchedulerWait* iWaitSchedular; |
|
75 TInt iResult; |
|
76 MLiwInterface* interface ; |
|
77 CCalCallback* iCallback; |
|
78 TInt iFlag; |
|
79 TBool iAsync; |
|
80 |
|
81 }; |
|
82 |
|
83 class CTestSync : public CBase |
|
84 { |
|
85 public: |
|
86 static CTestSync* NewL(); |
|
87 int TestFunc(); |
|
88 int DeleteDefaultCalendar(); |
|
89 int DeleteWrongCal(); |
|
90 CTestSync(); |
|
91 ~CTestSync(); |
|
92 |
|
93 private: |
|
94 void ConstructL(); |
|
95 |
|
96 |
|
97 |
|
98 private: |
|
99 CLiwServiceHandler* iServiceHandler; |
|
100 TInt iResult; |
|
101 MLiwInterface* interface ; |
|
102 }; |