|
1 /* |
|
2 * Copyright (c) 2004 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: LandmarksUi Content File |
|
15 * Handle active object operations |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 #ifndef CLMKAOOPERATION_H |
|
27 #define CLMKAOOPERATION_H |
|
28 |
|
29 // INCLUDES |
|
30 #include "MLmkAOOperationObserver.h" |
|
31 #include <e32base.h> // CBase |
|
32 |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CPosLmOperation; |
|
36 class MLmkAOOperationObserver; |
|
37 class TOperationTypes; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * CLmkAOOperation class |
|
43 */ |
|
44 class CLmkAOOperation : public CActive |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 /** |
|
48 * Constructor |
|
49 * @param aLmOperation |
|
50 * @param aObserver |
|
51 * @param aType |
|
52 * @param aProgressNote |
|
53 * @return newly instantiated object |
|
54 */ |
|
55 IMPORT_C static CLmkAOOperation* NewL( |
|
56 CPosLmOperation* aLmOperation, |
|
57 MLmkAOOperationObserver& aObserver, |
|
58 MLmkAOOperationObserver::TOperationTypes aType, |
|
59 TBool aProgressNote ); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 IMPORT_C ~CLmkAOOperation(); |
|
65 |
|
66 public: // New methods |
|
67 /** |
|
68 * Start AO operation |
|
69 * |
|
70 */ |
|
71 IMPORT_C void StartOperation(); |
|
72 |
|
73 /** |
|
74 * Stop AO operation |
|
75 * |
|
76 */ |
|
77 IMPORT_C void StopOperation(); |
|
78 |
|
79 private: // From CActive |
|
80 void RunL(); |
|
81 void DoCancel(); |
|
82 |
|
83 protected: // Constructors and destructor |
|
84 /** |
|
85 * C++ constructor. |
|
86 * @param aLmOperation |
|
87 * @param aObserver |
|
88 * @param aType |
|
89 * @param aProgressNote |
|
90 * @return newly instantiated object |
|
91 */ |
|
92 IMPORT_C CLmkAOOperation( CPosLmOperation* aLmOperation, |
|
93 MLmkAOOperationObserver& aObserver, |
|
94 MLmkAOOperationObserver::TOperationTypes aType, |
|
95 TBool aProgressNote ); |
|
96 |
|
97 /** |
|
98 * By default Symbian 2nd phase constructor is private. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 protected: // Data |
|
103 TReal32 iProgress; |
|
104 |
|
105 ///Own: |
|
106 CPosLmOperation* iLmOperation; |
|
107 |
|
108 MLmkAOOperationObserver& iObserver; |
|
109 |
|
110 MLmkAOOperationObserver::TOperationTypes iType; |
|
111 |
|
112 TBool iProgressNote; |
|
113 RTimer iTimer; |
|
114 TBool iIsTimerSet; |
|
115 }; |
|
116 |
|
117 #endif // CLMKAOOPERATION_H |
|
118 |
|
119 // End of File |