1 /* |
|
2 * Copyright (c) 2010 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: CInheritedCFlexTimer inherits and implements CFlexTimer for testing purposes. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 1 % |
|
20 */ |
|
21 |
|
22 #ifndef CINHERITEDCFLEXTIMER2_H |
|
23 #define CINHERITEDCFLEXTIMER2_H |
|
24 |
|
25 // INCLUDE FILES |
|
26 #include "flextimer.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * desc |
|
31 * |
|
32 * @see CFlexTimer |
|
33 * @see CPeriodic |
|
34 * |
|
35 */ |
|
36 class CInheritedCFlexTimer2 : public CFlexTimer |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * A leaving constructor for the object. |
|
42 * @param aPriority of the active object. If timing is critical, it |
|
43 * should be higher than that of all other active objects owned by the |
|
44 * scheduler. |
|
45 * @return A pointer to a CInheritedCFlexTimer2 object on success. |
|
46 * On error it leaves. |
|
47 */ |
|
48 static CInheritedCFlexTimer2* NewL( TInt aPriority, |
|
49 TCallBack aCallBack, TInt aId ); |
|
50 |
|
51 /** |
|
52 * Destructor for the object. |
|
53 */ |
|
54 virtual ~CInheritedCFlexTimer2(); |
|
55 |
|
56 /** |
|
57 * desc |
|
58 */ |
|
59 void SetCB( TCallBack aCallBack ); |
|
60 |
|
61 /** |
|
62 * desc |
|
63 */ |
|
64 TInt MyOwnConfigure( TTimeIntervalMicroSeconds32 aDelayWindow ); |
|
65 |
|
66 protected: |
|
67 |
|
68 /** |
|
69 * Inherited from CActive. |
|
70 */ |
|
71 virtual void RunL(); |
|
72 |
|
73 private: |
|
74 |
|
75 /** |
|
76 * Constructs the object. The second phase of the construction. |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 /** |
|
81 * Private constructor for the object. |
|
82 * @param aPriority The priority of the active object. If timing is |
|
83 * critical, it should be higher than that of all other active objects |
|
84 * owned by the scheduler. |
|
85 */ |
|
86 CInheritedCFlexTimer2( TInt aPriority, TCallBack aCallBack, TInt aId ); |
|
87 |
|
88 private: |
|
89 |
|
90 /** |
|
91 * The callback function which is called at the completion of |
|
92 * flextimer server requests. |
|
93 */ |
|
94 TCallBack iCallBack; |
|
95 |
|
96 TInt iId; |
|
97 |
|
98 }; |
|
99 |
|
100 #endif /* CINHERITEDCFLEXTIMER2_H */ |
|