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 ANIMATIONAO_H |
|
12 #define ANIMATIONAO_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 MAnimationObserver |
|
18 { |
|
19 public: |
|
20 virtual void Notify() = 0; |
|
21 ~MAnimationObserver() {} |
|
22 protected: |
|
23 MAnimationObserver() {} |
|
24 }; |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 class CAnimationAO : public CActive |
|
31 { |
|
32 public: |
|
33 // Cancel and destroy |
|
34 ~CAnimationAO(); |
|
35 |
|
36 // Two-phased constructor. |
|
37 static CAnimationAO* NewL(); |
|
38 |
|
39 // Two-phased constructor. |
|
40 static CAnimationAO* NewLC(); |
|
41 |
|
42 public: |
|
43 // New functions |
|
44 // Function for making the initial request |
|
45 void StartL(TTimeIntervalMicroSeconds32 aDelay); |
|
46 void SetObserver(MAnimationObserver *aObserver); |
|
47 |
|
48 private: |
|
49 // C++ constructor |
|
50 CAnimationAO(); |
|
51 |
|
52 // Second-phase constructor |
|
53 void ConstructL(); |
|
54 |
|
55 |
|
56 |
|
57 private: |
|
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 MAnimationObserver *iObserver; |
|
72 }; |
|
73 |
|
74 #endif // ANIMATIONAO_H |