williamr@2
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __LBSCOMMON_H__
|
williamr@2
|
17 |
#define __LBSCOMMON_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#include <e32std.h>
|
williamr@2
|
20 |
#include <e32math.h>
|
williamr@2
|
21 |
#include <lbsrequestor.h>
|
williamr@2
|
22 |
#include <lbsclasstypes.h>
|
williamr@2
|
23 |
#include <lbserrors.h>
|
williamr@2
|
24 |
#include <lbs/lbsvariant.h>
|
williamr@2
|
25 |
|
williamr@2
|
26 |
/**
|
williamr@2
|
27 |
@publishedAll
|
williamr@2
|
28 |
@released
|
williamr@2
|
29 |
// A compile time assert macro. The aExpr parameter must evaluate to an
|
williamr@2
|
30 |
// integer value at compile time.
|
williamr@2
|
31 |
// eg. sizeof(TTime) == KSizeOfTInt64
|
williamr@2
|
32 |
// If aExpr is false, the compiler generates an error.
|
williamr@2
|
33 |
// If aExpr is true, the compilation continues, and use of this macro will not
|
williamr@2
|
34 |
// result in any extra object code.
|
williamr@2
|
35 |
*/
|
williamr@2
|
36 |
#define POSITION_COMPILE_TIME_ASSERT(aExpr) typedef char assert_type[aExpr ? 1 : -1]
|
williamr@2
|
37 |
|
williamr@2
|
38 |
/**
|
williamr@2
|
39 |
@publishedAll
|
williamr@2
|
40 |
@released
|
williamr@2
|
41 |
|
williamr@2
|
42 |
Maximum characters in module name.
|
williamr@2
|
43 |
If __S60_ is defined in lbsvariant.h the constant is 64 otherwise it is 20
|
williamr@2
|
44 |
*/
|
williamr@2
|
45 |
const TInt KPositionMaxModuleName = __LBS_MAX_MODULE_NAME;
|
williamr@2
|
46 |
|
williamr@2
|
47 |
/**
|
williamr@2
|
48 |
@publishedAll
|
williamr@2
|
49 |
@released
|
williamr@2
|
50 |
|
williamr@2
|
51 |
Maximum size for TUInt
|
williamr@2
|
52 |
*/
|
williamr@2
|
53 |
const TUint KPositionMaxSizeQualityItem = sizeof(TInt64);
|
williamr@2
|
54 |
|
williamr@2
|
55 |
/**
|
williamr@2
|
56 |
@publishedAll
|
williamr@2
|
57 |
@released
|
williamr@2
|
58 |
|
williamr@2
|
59 |
Maximum size for fields
|
williamr@2
|
60 |
*/
|
williamr@2
|
61 |
const TUint KPositionMaxSectionFields = 10;
|
williamr@2
|
62 |
|
williamr@2
|
63 |
/**
|
williamr@2
|
64 |
@publishedAll
|
williamr@2
|
65 |
@released
|
williamr@2
|
66 |
|
williamr@2
|
67 |
Defines typedef for TPositionModuleId
|
williamr@2
|
68 |
*/
|
williamr@2
|
69 |
typedef TUid TPositionModuleId;
|
williamr@2
|
70 |
|
williamr@2
|
71 |
/**
|
williamr@2
|
72 |
@publishedAll
|
williamr@2
|
73 |
@released
|
williamr@2
|
74 |
|
williamr@2
|
75 |
Defines NULL TUid
|
williamr@2
|
76 |
*/
|
williamr@2
|
77 |
const TPositionModuleId KPositionNullModuleId = {KNullUidValue};
|
williamr@2
|
78 |
|
williamr@2
|
79 |
|
williamr@2
|
80 |
class TPositionClassTypeBase
|
williamr@2
|
81 |
/**
|
williamr@2
|
82 |
The base class for classes used to store position information
|
williamr@2
|
83 |
|
williamr@2
|
84 |
@publishedAll
|
williamr@2
|
85 |
@released
|
williamr@2
|
86 |
*/
|
williamr@2
|
87 |
{
|
williamr@2
|
88 |
public:
|
williamr@2
|
89 |
IMPORT_C TUint32 PositionClassType() const;
|
williamr@2
|
90 |
IMPORT_C TUint PositionClassSize() const;
|
williamr@2
|
91 |
|
williamr@2
|
92 |
protected:
|
williamr@2
|
93 |
TPositionClassTypeBase();
|
williamr@2
|
94 |
|
williamr@2
|
95 |
protected:
|
williamr@2
|
96 |
/** The type of the derived class */
|
williamr@2
|
97 |
TUint32 iPosClassType;
|
williamr@2
|
98 |
/** The size of the derived class */
|
williamr@2
|
99 |
TUint iPosClassSize;
|
williamr@2
|
100 |
};
|
williamr@2
|
101 |
|
williamr@2
|
102 |
class TPositionQualityItem
|
williamr@2
|
103 |
/**
|
williamr@2
|
104 |
The class for classes used to store position quality
|
williamr@2
|
105 |
|
williamr@2
|
106 |
@publishedAll
|
williamr@2
|
107 |
@released
|
williamr@2
|
108 |
*/
|
williamr@2
|
109 |
{
|
williamr@2
|
110 |
public:
|
williamr@2
|
111 |
/** Quality result */
|
williamr@2
|
112 |
enum TResult
|
williamr@2
|
113 |
{
|
williamr@2
|
114 |
/** Better */
|
williamr@2
|
115 |
EIsBetter,
|
williamr@2
|
116 |
/** Equal */
|
williamr@2
|
117 |
EIsEqual,
|
williamr@2
|
118 |
/** Worse */
|
williamr@2
|
119 |
EIsWorse
|
williamr@2
|
120 |
};
|
williamr@2
|
121 |
|
williamr@2
|
122 |
/** Preference */
|
williamr@2
|
123 |
enum TValuePreference
|
williamr@2
|
124 |
{
|
williamr@2
|
125 |
/** Smaller values */
|
williamr@2
|
126 |
EPreferSmallerValues,
|
williamr@2
|
127 |
/** Greater values */
|
williamr@2
|
128 |
EPreferGreaterValues
|
williamr@2
|
129 |
};
|
williamr@2
|
130 |
|
williamr@2
|
131 |
/** Size of data type
|
williamr@2
|
132 |
*/
|
williamr@2
|
133 |
enum TDataType
|
williamr@2
|
134 |
{
|
williamr@2
|
135 |
/** Undefined */
|
williamr@2
|
136 |
EUndefined,
|
williamr@2
|
137 |
/** TInt8 */
|
williamr@2
|
138 |
ETInt8,
|
williamr@2
|
139 |
/** TInt16 */
|
williamr@2
|
140 |
ETInt16,
|
williamr@2
|
141 |
/** TInt32 */
|
williamr@2
|
142 |
ETInt32,
|
williamr@2
|
143 |
/** Tint64 */
|
williamr@2
|
144 |
ETInt64,
|
williamr@2
|
145 |
/** TUint8 */
|
williamr@2
|
146 |
ETUint8,
|
williamr@2
|
147 |
/** TUint16 */
|
williamr@2
|
148 |
ETUint16,
|
williamr@2
|
149 |
/** TUint 32 */
|
williamr@2
|
150 |
ETUint32,
|
williamr@2
|
151 |
/** TReal32 */
|
williamr@2
|
152 |
ETReal32,
|
williamr@2
|
153 |
/** TReal64 */
|
williamr@2
|
154 |
ETReal64,
|
williamr@2
|
155 |
/** ETime */
|
williamr@2
|
156 |
ETTime,
|
williamr@2
|
157 |
/** Time in microseconds */
|
williamr@2
|
158 |
ETTimeIntervalMicroSeconds
|
williamr@2
|
159 |
};
|
williamr@2
|
160 |
|
williamr@2
|
161 |
TPositionQualityItem();
|
williamr@2
|
162 |
|
williamr@2
|
163 |
TInt Compare(const TPositionQualityItem& aItem, TResult& aComparison) const;
|
williamr@2
|
164 |
|
williamr@2
|
165 |
void Set(TDataType aDataType, TValuePreference aValuePreference,
|
williamr@2
|
166 |
const TAny* aData, TUint aSizeOfData);
|
williamr@2
|
167 |
|
williamr@2
|
168 |
TInt Get(TDataType aDataType, TAny* aData, TUint aSizeOfData) const;
|
williamr@2
|
169 |
|
williamr@2
|
170 |
TBool IsDefined() const;
|
williamr@2
|
171 |
|
williamr@2
|
172 |
private:
|
williamr@2
|
173 |
/** Internal datatype */
|
williamr@2
|
174 |
TDataType iDataType;
|
williamr@2
|
175 |
/** Internel value preference */
|
williamr@2
|
176 |
TValuePreference iScaleDirection;
|
williamr@2
|
177 |
/** Unused variable for future expansion. */
|
williamr@2
|
178 |
TUint8 iData[KPositionMaxSizeQualityItem];
|
williamr@2
|
179 |
};
|
williamr@2
|
180 |
|
williamr@2
|
181 |
class TPositionQualityBase : public TPositionClassTypeBase
|
williamr@2
|
182 |
/**
|
williamr@2
|
183 |
The base class for classes used to store position quality information
|
williamr@2
|
184 |
|
williamr@2
|
185 |
@publishedAll
|
williamr@2
|
186 |
@released
|
williamr@2
|
187 |
*/
|
williamr@2
|
188 |
{
|
williamr@2
|
189 |
public:
|
williamr@2
|
190 |
IMPORT_C TInt Compare(const TPositionQualityBase& aPositionQuality,
|
williamr@2
|
191 |
TInt aElementToCompare,
|
williamr@2
|
192 |
TPositionQualityItem::TResult& aComparison) const;
|
williamr@2
|
193 |
|
williamr@2
|
194 |
/**
|
williamr@2
|
195 |
Returns whether an element is defined
|
williamr@2
|
196 |
@publishedAll
|
williamr@2
|
197 |
@released
|
williamr@2
|
198 |
@param aElementId The element Id of that we're interested in.
|
williamr@2
|
199 |
@return TBool if defined
|
williamr@2
|
200 |
*/
|
williamr@2
|
201 |
IMPORT_C TBool IsDefined(TInt aElementId) const;
|
williamr@2
|
202 |
IMPORT_C TInt HighWaterMark() const;
|
williamr@2
|
203 |
protected:
|
williamr@2
|
204 |
IMPORT_C TPositionQualityBase();
|
williamr@2
|
205 |
|
williamr@2
|
206 |
IMPORT_C void ResetElement(TInt aElementId);
|
williamr@2
|
207 |
|
williamr@2
|
208 |
|
williamr@2
|
209 |
/**
|
williamr@2
|
210 |
Sets the data of an element from the array of elements.
|
williamr@2
|
211 |
@publishedAll
|
williamr@2
|
212 |
@released
|
williamr@2
|
213 |
@param aElementId The element Id of that we're interested in.
|
williamr@2
|
214 |
@param aDataType The datatype of the data to be fetched.
|
williamr@2
|
215 |
@param aValuePreference Quality preferences
|
williamr@2
|
216 |
@param aData A pointer to the data to be written into.
|
williamr@2
|
217 |
*/
|
williamr@2
|
218 |
template <class T>
|
williamr@2
|
219 |
inline void SetElement(TInt aElementId, TPositionQualityItem::TDataType aDataType,
|
williamr@2
|
220 |
TPositionQualityItem::TValuePreference aValuePreference, T aData)
|
williamr@2
|
221 |
{DoSetElement(aElementId, aDataType, aValuePreference, &aData, sizeof(T));}
|
williamr@2
|
222 |
|
williamr@2
|
223 |
/**
|
williamr@2
|
224 |
Gets the data of an element from the array of elements.
|
williamr@2
|
225 |
@publishedAll
|
williamr@2
|
226 |
@released
|
williamr@2
|
227 |
@param aElementId The element Id of that we're interested in.
|
williamr@2
|
228 |
@param aDataType The datatype of the data to be fetched.
|
williamr@2
|
229 |
@param aData A pointer to the data to be written into.
|
williamr@2
|
230 |
@return Standard Symbian OS Error code
|
williamr@2
|
231 |
*/
|
williamr@2
|
232 |
template <class T>
|
williamr@2
|
233 |
inline TInt GetElement(TInt aElementId, TPositionQualityItem::TDataType aDataType,
|
williamr@2
|
234 |
T& aData) const
|
williamr@2
|
235 |
{return DoGetElement(aElementId, aDataType, &aData, sizeof(T));}
|
williamr@2
|
236 |
|
williamr@2
|
237 |
private:
|
williamr@2
|
238 |
IMPORT_C void DoSetElement(TInt aElementId, TPositionQualityItem::TDataType aDataType,
|
williamr@2
|
239 |
TPositionQualityItem::TValuePreference aValuePreference,
|
williamr@2
|
240 |
const TAny* aData, TUint aSizeOfData);
|
williamr@2
|
241 |
|
williamr@2
|
242 |
IMPORT_C TInt DoGetElement(TInt aElementId, TPositionQualityItem::TDataType aDataType,
|
williamr@2
|
243 |
TAny* aData, TUint aSizeOfData) const;
|
williamr@2
|
244 |
private:
|
williamr@2
|
245 |
/** Internal array */
|
williamr@2
|
246 |
TFixedArray<TPositionQualityItem, KPositionMaxSectionFields> iPositionQualityData;
|
williamr@2
|
247 |
/** Internal highwater mark */
|
williamr@2
|
248 |
TInt iHighwaterMark;
|
williamr@2
|
249 |
};
|
williamr@2
|
250 |
|
williamr@2
|
251 |
class TPositionQuality : public TPositionQualityBase
|
williamr@2
|
252 |
/**
|
williamr@2
|
253 |
The standard position quality class.
|
williamr@2
|
254 |
|
williamr@2
|
255 |
@publishedAll
|
williamr@2
|
256 |
@released
|
williamr@2
|
257 |
*/
|
williamr@2
|
258 |
{
|
williamr@2
|
259 |
public:
|
williamr@2
|
260 |
/** Cost Indicator for position request */
|
williamr@2
|
261 |
enum TCostIndicator
|
williamr@2
|
262 |
{
|
williamr@2
|
263 |
/** Unknown cost
|
williamr@2
|
264 |
This is the unassigned value and should not be returned */
|
williamr@2
|
265 |
ECostUnknown,
|
williamr@2
|
266 |
|
williamr@2
|
267 |
/** Zero cost
|
williamr@2
|
268 |
No cost is expected to be incurred when obtaining a position fix */
|
williamr@2
|
269 |
ECostZero,
|
williamr@2
|
270 |
|
williamr@2
|
271 |
/** Possible cost
|
williamr@2
|
272 |
The positioning module is uncertain if the user will incur a charge. */
|
williamr@2
|
273 |
ECostPossible,
|
williamr@2
|
274 |
|
williamr@2
|
275 |
/** Charged
|
williamr@2
|
276 |
The positioning module expects a charge to be levied when obtaining
|
williamr@2
|
277 |
position information */
|
williamr@2
|
278 |
ECostCharge
|
williamr@2
|
279 |
};
|
williamr@2
|
280 |
|
williamr@2
|
281 |
/** Power consumption */
|
williamr@2
|
282 |
enum TPowerConsumption
|
williamr@2
|
283 |
{
|
williamr@2
|
284 |
/** Unknown power consumption
|
williamr@2
|
285 |
The positioning module is unable to determine the likely power drain */
|
williamr@2
|
286 |
EPowerUnknown,
|
williamr@2
|
287 |
|
williamr@2
|
288 |
/** Zero power consumption
|
williamr@2
|
289 |
No internal power will be used when obtaining a position fix */
|
williamr@2
|
290 |
EPowerZero,
|
williamr@2
|
291 |
|
williamr@2
|
292 |
/** Low power consumption
|
williamr@2
|
293 |
The positioning module expects a minimum power drain when using the
|
williamr@2
|
294 |
associated technology. This may be comparable to the power usage when
|
williamr@2
|
295 |
the phone is in standby mode. */
|
williamr@2
|
296 |
EPowerLow,
|
williamr@2
|
297 |
|
williamr@2
|
298 |
/** Medium power consumption
|
williamr@2
|
299 |
The positioning module expects a moderate power drain when using the
|
williamr@2
|
300 |
associated technology. This may be comparable to the power usage when
|
williamr@2
|
301 |
the phone is being actively used */
|
williamr@2
|
302 |
EPowerMedium,
|
williamr@2
|
303 |
|
williamr@2
|
304 |
/** High power consumption
|
williamr@2
|
305 |
The positioning module expects a high power drain when using the
|
williamr@2
|
306 |
associated technology. Use of this module will quickly consume the phone's batteries */
|
williamr@2
|
307 |
EPowerHigh
|
williamr@2
|
308 |
};
|
williamr@2
|
309 |
|
williamr@2
|
310 |
public:
|
williamr@2
|
311 |
IMPORT_C TPositionQuality();
|
williamr@2
|
312 |
|
williamr@2
|
313 |
IMPORT_C TTimeIntervalMicroSeconds TimeToFirstFix() const;
|
williamr@2
|
314 |
IMPORT_C TTimeIntervalMicroSeconds TimeToNextFix() const;
|
williamr@2
|
315 |
|
williamr@2
|
316 |
IMPORT_C TReal32 HorizontalAccuracy() const;
|
williamr@2
|
317 |
IMPORT_C TReal32 VerticalAccuracy() const;
|
williamr@2
|
318 |
|
williamr@2
|
319 |
IMPORT_C TCostIndicator CostIndicator() const;
|
williamr@2
|
320 |
IMPORT_C TPowerConsumption PowerConsumption() const;
|
williamr@2
|
321 |
|
williamr@2
|
322 |
IMPORT_C void SetTimeToFirstFix(TTimeIntervalMicroSeconds aTimeToFirstFix);
|
williamr@2
|
323 |
IMPORT_C void SetTimeToNextFix(TTimeIntervalMicroSeconds aTimeToNextFix);
|
williamr@2
|
324 |
|
williamr@2
|
325 |
IMPORT_C void SetHorizontalAccuracy(TReal32 aHorizontalAccuracy);
|
williamr@2
|
326 |
IMPORT_C void SetVerticalAccuracy(TReal32 aVerticalAccuracy);
|
williamr@2
|
327 |
|
williamr@2
|
328 |
IMPORT_C void SetCostIndicator(TCostIndicator aCost);
|
williamr@2
|
329 |
IMPORT_C void SetPowerConsumption(TPowerConsumption aPower);
|
williamr@2
|
330 |
|
williamr@2
|
331 |
private:
|
williamr@2
|
332 |
/** Unused variable for future expansion. */
|
williamr@2
|
333 |
TUint8 iReserved[16];
|
williamr@2
|
334 |
};
|
williamr@2
|
335 |
|
williamr@2
|
336 |
|
williamr@2
|
337 |
class TPositionModuleInfoBase : public TPositionClassTypeBase
|
williamr@2
|
338 |
/**
|
williamr@2
|
339 |
The base class for classes storing information on position modules
|
williamr@2
|
340 |
|
williamr@2
|
341 |
@publishedAll
|
williamr@2
|
342 |
@released
|
williamr@2
|
343 |
*/
|
williamr@2
|
344 |
{
|
williamr@2
|
345 |
protected:
|
williamr@2
|
346 |
IMPORT_C TPositionModuleInfoBase();
|
williamr@2
|
347 |
};
|
williamr@2
|
348 |
|
williamr@2
|
349 |
class TPositionModuleInfo : public TPositionModuleInfoBase
|
williamr@2
|
350 |
/**
|
williamr@2
|
351 |
The standard class for storing information on position modules
|
williamr@2
|
352 |
|
williamr@2
|
353 |
@publishedAll
|
williamr@2
|
354 |
@released
|
williamr@2
|
355 |
*/
|
williamr@2
|
356 |
{
|
williamr@2
|
357 |
public:
|
williamr@2
|
358 |
/**
|
williamr@2
|
359 |
Technology types
|
williamr@2
|
360 |
*/
|
williamr@2
|
361 |
typedef TUint32 TTechnologyType;
|
williamr@2
|
362 |
|
williamr@2
|
363 |
/**
|
williamr@2
|
364 |
Technology Type
|
williamr@2
|
365 |
*/
|
williamr@2
|
366 |
enum _TTechnologyType
|
williamr@2
|
367 |
{
|
williamr@2
|
368 |
/** Indicates that the positioning module is unaware of the technology
|
williamr@2
|
369 |
used to obtain position information */
|
williamr@2
|
370 |
ETechnologyUnknown = 0,
|
williamr@2
|
371 |
/** The primary positioning technology is handset based.
|
williamr@2
|
372 |
For example standard GPS */
|
williamr@2
|
373 |
ETechnologyTerminal = 0x01,
|
williamr@2
|
374 |
/** The primary positioning technology is network based.
|
williamr@2
|
375 |
For example, E-OTD */
|
williamr@2
|
376 |
ETechnologyNetwork = 0x02,
|
williamr@2
|
377 |
/** The primary positioning mechanism receives assistance in some form.
|
williamr@2
|
378 |
Generally to obtain a quicker or more accurate fix */
|
williamr@2
|
379 |
ETechnologyAssisted = 0x04
|
williamr@2
|
380 |
};
|
williamr@2
|
381 |
|
williamr@2
|
382 |
/**
|
williamr@2
|
383 |
Device locations
|
williamr@2
|
384 |
*/
|
williamr@2
|
385 |
typedef TUint32 TDeviceLocation;
|
williamr@2
|
386 |
|
williamr@2
|
387 |
/**
|
williamr@2
|
388 |
Device location
|
williamr@2
|
389 |
*/
|
williamr@2
|
390 |
enum _TDeviceLocation
|
williamr@2
|
391 |
{
|
williamr@2
|
392 |
/** The positioning module is unaware of the hardware used to supply
|
williamr@2
|
393 |
positioning information */
|
williamr@2
|
394 |
EDeviceUnknown = 0,
|
williamr@2
|
395 |
/** The positioning hardware is integral to the terminal */
|
williamr@2
|
396 |
EDeviceInternal = 0x01,
|
williamr@2
|
397 |
/** The positioning hardware is separate from the terminal */
|
williamr@2
|
398 |
EDeviceExternal = 0x02
|
williamr@2
|
399 |
};
|
williamr@2
|
400 |
|
williamr@2
|
401 |
/**
|
williamr@2
|
402 |
Position module capabilities
|
williamr@2
|
403 |
*/
|
williamr@2
|
404 |
typedef TUint32 TCapabilities;
|
williamr@2
|
405 |
|
williamr@2
|
406 |
/**
|
williamr@2
|
407 |
Module Capabilities
|
williamr@2
|
408 |
*/
|
williamr@2
|
409 |
enum _TCapabilities
|
williamr@2
|
410 |
{
|
williamr@2
|
411 |
/** No Capabilities */
|
williamr@2
|
412 |
ECapabilityNone = 0,
|
williamr@2
|
413 |
|
williamr@2
|
414 |
/** Positioning modules with this capability will support the
|
williamr@2
|
415 |
TPositionInfo class and are able to provide latitude and longitude
|
williamr@2
|
416 |
related information
|
williamr@2
|
417 |
*/
|
williamr@2
|
418 |
ECapabilityHorizontal = 0x0001,
|
williamr@2
|
419 |
|
williamr@2
|
420 |
/** Positioning modules with this capability will support the
|
williamr@2
|
421 |
TPositionInfo class and are able to provide height related information
|
williamr@2
|
422 |
*/
|
williamr@2
|
423 |
ECapabilityVertical = 0x0002,
|
williamr@2
|
424 |
|
williamr@2
|
425 |
/** Positioning modules with this capability will support the
|
williamr@2
|
426 |
TPositionCourseInfo class and are able to provide information related
|
williamr@2
|
427 |
to the current horizontal speed
|
williamr@2
|
428 |
*/
|
williamr@2
|
429 |
ECapabilitySpeed = 0x0004,
|
williamr@2
|
430 |
|
williamr@2
|
431 |
/** Positioning modules with this capability will support the
|
williamr@2
|
432 |
TPositionCourseInfo class and are able to provide heading related information
|
williamr@2
|
433 |
*/
|
williamr@2
|
434 |
ECapabilityDirection = 0x0008,
|
williamr@2
|
435 |
|
williamr@2
|
436 |
/** Positioning modules with this capability will support the
|
williamr@2
|
437 |
TPositionSatelliteInfo class. Such a module will be able to return at
|
williamr@2
|
438 |
least some satellite data - but the extent of the information could vary.
|
williamr@2
|
439 |
Applications must ensure that any value returned is valid before it is used
|
williamr@2
|
440 |
*/
|
williamr@2
|
441 |
ECapabilitySatellite = 0x0010,
|
williamr@2
|
442 |
|
williamr@2
|
443 |
/** This value is reserved for future expansion.
|
williamr@2
|
444 |
Positioning modules with this capability will be able to return
|
williamr@2
|
445 |
information related to a magnetic compass. The API does not currently
|
williamr@2
|
446 |
define an extended class that encapsulates this type of information
|
williamr@2
|
447 |
*/
|
williamr@2
|
448 |
ECapabilityCompass = 0x0020,
|
williamr@2
|
449 |
|
williamr@2
|
450 |
/** This value is reserved for future expansion.
|
williamr@2
|
451 |
Positioning modules with this capability will be able to return
|
williamr@2
|
452 |
location information using NMEA formatted text strings.
|
williamr@2
|
453 |
The API does not currently define an extended class that encapsulates
|
williamr@2
|
454 |
this type of information
|
williamr@2
|
455 |
*/
|
williamr@2
|
456 |
ECapabilityNmea = 0x0040,
|
williamr@2
|
457 |
|
williamr@2
|
458 |
/** This value is reserved for future expansion.
|
williamr@2
|
459 |
Positioning modules with this capability will be able to return
|
williamr@2
|
460 |
information related to the postal address of the current location
|
williamr@2
|
461 |
*/
|
williamr@2
|
462 |
ECapabilityAddress = 0x0080,
|
williamr@2
|
463 |
|
williamr@2
|
464 |
/** This value is reserved for future expansion.
|
williamr@2
|
465 |
Positioning modules with this capability will be able to return the
|
williamr@2
|
466 |
current position in terms of where within a building it is. For
|
williamr@2
|
467 |
example, this may include the floor and the room name.
|
williamr@2
|
468 |
The API does not currently define an extended class that encapsulates
|
williamr@2
|
469 |
this type of information
|
williamr@2
|
470 |
*/
|
williamr@2
|
471 |
ECapabilityBuilding = 0x0100,
|
williamr@2
|
472 |
|
williamr@2
|
473 |
/** This value is reserved for future expansion.
|
williamr@2
|
474 |
Positioning modules with this capability will be able to return provide
|
williamr@2
|
475 |
a link to further information about the location. The standard mechanism
|
williamr@2
|
476 |
is via a URL.
|
williamr@2
|
477 |
The API does not currently define an extended class that encapsulates
|
williamr@2
|
478 |
this type of information
|
williamr@2
|
479 |
*/
|
williamr@2
|
480 |
ECapabilityMedia = 0x0200
|
williamr@2
|
481 |
};
|
williamr@2
|
482 |
|
williamr@2
|
483 |
public:
|
williamr@2
|
484 |
IMPORT_C TPositionModuleInfo();
|
williamr@2
|
485 |
|
williamr@2
|
486 |
IMPORT_C TPositionModuleId ModuleId() const;
|
williamr@2
|
487 |
IMPORT_C TBool IsAvailable() const;
|
williamr@2
|
488 |
IMPORT_C void GetModuleName(TDes& aModuleName) const;
|
williamr@2
|
489 |
IMPORT_C void GetPositionQuality(TPositionQuality& aPosQuality) const;
|
williamr@2
|
490 |
IMPORT_C TTechnologyType TechnologyType() const;
|
williamr@2
|
491 |
IMPORT_C TDeviceLocation DeviceLocation() const;
|
williamr@2
|
492 |
IMPORT_C TCapabilities Capabilities() const ;
|
williamr@2
|
493 |
IMPORT_C TUint32 ClassesSupported(TPositionClassFamily aClassType) const;
|
williamr@2
|
494 |
IMPORT_C TVersion Version() const;
|
williamr@2
|
495 |
|
williamr@2
|
496 |
IMPORT_C void SetModuleId(TPositionModuleId aModuleId);
|
williamr@2
|
497 |
IMPORT_C void SetIsAvailable(TBool aIsAvailable);
|
williamr@2
|
498 |
IMPORT_C void SetModuleName(const TDesC& aModuleName);
|
williamr@2
|
499 |
IMPORT_C void SetPositionQuality(const TPositionQuality& aPosQuality);
|
williamr@2
|
500 |
IMPORT_C void SetTechnologyType(TTechnologyType aTechnologyType);
|
williamr@2
|
501 |
IMPORT_C void SetDeviceLocation(TDeviceLocation aDeviceLocation);
|
williamr@2
|
502 |
IMPORT_C void SetCapabilities(TCapabilities aDeviceCapabilities);
|
williamr@2
|
503 |
IMPORT_C void SetClassesSupported(TPositionClassFamily aClassType,
|
williamr@2
|
504 |
TUint32 aSupportedClasses);
|
williamr@2
|
505 |
IMPORT_C void SetVersion(TVersion aVersion);
|
williamr@2
|
506 |
|
williamr@2
|
507 |
protected:
|
williamr@2
|
508 |
/** The module ID */
|
williamr@2
|
509 |
TPositionModuleId iModuleId;
|
williamr@2
|
510 |
/** Whether or not the module is available */
|
williamr@2
|
511 |
TBool iIsAvailable;
|
williamr@2
|
512 |
/** The module name */
|
williamr@2
|
513 |
TBuf<KPositionMaxModuleName> iModuleName;
|
williamr@2
|
514 |
/** The position quality */
|
williamr@2
|
515 |
TPositionQuality iPosQuality;
|
williamr@2
|
516 |
/** The technology type */
|
williamr@2
|
517 |
TTechnologyType iTechnologyType;
|
williamr@2
|
518 |
/** The location of the device associated with this module */
|
williamr@2
|
519 |
TDeviceLocation iDeviceLocation;
|
williamr@2
|
520 |
/** The capabilities of this module */
|
williamr@2
|
521 |
TCapabilities iCapabilities;
|
williamr@2
|
522 |
/** The array of supported classes for the different class types */
|
williamr@2
|
523 |
TFixedArray<TUint32, EPositionLastFamily> iSupportedClassTypes;
|
williamr@2
|
524 |
/** The version of this module */
|
williamr@2
|
525 |
TVersion iVersion;
|
williamr@2
|
526 |
|
williamr@2
|
527 |
private:
|
williamr@2
|
528 |
/** Unused variable for future expansion. */
|
williamr@2
|
529 |
TUint8 iReserved[16];
|
williamr@2
|
530 |
};
|
williamr@2
|
531 |
|
williamr@2
|
532 |
|
williamr@2
|
533 |
class TPositionModuleStatusBase : public TPositionClassTypeBase
|
williamr@2
|
534 |
/**
|
williamr@2
|
535 |
The base class for classes storing a position module's status
|
williamr@2
|
536 |
|
williamr@2
|
537 |
@publishedAll
|
williamr@2
|
538 |
@released
|
williamr@2
|
539 |
*/
|
williamr@2
|
540 |
{
|
williamr@2
|
541 |
protected:
|
williamr@2
|
542 |
IMPORT_C TPositionModuleStatusBase();
|
williamr@2
|
543 |
};
|
williamr@2
|
544 |
|
williamr@2
|
545 |
class TPositionModuleStatus : public TPositionModuleStatusBase
|
williamr@2
|
546 |
/**
|
williamr@2
|
547 |
The normal class for storing a position module's status
|
williamr@2
|
548 |
|
williamr@2
|
549 |
@publishedAll
|
williamr@2
|
550 |
@released
|
williamr@2
|
551 |
*/
|
williamr@2
|
552 |
{
|
williamr@2
|
553 |
public:
|
williamr@2
|
554 |
/** defined type for TDeviceStatus */
|
williamr@2
|
555 |
typedef TInt TDeviceStatus;
|
williamr@2
|
556 |
|
williamr@2
|
557 |
/**
|
williamr@2
|
558 |
* The device status
|
williamr@2
|
559 |
*/
|
williamr@2
|
560 |
enum _TDeviceStatus
|
williamr@2
|
561 |
{
|
williamr@2
|
562 |
/** Device unknown
|
williamr@2
|
563 |
This is not a valid state and should never be reported */
|
williamr@2
|
564 |
EDeviceUnknown,
|
williamr@2
|
565 |
|
williamr@2
|
566 |
/** Device error
|
williamr@2
|
567 |
There are problems using the device. For example, there may be
|
williamr@2
|
568 |
hardware errors. It should not be confused with complete loss of data
|
williamr@2
|
569 |
quality which indicates that the device is functioning correctly but
|
williamr@2
|
570 |
is currently unable to obtain position information.
|
williamr@2
|
571 |
The error state will be reported if the device can not be successfully
|
williamr@2
|
572 |
brought on line. For example, the positioning module may have been unable
|
williamr@2
|
573 |
to communicate with the device or it is not responding as expected.
|
williamr@2
|
574 |
*/
|
williamr@2
|
575 |
EDeviceError,
|
williamr@2
|
576 |
|
williamr@2
|
577 |
/** Device disabled
|
williamr@2
|
578 |
Although the device may be working properly, it has been taken off line
|
williamr@2
|
579 |
and is regarded as being unavailable to obtain position information.
|
williamr@2
|
580 |
This will generally have been done by the user via the control panel.
|
williamr@2
|
581 |
In this state, positioning framework will not use the device.
|
williamr@2
|
582 |
*/
|
williamr@2
|
583 |
EDeviceDisabled,
|
williamr@2
|
584 |
|
williamr@2
|
585 |
/** Device inactive
|
williamr@2
|
586 |
The device is not being used by the positioning framework. This is
|
williamr@2
|
587 |
typically because there are no clients currently obtaining the position
|
williamr@2
|
588 |
from it. This is the normal status that is returned for a module that
|
williamr@2
|
589 |
is not currently loaded by the system
|
williamr@2
|
590 |
*/
|
williamr@2
|
591 |
EDeviceInactive,
|
williamr@2
|
592 |
|
williamr@2
|
593 |
/** Device initialising
|
williamr@2
|
594 |
This is a transient state. The device is being brought out of the
|
williamr@2
|
595 |
"inactive" state but has not reached either the "ready" or "stand by"
|
williamr@2
|
596 |
modes. The initialising state will occur when the positioning module
|
williamr@2
|
597 |
is first selected to provide a client application with location information
|
williamr@2
|
598 |
*/
|
williamr@2
|
599 |
EDeviceInitialising,
|
williamr@2
|
600 |
|
williamr@2
|
601 |
/** Device standby
|
williamr@2
|
602 |
This state indicates the device has entered "sleep" or "power save"
|
williamr@2
|
603 |
mode. This signifies that the device is online, but is not actively
|
williamr@2
|
604 |
retrieving position information. A device will generally enter this mode
|
williamr@2
|
605 |
when the next position update is not required for some time and it is
|
williamr@2
|
606 |
more efficient to partially power down.
|
williamr@2
|
607 |
Note: Not all positioning modules will support this state - particularly
|
williamr@2
|
608 |
when there is external hardware
|
williamr@2
|
609 |
*/
|
williamr@2
|
610 |
EDeviceStandBy,
|
williamr@2
|
611 |
|
williamr@2
|
612 |
/** Device ready
|
williamr@2
|
613 |
The positioning device is online and is ready to retrieve
|
williamr@2
|
614 |
position information
|
williamr@2
|
615 |
*/
|
williamr@2
|
616 |
EDeviceReady,
|
williamr@2
|
617 |
|
williamr@2
|
618 |
/** Device active
|
williamr@2
|
619 |
The positioning device is actively in the process of retrieving
|
williamr@2
|
620 |
position information.
|
williamr@2
|
621 |
Note: Not all positioning modules will support this state - particularly
|
williamr@2
|
622 |
when there is external hardware
|
williamr@2
|
623 |
*/
|
williamr@2
|
624 |
EDeviceActive
|
williamr@2
|
625 |
};
|
williamr@2
|
626 |
|
williamr@2
|
627 |
/** defined type for TDataQualityStatus */
|
williamr@2
|
628 |
typedef TInt TDataQualityStatus;
|
williamr@2
|
629 |
|
williamr@2
|
630 |
/**
|
williamr@2
|
631 |
* The data quality status
|
williamr@2
|
632 |
*/
|
williamr@2
|
633 |
enum _TDataQualityStatus
|
williamr@2
|
634 |
{
|
williamr@2
|
635 |
/** Data Quality Unknown
|
williamr@2
|
636 |
This is the unassigned valued. This state should only be reported
|
williamr@2
|
637 |
during an event indicating that a positioning module has been removed
|
williamr@2
|
638 |
*/
|
williamr@2
|
639 |
EDataQualityUnknown,
|
williamr@2
|
640 |
|
williamr@2
|
641 |
/** Data Quality Loss
|
williamr@2
|
642 |
The accuracy and contents of the position information has been
|
williamr@2
|
643 |
completely compromised. It is no longer possible to return any
|
williamr@2
|
644 |
coherent data.
|
williamr@2
|
645 |
This situation will occur if the device has lost track of all the
|
williamr@2
|
646 |
transmitters (for example, satellites or base stations).
|
williamr@2
|
647 |
It should be noted although it is currently not possible to obtain
|
williamr@2
|
648 |
position information, the device may still be functioning correctly.
|
williamr@2
|
649 |
This state should not be confused with a device error.
|
williamr@2
|
650 |
*/
|
williamr@2
|
651 |
EDataQualityLoss,
|
williamr@2
|
652 |
|
williamr@2
|
653 |
/** Data Quality Partial
|
williamr@2
|
654 |
There has been a partial degradation in the available position
|
williamr@2
|
655 |
information. In particular, it is not possible to provide the required
|
williamr@2
|
656 |
(or expected) quality of information.
|
williamr@2
|
657 |
This situation could occur if the device has lost track of one of the
|
williamr@2
|
658 |
transmitters (for example, satellites or base stations)
|
williamr@2
|
659 |
*/
|
williamr@2
|
660 |
EDataQualityPartial,
|
williamr@2
|
661 |
|
williamr@2
|
662 |
/** Data Quality Normal
|
williamr@2
|
663 |
The positioning device is functioning as expected
|
williamr@2
|
664 |
*/
|
williamr@2
|
665 |
EDataQualityNormal
|
williamr@2
|
666 |
};
|
williamr@2
|
667 |
|
williamr@2
|
668 |
IMPORT_C TPositionModuleStatus();
|
williamr@2
|
669 |
|
williamr@2
|
670 |
IMPORT_C TDeviceStatus DeviceStatus() const;
|
williamr@2
|
671 |
IMPORT_C TDataQualityStatus DataQualityStatus() const;
|
williamr@2
|
672 |
|
williamr@2
|
673 |
|
williamr@2
|
674 |
IMPORT_C void SetDeviceStatus(TDeviceStatus aStatus);
|
williamr@2
|
675 |
IMPORT_C void SetDataQualityStatus(TDataQualityStatus aStatus);
|
williamr@2
|
676 |
|
williamr@2
|
677 |
protected:
|
williamr@2
|
678 |
/** The device status */
|
williamr@2
|
679 |
TDeviceStatus iDeviceStatus;
|
williamr@2
|
680 |
/** The data quality status */
|
williamr@2
|
681 |
TDataQualityStatus iDataQualityStatus;
|
williamr@2
|
682 |
|
williamr@2
|
683 |
private:
|
williamr@2
|
684 |
/** Unused variable for future expansion. */
|
williamr@2
|
685 |
TUint8 iReserved[8];
|
williamr@2
|
686 |
};
|
williamr@2
|
687 |
|
williamr@2
|
688 |
|
williamr@2
|
689 |
class TPositionModuleStatusEventBase : public TPositionClassTypeBase
|
williamr@2
|
690 |
/**
|
williamr@2
|
691 |
The base class for classes storing position module status events
|
williamr@2
|
692 |
|
williamr@2
|
693 |
@publishedAll
|
williamr@2
|
694 |
@released
|
williamr@2
|
695 |
*/
|
williamr@2
|
696 |
{
|
williamr@2
|
697 |
public:
|
williamr@2
|
698 |
/** defined type for TSystemModuleEvent */
|
williamr@2
|
699 |
typedef TUint32 TSystemModuleEvent;
|
williamr@2
|
700 |
|
williamr@2
|
701 |
/**
|
williamr@2
|
702 |
* Module events
|
williamr@2
|
703 |
*/
|
williamr@2
|
704 |
enum _TSystemModuleEvent
|
williamr@2
|
705 |
{
|
williamr@2
|
706 |
/** System Unknown
|
williamr@2
|
707 |
This is not a valid state and should never be reported */
|
williamr@2
|
708 |
ESystemUnknown = 0,
|
williamr@2
|
709 |
|
williamr@2
|
710 |
/** System Error
|
williamr@2
|
711 |
There are problems using the module. For example, the module may have
|
williamr@2
|
712 |
terminated abnormally. It should not be confused with the module
|
williamr@2
|
713 |
reporting the error EDeviceError via TPositionModuleStatus::DeviceStatus().
|
williamr@2
|
714 |
That signifies the module itself is up and running - but it may be
|
williamr@2
|
715 |
unable to successful communicate with the hardware
|
williamr@2
|
716 |
*/
|
williamr@2
|
717 |
ESystemError,
|
williamr@2
|
718 |
|
williamr@2
|
719 |
/** System Module Installed
|
williamr@2
|
720 |
A new positioning module has been dynamically added to the system. To
|
williamr@2
|
721 |
receive this event, the client application must have expressed interest
|
williamr@2
|
722 |
in status notifications from any positioning module. The Id of the newly
|
williamr@2
|
723 |
installed module can be found by calling TPositionModuleStatusEvent::ModuleId().
|
williamr@2
|
724 |
*/
|
williamr@2
|
725 |
ESystemModuleInstalled,
|
williamr@2
|
726 |
|
williamr@2
|
727 |
/** System Module Removed
|
williamr@2
|
728 |
A positioning module is uninstalled. The Id of the removed module can
|
williamr@2
|
729 |
be found by calling TPositionModuleStatusEvent::ModuleId()
|
williamr@2
|
730 |
*/
|
williamr@2
|
731 |
ESystemModuleRemoved
|
williamr@2
|
732 |
};
|
williamr@2
|
733 |
|
williamr@2
|
734 |
/** defined type for TModuleEvent */
|
williamr@2
|
735 |
typedef TUint32 TModuleEvent;
|
williamr@2
|
736 |
|
williamr@2
|
737 |
/**
|
williamr@2
|
738 |
Module events
|
williamr@2
|
739 |
*/
|
williamr@2
|
740 |
enum _TModuleEvent
|
williamr@2
|
741 |
{
|
williamr@2
|
742 |
/** No module event
|
williamr@2
|
743 |
This is the unassigned value and should not be reported or used
|
williamr@2
|
744 |
*/
|
williamr@2
|
745 |
EEventNone = 0,
|
williamr@2
|
746 |
|
williamr@2
|
747 |
/** Module event device status
|
williamr@2
|
748 |
Events about the general status of the device. When this type of event
|
williamr@2
|
749 |
occurs, client applications should inspect the value returned by the
|
williamr@2
|
750 |
TPositionModuleInfo::DeviceStatus() method for more information
|
williamr@2
|
751 |
*/
|
williamr@2
|
752 |
EEventDeviceStatus = 0x01,
|
williamr@2
|
753 |
|
williamr@2
|
754 |
/** Module Data Quality status
|
williamr@2
|
755 |
Events about the quality of the data a module is able to return. When
|
williamr@2
|
756 |
this type of event occurs, client applications should inspect the
|
williamr@2
|
757 |
value returned by the TPositionModuleInfo::DataQualityStatus() method
|
williamr@2
|
758 |
for more information.
|
williamr@2
|
759 |
*/
|
williamr@2
|
760 |
EEventDataQualityStatus = 0x02,
|
williamr@2
|
761 |
|
williamr@2
|
762 |
/** Module System Event
|
williamr@2
|
763 |
System level events about the status of modules. Events of this type
|
williamr@2
|
764 |
indicate when modules have been added or removed from the system. When
|
williamr@2
|
765 |
this event type occurs, client applications should inspect the value
|
williamr@2
|
766 |
returned by TPositionModuleInfo::SystemModuleEvent() to determine which
|
williamr@2
|
767 |
particular event was responsible
|
williamr@2
|
768 |
*/
|
williamr@2
|
769 |
EEventSystemModuleEvent = 0x04,
|
williamr@2
|
770 |
|
williamr@2
|
771 |
/** All events */
|
williamr@2
|
772 |
EEventAll = EEventDeviceStatus |
|
williamr@2
|
773 |
EEventDataQualityStatus |
|
williamr@2
|
774 |
EEventSystemModuleEvent
|
williamr@2
|
775 |
};
|
williamr@2
|
776 |
|
williamr@2
|
777 |
protected:
|
williamr@2
|
778 |
IMPORT_C TPositionModuleStatusEventBase();
|
williamr@2
|
779 |
IMPORT_C TPositionModuleStatusEventBase(TModuleEvent aRequestedEventMask);
|
williamr@2
|
780 |
|
williamr@2
|
781 |
public:
|
williamr@2
|
782 |
IMPORT_C void SetRequestedEvents(TModuleEvent aRequestedEventMask);
|
williamr@2
|
783 |
IMPORT_C TModuleEvent RequestedEvents() const;
|
williamr@2
|
784 |
|
williamr@2
|
785 |
IMPORT_C void SetOccurredEvents(TModuleEvent aOccurredEventMask);
|
williamr@2
|
786 |
IMPORT_C TModuleEvent OccurredEvents() const;
|
williamr@2
|
787 |
|
williamr@2
|
788 |
IMPORT_C TPositionModuleId ModuleId() const;
|
williamr@2
|
789 |
IMPORT_C void SetModuleId(TPositionModuleId aModuleId);
|
williamr@2
|
790 |
|
williamr@2
|
791 |
IMPORT_C void SetSystemModuleEvent(TSystemModuleEvent aSystemModuleEvent);
|
williamr@2
|
792 |
IMPORT_C TSystemModuleEvent SystemModuleEvent() const;
|
williamr@2
|
793 |
|
williamr@2
|
794 |
protected:
|
williamr@2
|
795 |
IMPORT_C virtual void DoReset(TInt aSizeOfClass);
|
williamr@2
|
796 |
|
williamr@2
|
797 |
private:
|
williamr@2
|
798 |
friend class RPositionServer;
|
williamr@2
|
799 |
void Reset();
|
williamr@2
|
800 |
|
williamr@2
|
801 |
protected:
|
williamr@2
|
802 |
/** A bitmask of the requested events */
|
williamr@2
|
803 |
TModuleEvent iRequestedEvents;
|
williamr@2
|
804 |
/** A bitmask of the events which occurred */
|
williamr@2
|
805 |
TModuleEvent iOccurredEvents;
|
williamr@2
|
806 |
/** System level module status events*/
|
williamr@2
|
807 |
TSystemModuleEvent iSystemModuleEvent;
|
williamr@2
|
808 |
/** The module ID causing the event*/
|
williamr@2
|
809 |
TPositionModuleId iModuleId;
|
williamr@2
|
810 |
};
|
williamr@2
|
811 |
|
williamr@2
|
812 |
class TPositionModuleStatusEvent : public TPositionModuleStatusEventBase
|
williamr@2
|
813 |
/**
|
williamr@2
|
814 |
The normal class for storing position module status events
|
williamr@2
|
815 |
|
williamr@2
|
816 |
@publishedAll
|
williamr@2
|
817 |
@released
|
williamr@2
|
818 |
*/
|
williamr@2
|
819 |
{
|
williamr@2
|
820 |
public:
|
williamr@2
|
821 |
IMPORT_C TPositionModuleStatusEvent();
|
williamr@2
|
822 |
IMPORT_C TPositionModuleStatusEvent(TModuleEvent aRequestedEventMask);
|
williamr@2
|
823 |
|
williamr@2
|
824 |
IMPORT_C void SetModuleStatus(const TPositionModuleStatus& aModuleStatus);
|
williamr@2
|
825 |
IMPORT_C void GetModuleStatus(TPositionModuleStatus& aModuleStatus) const;
|
williamr@2
|
826 |
|
williamr@2
|
827 |
protected:
|
williamr@2
|
828 |
IMPORT_C virtual void DoReset(TInt aSizeOfClass);
|
williamr@2
|
829 |
|
williamr@2
|
830 |
protected:
|
williamr@2
|
831 |
/** The module status */
|
williamr@2
|
832 |
TPositionModuleStatus iModuleStatus;
|
williamr@2
|
833 |
};
|
williamr@2
|
834 |
|
williamr@2
|
835 |
|
williamr@2
|
836 |
class TPositionUpdateOptionsBase : public TPositionClassTypeBase
|
williamr@2
|
837 |
/**
|
williamr@2
|
838 |
The base class for classes storing position update options
|
williamr@2
|
839 |
|
williamr@2
|
840 |
@publishedAll
|
williamr@2
|
841 |
@released
|
williamr@2
|
842 |
*/
|
williamr@2
|
843 |
{
|
williamr@2
|
844 |
protected:
|
williamr@2
|
845 |
IMPORT_C TPositionUpdateOptionsBase();
|
williamr@2
|
846 |
IMPORT_C TPositionUpdateOptionsBase(TTimeIntervalMicroSeconds aInterval,
|
williamr@2
|
847 |
TTimeIntervalMicroSeconds aTimeOut = TTimeIntervalMicroSeconds(0),
|
williamr@2
|
848 |
TTimeIntervalMicroSeconds aMaxAge = TTimeIntervalMicroSeconds(0));
|
williamr@2
|
849 |
|
williamr@2
|
850 |
public:
|
williamr@2
|
851 |
IMPORT_C void SetUpdateInterval(TTimeIntervalMicroSeconds aInterval);
|
williamr@2
|
852 |
IMPORT_C void SetUpdateTimeOut(TTimeIntervalMicroSeconds aTimeOut);
|
williamr@2
|
853 |
IMPORT_C void SetMaxUpdateAge(TTimeIntervalMicroSeconds aMaxAge);
|
williamr@2
|
854 |
|
williamr@2
|
855 |
IMPORT_C TTimeIntervalMicroSeconds UpdateInterval() const;
|
williamr@2
|
856 |
IMPORT_C TTimeIntervalMicroSeconds UpdateTimeOut() const;
|
williamr@2
|
857 |
IMPORT_C TTimeIntervalMicroSeconds MaxUpdateAge() const;
|
williamr@2
|
858 |
|
williamr@2
|
859 |
protected:
|
williamr@2
|
860 |
/** The update interval */
|
williamr@2
|
861 |
TTimeIntervalMicroSeconds iUpdateInterval;
|
williamr@2
|
862 |
/** The update timeout */
|
williamr@2
|
863 |
TTimeIntervalMicroSeconds iUpdateTimeOut;
|
williamr@2
|
864 |
/** The maximum update age */
|
williamr@2
|
865 |
TTimeIntervalMicroSeconds iMaxUpdateAge;
|
williamr@2
|
866 |
|
williamr@2
|
867 |
private:
|
williamr@2
|
868 |
/** Unused variable for future expansion. */
|
williamr@2
|
869 |
TUint8 iReserved[8];
|
williamr@2
|
870 |
};
|
williamr@2
|
871 |
|
williamr@2
|
872 |
class TPositionUpdateOptions : public TPositionUpdateOptionsBase
|
williamr@2
|
873 |
/**
|
williamr@2
|
874 |
The normal class for storing position update options
|
williamr@2
|
875 |
|
williamr@2
|
876 |
@publishedAll
|
williamr@2
|
877 |
@released
|
williamr@2
|
878 |
*/
|
williamr@2
|
879 |
{
|
williamr@2
|
880 |
public:
|
williamr@2
|
881 |
IMPORT_C TPositionUpdateOptions();
|
williamr@2
|
882 |
IMPORT_C TPositionUpdateOptions(TTimeIntervalMicroSeconds aInterval,
|
williamr@2
|
883 |
TTimeIntervalMicroSeconds aTimeOut = TTimeIntervalMicroSeconds(0),
|
williamr@2
|
884 |
TTimeIntervalMicroSeconds aMaxAge = TTimeIntervalMicroSeconds(0),
|
williamr@2
|
885 |
TBool aAcceptPartialUpdates = EFalse);
|
williamr@2
|
886 |
|
williamr@2
|
887 |
IMPORT_C void SetAcceptPartialUpdates(TBool aAcceptPartialUpdates);
|
williamr@2
|
888 |
IMPORT_C TBool AcceptPartialUpdates() const;
|
williamr@2
|
889 |
|
williamr@2
|
890 |
protected:
|
williamr@2
|
891 |
/** Whether partial updates are accepted */
|
williamr@2
|
892 |
TBool iAcceptPartialUpdates;
|
williamr@2
|
893 |
|
williamr@2
|
894 |
private:
|
williamr@2
|
895 |
/** Unused variable for future expansion. */
|
williamr@2
|
896 |
TUint8 iReserved[16];
|
williamr@2
|
897 |
};
|
williamr@2
|
898 |
|
williamr@2
|
899 |
|
williamr@2
|
900 |
#endif //__LBSCOMMON_H__
|