|
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 "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: Header file for Stylus Tap indicator |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_FORCEDISMOUNTTIMER_H |
|
19 #define C_FORCEDISMOUNTTIMER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 /** |
|
24 * Timer callback interface for force mount |
|
25 * |
|
26 * This class specifies the function to be called when a timeout occurs. |
|
27 * Used in conjunction with CTimeOutTimer class |
|
28 * |
|
29 */ |
|
30 class MTimerNotifier |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * The function to be called when a timeout occurs. |
|
35 * |
|
36 */ |
|
37 virtual void TimerExpired() = 0; |
|
38 }; |
|
39 |
|
40 /** |
|
41 * Timer interface for force mount |
|
42 * |
|
43 * This class will notify an object after a specified timeout. |
|
44 * |
|
45 */ |
|
46 class CForceDismountTimer : public CTimer |
|
47 { |
|
48 public: |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 * @param aTimeOutNotify object to notify of timeout event |
|
52 */ |
|
53 static CForceDismountTimer* NewL( MTimerNotifier* aTimeOutNotify ); |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 * @param aTimeOutNotify object to notify of timeout event |
|
58 */ |
|
59 static CForceDismountTimer* NewLC( MTimerNotifier* aTimeOutNotify); |
|
60 |
|
61 /** |
|
62 * Destructor |
|
63 */ |
|
64 virtual ~CForceDismountTimer(); |
|
65 |
|
66 protected: |
|
67 |
|
68 /** |
|
69 * From CTimer |
|
70 * Invoked when a timeout occurs |
|
71 * |
|
72 */ |
|
73 virtual void RunL(); |
|
74 |
|
75 private: |
|
76 /** |
|
77 * Constructor. |
|
78 * @param aTimeOutNotify object to notify of timeout event |
|
79 */ |
|
80 CForceDismountTimer( MTimerNotifier* aTimeOutNotify ); |
|
81 |
|
82 /** |
|
83 * Default constructor. |
|
84 */ |
|
85 void ConstructL(); |
|
86 |
|
87 private: // Member variables |
|
88 |
|
89 /** |
|
90 * The observer for this objects events |
|
91 * Not own. |
|
92 */ |
|
93 MTimerNotifier* iNotify; |
|
94 |
|
95 |
|
96 }; |
|
97 #endif // C_FORCEMOUNTTIMER_H |