|
1 /* |
|
2 * Copyright (c) 2005 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: Connection manager timer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MSGCONNTIMER__ |
|
22 #define __MSGCONNTIMER__ |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 class MMsgConnTimerCallback; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 class CMsgConnTimer : public CActive |
|
30 { |
|
31 public: // Constructors and destructor |
|
32 |
|
33 /** |
|
34 * Two-phased constructor. |
|
35 * @return CMsgConnTimer* |
|
36 */ |
|
37 static CMsgConnTimer* NewL(); |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param MMsgConnectionTimerCallback* aClient |
|
42 * @return CMsgConnTimer* |
|
43 */ |
|
44 static CMsgConnTimer* NewL( MMsgConnTimerCallback* aClient ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CMsgConnTimer(); |
|
50 |
|
51 public: // New functions |
|
52 |
|
53 /** |
|
54 * Request to activate timer |
|
55 * @param TRequestStatus& aStatus |
|
56 * @param TTimeIntervalMicroSeconds32 aDelay |
|
57 * @param TBool aCompleteIfCancel = EFalse |
|
58 * @return void |
|
59 */ |
|
60 void ActivateTimer( TRequestStatus& aStatus, |
|
61 TTimeIntervalMicroSeconds32 aDelay ); |
|
62 |
|
63 /** |
|
64 * Request to activate timer |
|
65 * @param TTimeIntervalMicroSeconds32 aDelay |
|
66 * @param MMsgConnectionTimerCallback* aClient |
|
67 * @return void |
|
68 */ |
|
69 void ActivateTimer( MMsgConnTimerCallback* aClient, |
|
70 TTimeIntervalMicroSeconds32 aDelay ); |
|
71 |
|
72 private: |
|
73 |
|
74 /** |
|
75 * From CActive. |
|
76 * @return void |
|
77 */ |
|
78 void RunL(); |
|
79 |
|
80 /** |
|
81 * From CActive. |
|
82 * @return void |
|
83 */ |
|
84 void DoCancel(); |
|
85 |
|
86 /** |
|
87 * By default Symbian OS constructor is private. |
|
88 * @return void |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 /** |
|
93 * C++ constructor. |
|
94 */ |
|
95 CMsgConnTimer(); |
|
96 |
|
97 /** |
|
98 * C++ constructor. |
|
99 * @param MMsgConnectionTimerCallback* aClient |
|
100 */ |
|
101 CMsgConnTimer( MMsgConnTimerCallback* aClient ); |
|
102 |
|
103 private: // Data |
|
104 |
|
105 RTimer iTimer; |
|
106 TRequestStatus* iClientStatus; |
|
107 TBool iCompleteIfCancel; |
|
108 MMsgConnTimerCallback* iClient; |
|
109 }; |
|
110 |
|
111 #endif //MSGCONNTIMER_H |
|
112 |
|
113 // End of File |