|
1 /* |
|
2 * Copyright (c) 2002 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: Timer for Tcp CirWatcher. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __TCPCIRWATCHERTTIMER_H__ |
|
21 #define __TCPCIRWATCHERTTIMER_H__ |
|
22 |
|
23 const TUint KWaitForNextPing = 2000; |
|
24 const TUint KWaitForPingReply = 2001; |
|
25 const TUint KWaitForNextConnectAttempt = 2002; |
|
26 const TUint KWaitForFirstConnectAttempt = 2003; |
|
27 const TUint KWaitForHELOSendAttempt = 2004; |
|
28 const TUint KWaitForHELOResponse = 2005; |
|
29 |
|
30 // INCLUDES |
|
31 #include <e32base.h> |
|
32 #include "TcpCirWatcherTimerCallback.h" |
|
33 |
|
34 // CLASS DECLARATION |
|
35 class CTcpCirWatcherTimer : public CActive |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aCallback A pointer to MImpsTransportTimerCallback class |
|
42 * @param aRequester A pointer to the object that starts this timer |
|
43 * @param aLogging Has logging been enabled |
|
44 * @return CImpsCirWatcherTimer |
|
45 */ |
|
46 static CTcpCirWatcherTimer* NewL( MTcpCirWatcherTimerCallback* aCallback ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CTcpCirWatcherTimer(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Activates the timer |
|
57 * @param aDelay Expiry time in microseconds |
|
58 */ |
|
59 void ActivateTimer( const TTimeIntervalMicroSeconds32 aDelay, |
|
60 const TInt aCurrentTask ); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * By default Symbian OS constructor is private. |
|
66 */ |
|
67 void ConstructL(); |
|
68 |
|
69 /** |
|
70 * C++ constructor. |
|
71 * @param aCallback A pointer to MImpsCirWatcherTimerCallback class |
|
72 * @param aRequester A pointer to the object that starts this timer |
|
73 * @param aLogging Has logging been enabled |
|
74 */ |
|
75 CTcpCirWatcherTimer( MTcpCirWatcherTimerCallback* aCallback ); |
|
76 |
|
77 /** |
|
78 * From CActive. |
|
79 */ |
|
80 void RunL(); |
|
81 |
|
82 /** |
|
83 * From CActive. |
|
84 */ |
|
85 void DoCancel(); |
|
86 |
|
87 private: // Data |
|
88 |
|
89 TUint iCurrentTask; |
|
90 RTimer iTimer; |
|
91 MTcpCirWatcherTimerCallback* iCallback; |
|
92 }; |
|
93 |
|
94 #endif //__IMPSCIRWATCHERTTIMER_H__ |
|
95 |
|
96 // End of File |