2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef LBS_AREAINFO_H
20 #define LBS_AREAINFO_H
23 #include <lbscommon.h>
24 #include <lbsfields.h>
28 The base class for classes storing information on position area.
33 class TPositionAreaInfoBase : public TPositionClassTypeBase
36 IMPORT_C TPositionAreaInfoBase();
41 This class provides the data structure used by RPositioner to get Position Area
42 information. Position Area information is normally used together with
43 Position information and allows to define a rough accuracy of the position.
48 class TPositionAreaInfo : public TPositionAreaInfoBase
51 /** Defined type for TArea */
52 typedef TUint32 TArea;
54 /** Position area. Please note that the values assigned to each enumeration
55 have no numerical meaning and should not be directly used.
57 Note that the _TArea enum may be extended in the future by adding
58 more enumerated values. To maintain compatibility any unrecognized values
59 must be handled as EAreaUnknown.*/
62 /** Data initialisation or unknown value. */
64 /** Accuracy is country size */
66 /** Accuracy is region size */
68 /** Accuracy is city size */
70 /** Accuracy is district size */
72 /** Accuracy is street size */
77 IMPORT_C TPositionAreaInfo();
78 IMPORT_C TPositionAreaInfo(TArea aArea);
80 IMPORT_C TArea Area() const;
81 IMPORT_C void SetArea(TArea aArea);
87 /** Unused variable for future expansion. */
93 TPositionAreaExtendedInfo is a specialised area class and provides detailed
94 information about the match between the current network information and the network
95 information related to a known position.
97 In the future the class may be extended to provide information about a match between
98 other available location information (e.g. WiFi MAC address).
100 In order to provide a user with simplified area information, the match between
101 the two network information should be translated into a area information supported
102 by the TPositionAreaInfo type.
104 Network Info Match > Area info conversion table
106 ||==========================================================================================||
107 || Mobile Country Code | Mobile Network Code | Location Area Code | Cell Id | Area ||
108 ||==========================================================================================||
109 || 1 | 1 | 1 | 1 | EAreaCity ||
110 || 1 | 1 | 1 | 0 | EAreaRegion ||
111 || 1 | 1 | 0 | 0 | EAreaCountry ||
112 || 1 | 0 | 0 | 0 | EAreaCountry ||
113 || Any other combination | EAreaUnknown ||
114 ||==========================================================================================||
117 Please note that the conversion of the Cell Id match assumes the worst case scenario, where cells
118 are big (e.g. tens of km radius). In centres of big cities the cell sizes are normally much smaller,
119 taking the area down to the District or even Street level.
124 class TPositionAreaExtendedInfo : public TPositionAreaInfo
127 IMPORT_C TPositionAreaExtendedInfo();
129 IMPORT_C TBool MobileCountryCodeMatch() const;
130 IMPORT_C TBool MobileNetworkCodeMatch() const;
131 IMPORT_C TBool LocationAreaCodeMatch() const;
132 IMPORT_C TBool CellIdMatch() const;
134 IMPORT_C void SetMobileCountryCodeMatch(TBool aMccMatch);
135 IMPORT_C void SetMobileNetworkCodeMatch(TBool aMncMatch);
136 IMPORT_C void SetLocationAreaCodeMatch(TBool aLacMatch);
137 IMPORT_C void SetCellIdMatch(TBool aCidMatch);
146 /** Unused variable for future expansion. */
147 TUint8 iReserved2[32];
150 #endif //LBS_AREAINFO_H