epoc32/include/lbsareainfo.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/lbsareainfo.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,150 @@
     1.4 +/*
     1.5 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef LBS_AREAINFO_H
    1.23 +#define LBS_AREAINFO_H
    1.24 +
    1.25 +
    1.26 +#include <lbscommon.h>
    1.27 +#include <lbsfields.h>
    1.28 +
    1.29 +
    1.30 +/**
    1.31 +The base class for classes storing information on position area.
    1.32 +
    1.33 +@publishedAll
    1.34 +@prototype
    1.35 +*/
    1.36 +class TPositionAreaInfoBase : public TPositionClassTypeBase
    1.37 +	{
    1.38 +protected:
    1.39 +	IMPORT_C TPositionAreaInfoBase();
    1.40 +	};
    1.41 +	
    1.42 +
    1.43 +/**
    1.44 +This class provides the data structure used by RPositioner to get Position Area 
    1.45 +information. Position Area information is normally used together with
    1.46 +Position information and allows to define a rough accuracy of the position.
    1.47 +
    1.48 +@publishedAll
    1.49 +@prototype
    1.50 + */
    1.51 +class TPositionAreaInfo : public TPositionAreaInfoBase
    1.52 +	{
    1.53 +public:
    1.54 +	/** Defined type for TArea */
    1.55 +	typedef TUint32 TArea;
    1.56 +	
    1.57 +	/** Position area. Please note that the values assigned to each enumeration
    1.58 +	have no numerical meaning and should not be directly used.
    1.59 +	
    1.60 +	Note that the _TArea enum may be extended in the future by adding
    1.61 +	more enumerated values. To maintain compatibility any unrecognized values 
    1.62 +	must be handled as EAreaUnknown.*/
    1.63 +	enum _TArea
    1.64 +		{
    1.65 +		/** Data initialisation or unknown value. */
    1.66 +		EAreaUnknown		= 0,
    1.67 +		/** Accuracy is country size */
    1.68 +		EAreaCountry		= 500,
    1.69 +		/** Accuracy is region size */
    1.70 +		EAreaRegion		= 600,
    1.71 +		/** Accuracy is city size */
    1.72 +		EAreaCity			= 700,
    1.73 +		/** Accuracy is district size */
    1.74 +		EAreaDistrict		= 800,
    1.75 +		/** Accuracy is street size */
    1.76 +		EAreaStreet  		= 900
    1.77 +		};
    1.78 +		
    1.79 +
    1.80 +	IMPORT_C TPositionAreaInfo();
    1.81 +	IMPORT_C TPositionAreaInfo(TArea aArea);
    1.82 +	
    1.83 +	IMPORT_C TArea Area() const;
    1.84 +	IMPORT_C void SetArea(TArea aArea);
    1.85 +
    1.86 +protected:
    1.87 +	TArea iArea;
    1.88 +
    1.89 +private:
    1.90 +	/** Unused variable for future expansion. */
    1.91 +	TUint8 iReserved[16];
    1.92 +	};
    1.93 +
    1.94 +
    1.95 +/**
    1.96 +TPositionAreaExtendedInfo is a specialised area class and provides detailed
    1.97 +information about the match between the current network information and the network
    1.98 +information related to a known position.
    1.99 +
   1.100 +In the future the class may be extended to provide information about a match between
   1.101 +other available location information (e.g. WiFi MAC address).
   1.102 +
   1.103 +In order to provide a user with simplified area information, the match between
   1.104 +the two network information should be translated into a area information supported
   1.105 +by the TPositionAreaInfo type.
   1.106 +
   1.107 +Network Info Match > Area info conversion table
   1.108 +@code
   1.109 +||==========================================================================================||
   1.110 +|| Mobile Country Code  | Mobile Network Code | Location Area Code | Cell Id | Area         ||
   1.111 +||==========================================================================================||
   1.112 +||           1          |          1          |         1          |    1    | EAreaCity    ||
   1.113 +||           1          |          1          |         1          |    0    | EAreaRegion  ||
   1.114 +||           1          |          1          |         0          |    0    | EAreaCountry ||
   1.115 +||           1          |          0          |         0          |    0    | EAreaCountry ||
   1.116 +||                                  Any other combination                    | EAreaUnknown ||
   1.117 +||==========================================================================================||
   1.118 +@endcode
   1.119 +
   1.120 +Please note that the conversion of the Cell Id match assumes the worst case scenario, where cells
   1.121 +are big (e.g. tens of km radius). In centres of big cities the cell sizes are normally much smaller,
   1.122 +taking the area down to the District or even Street level.
   1.123 +
   1.124 +@publishedAll
   1.125 +@prototype
   1.126 +*/
   1.127 +class TPositionAreaExtendedInfo : public TPositionAreaInfo
   1.128 +	{
   1.129 +public:
   1.130 +	IMPORT_C TPositionAreaExtendedInfo();
   1.131 +	
   1.132 +	IMPORT_C TBool MobileCountryCodeMatch() const;
   1.133 +	IMPORT_C TBool MobileNetworkCodeMatch() const;
   1.134 +	IMPORT_C TBool LocationAreaCodeMatch() const;
   1.135 +	IMPORT_C TBool CellIdMatch() const;
   1.136 +	
   1.137 +	IMPORT_C void SetMobileCountryCodeMatch(TBool aMccMatch);
   1.138 +	IMPORT_C void SetMobileNetworkCodeMatch(TBool aMncMatch);
   1.139 +	IMPORT_C void SetLocationAreaCodeMatch(TBool aLacMatch);
   1.140 +	IMPORT_C void SetCellIdMatch(TBool aCidMatch);
   1.141 +	
   1.142 +protected:
   1.143 +	TBool iMCC;
   1.144 +	TBool iMNC;
   1.145 +	TBool iLAC;
   1.146 +	TBool iCID;
   1.147 +	
   1.148 +private:
   1.149 +	/** Unused variable for future expansion. */
   1.150 +	TUint8 iReserved2[32];
   1.151 +	};
   1.152 +
   1.153 +#endif //LBS_AREAINFO_H