equal
deleted
inserted
replaced
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
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 |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
19 #include <e32std.h> |
19 #include <e32std.h> |
20 #include <e32math.h> |
20 #include <e32math.h> |
21 #include <lbsrequestor.h> |
21 #include <lbsrequestor.h> |
22 #include <lbsclasstypes.h> |
22 #include <lbsclasstypes.h> |
23 #include <lbserrors.h> |
23 #include <lbserrors.h> |
24 #include <lbs/lbsvariant.h> |
24 #include <lbsvariant.h> |
25 |
25 |
26 /** |
26 /** |
27 @publishedAll |
27 @publishedAll |
28 @released |
28 @released |
29 // A compile time assert macro. The aExpr parameter must evaluate to an |
29 // A compile time assert macro. The aExpr parameter must evaluate to an |
155 /** ETime */ |
155 /** ETime */ |
156 ETTime, |
156 ETTime, |
157 /** Time in microseconds */ |
157 /** Time in microseconds */ |
158 ETTimeIntervalMicroSeconds |
158 ETTimeIntervalMicroSeconds |
159 }; |
159 }; |
160 |
160 /** |
|
161 Constructor for TPositionQualityItem |
|
162 */ |
161 TPositionQualityItem(); |
163 TPositionQualityItem(); |
162 |
164 |
|
165 /** |
|
166 Compare method |
|
167 */ |
163 TInt Compare(const TPositionQualityItem& aItem, TResult& aComparison) const; |
168 TInt Compare(const TPositionQualityItem& aItem, TResult& aComparison) const; |
164 |
169 /** |
|
170 Sets Position Quality |
|
171 */ |
165 void Set(TDataType aDataType, TValuePreference aValuePreference, |
172 void Set(TDataType aDataType, TValuePreference aValuePreference, |
166 const TAny* aData, TUint aSizeOfData); |
173 const TAny* aData, TUint aSizeOfData); |
167 |
174 /** |
|
175 Gets position quality |
|
176 */ |
168 TInt Get(TDataType aDataType, TAny* aData, TUint aSizeOfData) const; |
177 TInt Get(TDataType aDataType, TAny* aData, TUint aSizeOfData) const; |
169 |
178 |
|
179 /** |
|
180 Whether or not this element has a defined state |
|
181 */ |
170 TBool IsDefined() const; |
182 TBool IsDefined() const; |
171 |
183 |
172 private: |
184 private: |
173 /** Internal datatype */ |
185 /** Internal datatype */ |
174 TDataType iDataType; |
186 TDataType iDataType; |
191 TInt aElementToCompare, |
203 TInt aElementToCompare, |
192 TPositionQualityItem::TResult& aComparison) const; |
204 TPositionQualityItem::TResult& aComparison) const; |
193 |
205 |
194 /** |
206 /** |
195 Returns whether an element is defined |
207 Returns whether an element is defined |
196 @publishedAll |
|
197 @released |
|
198 @param aElementId The element Id of that we're interested in. |
208 @param aElementId The element Id of that we're interested in. |
199 @return TBool if defined |
209 @return TBool if defined |
200 */ |
210 */ |
201 IMPORT_C TBool IsDefined(TInt aElementId) const; |
211 IMPORT_C TBool IsDefined(TInt aElementId) const; |
202 IMPORT_C TInt HighWaterMark() const; |
212 IMPORT_C TInt HighWaterMark() const; |
206 IMPORT_C void ResetElement(TInt aElementId); |
216 IMPORT_C void ResetElement(TInt aElementId); |
207 |
217 |
208 |
218 |
209 /** |
219 /** |
210 Sets the data of an element from the array of elements. |
220 Sets the data of an element from the array of elements. |
211 @publishedAll |
|
212 @released |
|
213 @param aElementId The element Id of that we're interested in. |
221 @param aElementId The element Id of that we're interested in. |
214 @param aDataType The datatype of the data to be fetched. |
222 @param aDataType The datatype of the data to be fetched. |
215 @param aValuePreference Quality preferences |
223 @param aValuePreference Quality preferences |
216 @param aData A pointer to the data to be written into. |
224 @param aData A pointer to the data to be written into. |
217 */ |
225 */ |
220 TPositionQualityItem::TValuePreference aValuePreference, T aData) |
228 TPositionQualityItem::TValuePreference aValuePreference, T aData) |
221 {DoSetElement(aElementId, aDataType, aValuePreference, &aData, sizeof(T));} |
229 {DoSetElement(aElementId, aDataType, aValuePreference, &aData, sizeof(T));} |
222 |
230 |
223 /** |
231 /** |
224 Gets the data of an element from the array of elements. |
232 Gets the data of an element from the array of elements. |
225 @publishedAll |
|
226 @released |
|
227 @param aElementId The element Id of that we're interested in. |
233 @param aElementId The element Id of that we're interested in. |
228 @param aDataType The datatype of the data to be fetched. |
234 @param aDataType The datatype of the data to be fetched. |
229 @param aData A pointer to the data to be written into. |
235 @param aData A pointer to the data to be written into. |
230 @return Standard Symbian OS Error code |
236 @return Standard Symbian OS Error code |
231 */ |
237 */ |
632 */ |
638 */ |
633 enum _TDataQualityStatus |
639 enum _TDataQualityStatus |
634 { |
640 { |
635 /** Data Quality Unknown |
641 /** Data Quality Unknown |
636 This is the unassigned valued. This state should only be reported |
642 This is the unassigned valued. This state should only be reported |
637 during an event indicating that a positioning module has been removed |
643 during an event indicating that a positioning module has been removed |
|
644 or is not yet loaded. |
638 */ |
645 */ |
639 EDataQualityUnknown, |
646 EDataQualityUnknown, |
640 |
647 |
641 /** Data Quality Loss |
648 /** Data Quality Loss |
642 The accuracy and contents of the position information has been |
649 The accuracy and contents of the position information has been |