williamr@4: /* williamr@4: * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: williamr@4: * williamr@4: */ williamr@4: williamr@4: williamr@4: #ifndef LBS_AREAINFO_H williamr@4: #define LBS_AREAINFO_H williamr@4: williamr@4: williamr@4: #include williamr@4: #include williamr@4: williamr@4: williamr@4: /** williamr@4: The base class for classes storing information on position area. williamr@4: williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: class TPositionAreaInfoBase : public TPositionClassTypeBase williamr@4: { williamr@4: protected: williamr@4: IMPORT_C TPositionAreaInfoBase(); williamr@4: }; williamr@4: williamr@4: williamr@4: /** williamr@4: This class provides the data structure used by RPositioner to get Position Area williamr@4: information. Position Area information is normally used together with williamr@4: Position information and allows to define a rough accuracy of the position. williamr@4: williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: class TPositionAreaInfo : public TPositionAreaInfoBase williamr@4: { williamr@4: public: williamr@4: /** Defined type for TArea */ williamr@4: typedef TUint32 TArea; williamr@4: williamr@4: /** Position area. Please note that the values assigned to each enumeration williamr@4: have no numerical meaning and should not be directly used. williamr@4: williamr@4: Note that the _TArea enum may be extended in the future by adding williamr@4: more enumerated values. To maintain compatibility any unrecognized values williamr@4: must be handled as EAreaUnknown.*/ williamr@4: enum _TArea williamr@4: { williamr@4: /** Data initialisation or unknown value. */ williamr@4: EAreaUnknown = 0, williamr@4: /** Accuracy is country size */ williamr@4: EAreaCountry = 500, williamr@4: /** Accuracy is region size */ williamr@4: EAreaRegion = 600, williamr@4: /** Accuracy is city size */ williamr@4: EAreaCity = 700, williamr@4: /** Accuracy is district size */ williamr@4: EAreaDistrict = 800, williamr@4: /** Accuracy is street size */ williamr@4: EAreaStreet = 900 williamr@4: }; williamr@4: williamr@4: williamr@4: IMPORT_C TPositionAreaInfo(); williamr@4: IMPORT_C TPositionAreaInfo(TArea aArea); williamr@4: williamr@4: IMPORT_C TArea Area() const; williamr@4: IMPORT_C void SetArea(TArea aArea); williamr@4: williamr@4: protected: williamr@4: TArea iArea; williamr@4: williamr@4: private: williamr@4: /** Unused variable for future expansion. */ williamr@4: TUint8 iReserved[16]; williamr@4: }; williamr@4: williamr@4: williamr@4: /** williamr@4: TPositionAreaExtendedInfo is a specialised area class and provides detailed williamr@4: information about the match between the current network information and the network williamr@4: information related to a known position. williamr@4: williamr@4: In the future the class may be extended to provide information about a match between williamr@4: other available location information (e.g. WiFi MAC address). williamr@4: williamr@4: In order to provide a user with simplified area information, the match between williamr@4: the two network information should be translated into a area information supported williamr@4: by the TPositionAreaInfo type. williamr@4: williamr@4: Network Info Match > Area info conversion table williamr@4: @code williamr@4: ||==========================================================================================|| williamr@4: || Mobile Country Code | Mobile Network Code | Location Area Code | Cell Id | Area || williamr@4: ||==========================================================================================|| williamr@4: || 1 | 1 | 1 | 1 | EAreaCity || williamr@4: || 1 | 1 | 1 | 0 | EAreaRegion || williamr@4: || 1 | 1 | 0 | 0 | EAreaCountry || williamr@4: || 1 | 0 | 0 | 0 | EAreaCountry || williamr@4: || Any other combination | EAreaUnknown || williamr@4: ||==========================================================================================|| williamr@4: @endcode williamr@4: williamr@4: Please note that the conversion of the Cell Id match assumes the worst case scenario, where cells williamr@4: are big (e.g. tens of km radius). In centres of big cities the cell sizes are normally much smaller, williamr@4: taking the area down to the District or even Street level. williamr@4: williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: class TPositionAreaExtendedInfo : public TPositionAreaInfo williamr@4: { williamr@4: public: williamr@4: IMPORT_C TPositionAreaExtendedInfo(); williamr@4: williamr@4: IMPORT_C TBool MobileCountryCodeMatch() const; williamr@4: IMPORT_C TBool MobileNetworkCodeMatch() const; williamr@4: IMPORT_C TBool LocationAreaCodeMatch() const; williamr@4: IMPORT_C TBool CellIdMatch() const; williamr@4: williamr@4: IMPORT_C void SetMobileCountryCodeMatch(TBool aMccMatch); williamr@4: IMPORT_C void SetMobileNetworkCodeMatch(TBool aMncMatch); williamr@4: IMPORT_C void SetLocationAreaCodeMatch(TBool aLacMatch); williamr@4: IMPORT_C void SetCellIdMatch(TBool aCidMatch); williamr@4: williamr@4: protected: williamr@4: TBool iMCC; williamr@4: TBool iMNC; williamr@4: TBool iLAC; williamr@4: TBool iCID; williamr@4: williamr@4: private: williamr@4: /** Unused variable for future expansion. */ williamr@4: TUint8 iReserved2[32]; williamr@4: }; williamr@4: williamr@4: #endif //LBS_AREAINFO_H