|
1 /** |
|
2 * Copyright (c) 2005-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 "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 |
|
19 |
|
20 /** |
|
21 @file notificationtester.h |
|
22 */ |
|
23 |
|
24 #if (!defined __NOTIFICATION_TESTER_H__) |
|
25 #define __NOTIFICATION_TESTER_H__ |
|
26 |
|
27 #include <e32base.h> |
|
28 #include <e32std.h> |
|
29 #include "MetaDatabase.h" |
|
30 #include "CommsDat.h" |
|
31 |
|
32 using namespace CommsDat; |
|
33 using namespace Meta; |
|
34 |
|
35 class CNotificationTester:public CActive |
|
36 { |
|
37 public: |
|
38 static CNotificationTester* NewL(const TDesC &aThreadName,CommsDat::CMDBSession* aSession, CommsDat::CMDBElement* aElement ); |
|
39 ~CNotificationTester(); |
|
40 void SetTester(); |
|
41 void LogOn(TRequestStatus &aStatus); |
|
42 void RequestStatus(TRequestStatus &aRequestStatus); |
|
43 void CancelNotification(TRequestStatus &aStatus); |
|
44 private: |
|
45 CNotificationTester(CommsDat::CMDBSession* aSession, CommsDat::CMDBElement* aElement); |
|
46 void ConstructL(const TDesC &aThreadName); |
|
47 |
|
48 void RunL(); |
|
49 void DoCancel(); |
|
50 static TInt ThreadFunction(TAny *aPtr); |
|
51 static TInt DoThreadFunctionL(TAny *aPtr); |
|
52 private: |
|
53 CommsDat::CMDBSession *iSession; |
|
54 CommsDat::CMDBElement *iElement; |
|
55 RThread iThread; |
|
56 TBool iThreadRunning; |
|
57 TInt iReason; |
|
58 }; |
|
59 |
|
60 #endif//__NOTIFICATION_TESTER_H__ |