1 /* |
|
2 * Copyright (c) 2006 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: Location Triggering Management Plugin Engine |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CLBTMGMTPLUGINENGINE_H_ |
|
19 #define CLBTMGMTPLUGINENGINE_H_ |
|
20 |
|
21 // System Includes |
|
22 #include <e32base.h> |
|
23 #include <bamdesca.h> // MDesCArray |
|
24 |
|
25 // User Includes |
|
26 #include "lbtmgmtadapterobserver.h" |
|
27 |
|
28 // Forward Declarations |
|
29 class MLbtMgmtEngObserver; |
|
30 class CLbtMgmtLbtAdapter; |
|
31 |
|
32 // Constant Declarations |
|
33 |
|
34 // Class Definition |
|
35 |
|
36 /** |
|
37 * Engine for Location Triggering Management Plugin. |
|
38 * |
|
39 * The class for interacting accessing and modifying Triggering Management settings. The |
|
40 * class interfaces with the corresponding Adapter Class for Trigger Status |
|
41 * and Default Tone. |
|
42 * Further, its also doubles up as a model for the Location Triggering Management |
|
43 * list-box |
|
44 */ |
|
45 class CLbtMgmtPluginEngine : public CBase, |
|
46 public MDesCArray, |
|
47 public MLbtMgmtAdapterObserver |
|
48 { |
|
49 public: |
|
50 /** |
|
51 * Enumeration for the Settings list |
|
52 */ |
|
53 enum TSettingsList |
|
54 { |
|
55 /** |
|
56 * Trigger status |
|
57 */ |
|
58 ETriggeringStatus = 0, |
|
59 |
|
60 /** |
|
61 * Active Triggers |
|
62 */ |
|
63 EActiveTriggers |
|
64 }; |
|
65 public: |
|
66 /** |
|
67 * Creates new Location Triggering Management plug-in engine instance. |
|
68 * |
|
69 * @param aEngineObserver Observer to the Triggering Management engine |
|
70 * @return CLbtMgmtPluginEngine* Reference to the application view |
|
71 */ |
|
72 static CLbtMgmtPluginEngine* NewL( MLbtMgmtEngObserver& aEngineObserver ); |
|
73 |
|
74 /** |
|
75 * Creates new Location Triggering Management plug-in engine instance. |
|
76 * Leaves the object on the Clean-up stack. |
|
77 * |
|
78 * @param aEngineObserver Observer to the Triggering Management engine |
|
79 * @return CLbtMgmtPluginEngine* Reference to the application view |
|
80 */ |
|
81 static CLbtMgmtPluginEngine* NewLC( MLbtMgmtEngObserver& aEngineObserver ); |
|
82 |
|
83 /** |
|
84 * Destructor |
|
85 */ |
|
86 ~CLbtMgmtPluginEngine(); |
|
87 |
|
88 public: |
|
89 /** |
|
90 * Inherited from MDesCArray |
|
91 */ |
|
92 TInt MdcaCount() const; |
|
93 |
|
94 /** |
|
95 * Inherited from MDesCArray |
|
96 */ |
|
97 TPtrC16 MdcaPoint( TInt aIndex ) const; |
|
98 |
|
99 /** |
|
100 * Inherited from MLbtMgmtAdapterObserver |
|
101 */ |
|
102 void HandleSettingsChangeL(); |
|
103 |
|
104 public: |
|
105 /** |
|
106 * Closes the running Settings UI prematurely. This would result in dismissing |
|
107 * any active dialogs currently running |
|
108 */ |
|
109 void Close(); |
|
110 |
|
111 /** |
|
112 * Change Trigger settings |
|
113 */ |
|
114 void ChangeTiggerStatusL(); |
|
115 |
|
116 /** |
|
117 * Toggle Trigger settings |
|
118 */ |
|
119 void ToggleTiggerStatusL(); |
|
120 |
|
121 /** |
|
122 * Show Info dialog for active triggers |
|
123 */ |
|
124 void ShowInfoDialogL(); |
|
125 |
|
126 /** |
|
127 * Clears all triggers |
|
128 */ |
|
129 void ClearAllTriggersL(); |
|
130 |
|
131 /** |
|
132 * Returns total active triggers |
|
133 */ |
|
134 TInt ActiveTriggers(); |
|
135 |
|
136 private: |
|
137 /** |
|
138 * Constructor |
|
139 */ |
|
140 CLbtMgmtPluginEngine( MLbtMgmtEngObserver& aEngineObserver ); |
|
141 |
|
142 /** |
|
143 * Second Phase Constructor |
|
144 */ |
|
145 void ConstructL(); |
|
146 |
|
147 private: |
|
148 |
|
149 /** |
|
150 * Reference to the Engine observer |
|
151 */ |
|
152 MLbtMgmtEngObserver& iObserver; |
|
153 |
|
154 /** |
|
155 * Lbt Adapter handle |
|
156 * Owns |
|
157 */ |
|
158 CLbtMgmtLbtAdapter* iLbtAdapter; |
|
159 |
|
160 /** |
|
161 * Triggering Settings heading |
|
162 * Owns |
|
163 */ |
|
164 HBufC16* iTriggeringTitle; |
|
165 |
|
166 /** |
|
167 * Active Triggers Settings heading |
|
168 * Owns |
|
169 */ |
|
170 HBufC16* iActiveTitle; |
|
171 |
|
172 /** |
|
173 * No Active Triggers Settings heading |
|
174 * Owns |
|
175 */ |
|
176 HBufC16* iNoActiveTitle; |
|
177 |
|
178 /* Info message about active triggers |
|
179 * Owns |
|
180 */ |
|
181 HBufC16* iInfoMessage; |
|
182 |
|
183 /** |
|
184 * Triggering Settings Value - On |
|
185 * Owns |
|
186 */ |
|
187 HBufC16* iOnSettings; |
|
188 |
|
189 /** |
|
190 * Triggering Settings Value - Off |
|
191 * Owns |
|
192 */ |
|
193 HBufC16* iOffSettings; |
|
194 |
|
195 /** |
|
196 * Temporary Buffer for returning values to the Accessor |
|
197 * functions. |
|
198 * Owns |
|
199 */ |
|
200 HBufC16* iConversionBuffer; |
|
201 |
|
202 /** |
|
203 * Boolean value to denote whether any settings dialog is currently |
|
204 * outstanding |
|
205 */ |
|
206 TBool iSettingsDialogOutstanding; |
|
207 |
|
208 /** |
|
209 * Total Active Triggers |
|
210 * |
|
211 */ |
|
212 TInt iTotalActiveTriggers; |
|
213 |
|
214 }; |
|
215 |
|
216 #endif // CLBTMGMTPLUGINENGINE_H_ |
|
217 |
|