epoc32/include/lbsareainfo.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 #ifndef LBS_AREAINFO_H
    20 #define LBS_AREAINFO_H
    21 
    22 
    23 #include <lbscommon.h>
    24 #include <lbsfields.h>
    25 
    26 
    27 /**
    28 The base class for classes storing information on position area.
    29 
    30 @publishedAll
    31 @prototype
    32 */
    33 class TPositionAreaInfoBase : public TPositionClassTypeBase
    34 	{
    35 protected:
    36 	IMPORT_C TPositionAreaInfoBase();
    37 	};
    38 	
    39 
    40 /**
    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.
    44 
    45 @publishedAll
    46 @prototype
    47  */
    48 class TPositionAreaInfo : public TPositionAreaInfoBase
    49 	{
    50 public:
    51 	/** Defined type for TArea */
    52 	typedef TUint32 TArea;
    53 	
    54 	/** Position area. Please note that the values assigned to each enumeration
    55 	have no numerical meaning and should not be directly used.
    56 	
    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.*/
    60 	enum _TArea
    61 		{
    62 		/** Data initialisation or unknown value. */
    63 		EAreaUnknown		= 0,
    64 		/** Accuracy is country size */
    65 		EAreaCountry		= 500,
    66 		/** Accuracy is region size */
    67 		EAreaRegion		= 600,
    68 		/** Accuracy is city size */
    69 		EAreaCity			= 700,
    70 		/** Accuracy is district size */
    71 		EAreaDistrict		= 800,
    72 		/** Accuracy is street size */
    73 		EAreaStreet  		= 900
    74 		};
    75 		
    76 
    77 	IMPORT_C TPositionAreaInfo();
    78 	IMPORT_C TPositionAreaInfo(TArea aArea);
    79 	
    80 	IMPORT_C TArea Area() const;
    81 	IMPORT_C void SetArea(TArea aArea);
    82 
    83 protected:
    84 	TArea iArea;
    85 
    86 private:
    87 	/** Unused variable for future expansion. */
    88 	TUint8 iReserved[16];
    89 	};
    90 
    91 
    92 /**
    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.
    96 
    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).
    99 
   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.
   103 
   104 Network Info Match > Area info conversion table
   105 @code
   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 ||==========================================================================================||
   115 @endcode
   116 
   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.
   120 
   121 @publishedAll
   122 @prototype
   123 */
   124 class TPositionAreaExtendedInfo : public TPositionAreaInfo
   125 	{
   126 public:
   127 	IMPORT_C TPositionAreaExtendedInfo();
   128 	
   129 	IMPORT_C TBool MobileCountryCodeMatch() const;
   130 	IMPORT_C TBool MobileNetworkCodeMatch() const;
   131 	IMPORT_C TBool LocationAreaCodeMatch() const;
   132 	IMPORT_C TBool CellIdMatch() const;
   133 	
   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);
   138 	
   139 protected:
   140 	TBool iMCC;
   141 	TBool iMNC;
   142 	TBool iLAC;
   143 	TBool iCID;
   144 	
   145 private:
   146 	/** Unused variable for future expansion. */
   147 	TUint8 iReserved2[32];
   148 	};
   149 
   150 #endif //LBS_AREAINFO_H