|
1 /* |
|
2 * Copyright (c) 2005 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: Blid Location can be requested. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __MBLIDLOCATION_H__ |
|
21 #define __MBLIDLOCATION_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <lbspositioninfo.h> |
|
25 #include <lbs.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MBlidEngObserver; |
|
29 class TPosition; |
|
30 class TCourse; |
|
31 class RPositionServer; |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * This Blid application engine API is only used by Blid application. |
|
36 * Blid location can be requested with help of this API. |
|
37 * |
|
38 */ |
|
39 class MBlidLocation |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~MBlidLocation(){}; |
|
46 |
|
47 public: // New functions |
|
48 /** |
|
49 * Sets location observer |
|
50 * |
|
51 * @param aObserver A reference to observer |
|
52 */ |
|
53 virtual void SetObserver(MBlidEngObserver& aObserver, TInt aViewId) = 0; |
|
54 |
|
55 /** |
|
56 * Removes location observer |
|
57 * |
|
58 */ |
|
59 virtual void RemoveModelObserver() = 0; |
|
60 |
|
61 /** |
|
62 * Initialize location request, must call StartRequesting() |
|
63 * method after this. |
|
64 */ |
|
65 virtual void InitialLocationRequestL( const TDesC& aSrvName ) = 0; |
|
66 |
|
67 /** |
|
68 * Get current position |
|
69 * |
|
70 */ |
|
71 virtual TPosition& GetCurrentPosition() = 0; |
|
72 |
|
73 /** |
|
74 * Get position course info |
|
75 * |
|
76 */ |
|
77 virtual TCourse& GetCourse() = 0; |
|
78 |
|
79 /** |
|
80 * Cancel request |
|
81 */ |
|
82 virtual void CancelRequest() = 0; |
|
83 |
|
84 /** |
|
85 * Stop requesting |
|
86 */ |
|
87 virtual void StopRequesting() = 0; |
|
88 |
|
89 /** |
|
90 * Start requesting |
|
91 */ |
|
92 virtual void StartRequesting() = 0; |
|
93 |
|
94 /** |
|
95 * Is application online or offline mode |
|
96 * ETrue = online, EFalse = offline |
|
97 */ |
|
98 virtual TBool IsOnline() = 0; |
|
99 |
|
100 /** |
|
101 * Is PSY capable of returning satellite information |
|
102 * ETrue if can, EFalse id can't |
|
103 */ |
|
104 virtual TBool SatelliteCapability() = 0; |
|
105 |
|
106 /** |
|
107 * Return speed average |
|
108 * @return speed average |
|
109 */ |
|
110 virtual TReal SpeedAverage() = 0; |
|
111 |
|
112 /** |
|
113 * Return status of position query |
|
114 * @return istatus |
|
115 */ |
|
116 virtual TInt GetPositionInfoStatus() = 0; |
|
117 |
|
118 /** |
|
119 * Return status of the PSY |
|
120 * @return istatus |
|
121 */ |
|
122 virtual void GetModuleInfoStatus(TPositionModuleStatusBase& aPosModuleStatus) = 0; |
|
123 |
|
124 /** |
|
125 * Returns number of satellites |
|
126 * @return istatus |
|
127 */ |
|
128 virtual void GetNumOfSatellitesL(TInt& anumSatellites) = 0; |
|
129 |
|
130 /** |
|
131 * Return max speed |
|
132 * @returns max speed |
|
133 */ |
|
134 virtual TReal MaxSpeed() = 0; |
|
135 |
|
136 /** |
|
137 * Resets max speed variable |
|
138 * |
|
139 */ |
|
140 virtual void ResetMaxSpeed() = 0; |
|
141 |
|
142 /** |
|
143 * Resets avg speed variable |
|
144 * |
|
145 */ |
|
146 virtual void ResetAvgSpeed()=0; |
|
147 |
|
148 /** |
|
149 * Set the trip start variable |
|
150 */ |
|
151 virtual void SetTripStartL( )=0 ; |
|
152 |
|
153 /** |
|
154 * Return the iIsTripStart variable |
|
155 */ |
|
156 virtual TBool HasTripStarted( )=0 ; |
|
157 |
|
158 /** |
|
159 * Set the trip stop variable |
|
160 */ |
|
161 virtual void SetTripStop()=0 ; |
|
162 |
|
163 /** |
|
164 * Return the iIsTripNotStart variable |
|
165 */ |
|
166 virtual TBool HasTripNotStarted( ) =0 ; |
|
167 |
|
168 /** |
|
169 * All the display for the current trip are |
|
170 * reset |
|
171 */ |
|
172 virtual void ResetTrip() = 0; |
|
173 |
|
174 virtual void GetTripTime( TTimeIntervalSeconds& aTime )=0; |
|
175 |
|
176 virtual void GetTotalTime( TTimeIntervalSeconds& aTime )=0; |
|
177 |
|
178 virtual TBool IsTripDistanceTravelled()=0; |
|
179 |
|
180 virtual TBool IsTotalDistanceTravelled() = 0; |
|
181 |
|
182 virtual void GetTripDistance( TReal32& aDistance ) = 0; |
|
183 |
|
184 virtual void GetTotalDistance( TReal32& aDistance ) = 0; |
|
185 |
|
186 virtual void SetTripResumeL()=0; |
|
187 |
|
188 /** |
|
189 * Set the trip clear variable |
|
190 */ |
|
191 virtual void SetTripClear( ) = 0 ; |
|
192 |
|
193 /** |
|
194 * Return the iIsTripClear variable |
|
195 */ |
|
196 virtual TBool IsTripCleared( ) = 0 ; |
|
197 |
|
198 /** |
|
199 * To set the iIsTripClear variable to false |
|
200 */ |
|
201 virtual void ResetTripClear() = 0; |
|
202 |
|
203 /** |
|
204 * Function to check if trip |
|
205 * is stopped and is reset |
|
206 */ |
|
207 virtual TBool IsTripReset() = 0; |
|
208 |
|
209 /** |
|
210 * Function to return the recorded |
|
211 * heading |
|
212 * |
|
213 */ |
|
214 virtual TReal32 GetHeading() = 0; |
|
215 |
|
216 /** |
|
217 * Function to check if GPS |
|
218 * device is paired and if available |
|
219 */ |
|
220 virtual TInt CheckGPSAvailability() = 0; |
|
221 |
|
222 /** |
|
223 * Function to check if GPS |
|
224 * data is available. i.e |
|
225 * if satellites are visible |
|
226 */ |
|
227 virtual TBool IsGPSDataAvailable() = 0; |
|
228 |
|
229 /** |
|
230 * Trip meter function to get the |
|
231 * average speed in the trip |
|
232 */ |
|
233 virtual TReal32 GetTripAverageSpeed() = 0; |
|
234 |
|
235 /** |
|
236 * Trip meter function to get the |
|
237 * maximum speed in the trip |
|
238 */ |
|
239 virtual TReal32 GetTripMaxSpeed() = 0; |
|
240 |
|
241 /** |
|
242 * Trip meter function to determine |
|
243 * if GPS data was lost when trip was running |
|
244 */ |
|
245 virtual TBool WasGPSDataLost() = 0; |
|
246 |
|
247 /** |
|
248 * Set function for trip meter GPS data |
|
249 * availability |
|
250 */ |
|
251 virtual void SetGPSDataAvailability(TBool aAvailability) = 0; |
|
252 |
|
253 /** |
|
254 * Function to get the current update |
|
255 * interval set |
|
256 */ |
|
257 virtual void GetCurrentUpdateInterval(TInt& aInterval) = 0; |
|
258 |
|
259 /** |
|
260 * Function to determine if GPS data was available |
|
261 * when trip was stopped |
|
262 */ |
|
263 virtual TBool WasGPSAvailableOnTripStop() = 0; |
|
264 |
|
265 /** |
|
266 * Function to check if GPS data is awaited. |
|
267 * Returns true if connection to the GPS device is |
|
268 * being established or if connection is being established |
|
269 * and some satellites are visible but fix not available |
|
270 */ |
|
271 virtual TBool WaitingGPSData() = 0; |
|
272 |
|
273 /** |
|
274 * Function to get the PSY connection status |
|
275 */ |
|
276 virtual TBool IsGPSDeviceConnected() = 0; |
|
277 |
|
278 /** |
|
279 * Function to get the Registered View ID |
|
280 */ |
|
281 virtual TInt GetRegisteredViewId() = 0; |
|
282 |
|
283 /** |
|
284 * Function to get the PSY module status |
|
285 * notification event to CBlidLocation //added for TSW error. |
|
286 */ |
|
287 virtual void GetModuleInfoNotificationL() = 0; |
|
288 |
|
289 /** |
|
290 * Set the Navigation start variable |
|
291 */ |
|
292 virtual void SetNavigationStart( TBool aNavigationStart )=0 ; |
|
293 |
|
294 /** |
|
295 * Reset Odometer Valye |
|
296 */ |
|
297 virtual void ResetOdometerValue()=0 ; |
|
298 |
|
299 virtual TBool IsSatCapablePsyAvailable() = 0; |
|
300 |
|
301 virtual TInt NumberOfSatellitesVisible() = 0; |
|
302 |
|
303 virtual TBool IsSatellitesUsed( TInt aIndex ) = 0; |
|
304 |
|
305 virtual TInt GetSatelliteSignalStrength( TInt aIndex ) = 0; |
|
306 |
|
307 virtual TInt GetSatelliteNo( TInt aIndex ) = 0; |
|
308 |
|
309 }; |
|
310 |
|
311 #endif // __MBLIDLOCATION_H__ |
|
312 |
|
313 // End of File |