|
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This contains CTestTimeOutTimer |
|
15 // |
|
16 // |
|
17 |
|
18 #if (!defined __SMOKETEST_TIMEOUT_TIMER_H_) |
|
19 #define __SMOKETEST_TIMEOUT_TIMER_H_ |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 /** |
|
24 * Multimedia test timer completion callback |
|
25 */ |
|
26 class MTestTimeOutTimerCallback |
|
27 { |
|
28 public: |
|
29 /** |
|
30 * Method from which CTestTimeOutTimer informs the user of the timer completion. |
|
31 */ |
|
32 virtual void TimerCompleted() = 0; |
|
33 }; |
|
34 |
|
35 /** |
|
36 * Multimedia test timer active object. |
|
37 * |
|
38 * On timer completion MTestTimeOutTimerCallback::TimerCompleted is called |
|
39 * to inform the user off the completion |
|
40 */ |
|
41 class CTestTimeOutTimer : public CTimer |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * Destructor |
|
46 */ |
|
47 IMPORT_C virtual ~CTestTimeOutTimer(); |
|
48 |
|
49 /** |
|
50 * Two phase constructor that allocates and constructs |
|
51 * a new Multimedia timer a timer completion callback and priority. |
|
52 * |
|
53 * \param aTestTimerCallback object to inform on timer completion. |
|
54 * \param aPriority priority of active object. |
|
55 * \return New Multimedia test timer active object. |
|
56 */ |
|
57 IMPORT_C static CTestTimeOutTimer* NewL(MTestTimeOutTimerCallback& aTestTimerCallback, TInt aPriority=EPriorityStandard); |
|
58 |
|
59 /** |
|
60 * Two phase constructor that allocates and constructs |
|
61 * a new Multimedia timer a timer completion callback and priority. |
|
62 * |
|
63 * \param aTestTimerCallback object to inform on timer completion. |
|
64 * \param aPriority priority of active object. |
|
65 * \return New Multimedia test timer active object. |
|
66 */ |
|
67 IMPORT_C static CTestTimeOutTimer* NewLC(MTestTimeOutTimerCallback& aTestTimerCallback, TInt aPriority=EPriorityStandard); |
|
68 |
|
69 /** |
|
70 * Active object RunL implementation. |
|
71 * |
|
72 * Calls the MTestTimeOutTimerCallback::TimerCompleted to inform user that the timer has completed. |
|
73 */ |
|
74 void RunL(); |
|
75 |
|
76 protected: |
|
77 /** |
|
78 * Protected constructor with timer completion callback and priority. |
|
79 * |
|
80 * Called by two phase constructor. |
|
81 * |
|
82 * \param aTestTimerCallback object to inform on timer completion. |
|
83 * \param aPriority priority of active object. |
|
84 */ |
|
85 CTestTimeOutTimer(MTestTimeOutTimerCallback& aTestTimerCallback, TInt aPriority); |
|
86 |
|
87 private: |
|
88 /** |
|
89 * This is internal and not intended for use. |
|
90 * |
|
91 * Second phase of two phase constructor. |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 private: |
|
96 /** |
|
97 * This is internal and not intended for use. |
|
98 */ |
|
99 MTestTimeOutTimerCallback& iTestTimerCallback; |
|
100 }; |
|
101 |
|
102 #endif /* __SMOKETEST_TIMEOUT_TIMER_H_ */ |