equal
deleted
inserted
replaced
|
1 /* |
|
2 ============================================================================ |
|
3 Name : AnimationAO.h |
|
4 Author : |
|
5 Version : 1.0 |
|
6 Copyright : Your copyright notice |
|
7 Description : CAnimationAO declaration |
|
8 ============================================================================ |
|
9 */ |
|
10 |
|
11 #ifndef ROLLAO_H |
|
12 #define ROLLAO_H |
|
13 |
|
14 #include <e32base.h> // For CActive, link against: euser.lib |
|
15 #include <e32std.h> // For RTimer, link against: euser.lib |
|
16 |
|
17 class MRollObserver |
|
18 { |
|
19 public: |
|
20 virtual void Roll() = 0; |
|
21 ~MRollObserver() {} |
|
22 protected: |
|
23 MRollObserver() {} |
|
24 }; |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 class CRollAO : public CActive |
|
31 { |
|
32 public: |
|
33 // Cancel and destroy |
|
34 ~CRollAO(); |
|
35 |
|
36 // Two-phased constructor. |
|
37 static CRollAO* NewL(); |
|
38 |
|
39 // Two-phased constructor. |
|
40 static CRollAO* NewLC(); |
|
41 |
|
42 public: |
|
43 // New functions |
|
44 // Function for making the initial request |
|
45 void StartL(TTimeIntervalMicroSeconds32 aDelay); |
|
46 void SetObserver(MRollObserver *aObserver); |
|
47 |
|
48 private: |
|
49 // C++ constructor |
|
50 CRollAO(); |
|
51 |
|
52 // Second-phase constructor |
|
53 void ConstructL(); |
|
54 |
|
55 |
|
56 |
|
57 protected: |
|
58 // From CActive |
|
59 // Handle completion |
|
60 void RunL(); |
|
61 |
|
62 // How to cancel me |
|
63 void DoCancel(); |
|
64 |
|
65 // Override to handle leaves from RunL(). Default implementation causes |
|
66 // the active scheduler to panic. |
|
67 TInt RunError(TInt aError); |
|
68 |
|
69 private: |
|
70 RTimer iTimer; // Provides async timing service |
|
71 MRollObserver *iObserver; |
|
72 }; |
|
73 |
|
74 #endif // ANIMATIONAO_H |