|
1 /* |
|
2 * Copyright (c) 2002-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: This file contains the header file of the CNWNetworkMcnTimer class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CNWNETWORKMCNTIMER_H |
|
21 #define CNWNETWORKMCNTIMER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MNWNetworkTimer; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Utility class for timer |
|
34 * |
|
35 * |
|
36 * @lib euser.lib |
|
37 * @since Series 60_2.8 |
|
38 */ |
|
39 class CNWNetworkMcnTimer : public CTimer |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CNWNetworkMcnTimer* NewL( |
|
47 TInt aPriority = CActive::EPriorityStandard ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CNWNetworkMcnTimer(); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 /** |
|
57 * Calls the Callback function after the interval. |
|
58 * |
|
59 * @param anInterval Timer interval. |
|
60 * @param aCallBack CallBack function. |
|
61 * @return |
|
62 */ |
|
63 void After( const TTimeIntervalMicroSeconds32& anInterval, |
|
64 const TCallBack& aCallBack ); |
|
65 |
|
66 /** |
|
67 * Uses the mixin class to notify the timer expiration. |
|
68 * |
|
69 * @param anInterval Timer interval. |
|
70 * @param aObserver Observer to call after timer expiration. |
|
71 * @return |
|
72 */ |
|
73 void After( const TTimeIntervalMicroSeconds32& anInterval, |
|
74 MNWNetworkTimer* aObserver ); |
|
75 |
|
76 protected: // Functions from CActive |
|
77 |
|
78 /** |
|
79 * Informs object that asyncronous request is ready. |
|
80 * |
|
81 */ |
|
82 virtual void RunL(); |
|
83 |
|
84 private: |
|
85 |
|
86 /** |
|
87 * C++ default constructor. |
|
88 */ |
|
89 CNWNetworkMcnTimer( TInt aPriority ); |
|
90 |
|
91 /** |
|
92 * By default Symbian 2nd phase constructor is private. |
|
93 */ |
|
94 void ConstructL(); |
|
95 |
|
96 // Prohibit copy constructor if not deriving from CBase. |
|
97 CNWNetworkMcnTimer( const CNWNetworkMcnTimer& ); |
|
98 // Prohibit assigment operator if not deriving from CBase. |
|
99 CNWNetworkMcnTimer& operator=( const CNWNetworkMcnTimer& ); |
|
100 |
|
101 private: // Data |
|
102 // |
|
103 TCallBack iCallBack; |
|
104 // Pointer to the MNWNetworkTimer |
|
105 MNWNetworkTimer* iTimerObserver; |
|
106 |
|
107 }; |
|
108 |
|
109 #endif // CNWNetworkMcnTimer_H |
|
110 |
|
111 // End of File |