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.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description:
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
williamr@4
    19
#ifndef LBS_AREAINFO_H
williamr@4
    20
#define LBS_AREAINFO_H
williamr@4
    21
williamr@4
    22
williamr@4
    23
#include <lbscommon.h>
williamr@4
    24
#include <lbsfields.h>
williamr@4
    25
williamr@4
    26
williamr@4
    27
/**
williamr@4
    28
The base class for classes storing information on position area.
williamr@4
    29
williamr@4
    30
@publishedAll
williamr@4
    31
@prototype
williamr@4
    32
*/
williamr@4
    33
class TPositionAreaInfoBase : public TPositionClassTypeBase
williamr@4
    34
	{
williamr@4
    35
protected:
williamr@4
    36
	IMPORT_C TPositionAreaInfoBase();
williamr@4
    37
	};
williamr@4
    38
	
williamr@4
    39
williamr@4
    40
/**
williamr@4
    41
This class provides the data structure used by RPositioner to get Position Area 
williamr@4
    42
information. Position Area information is normally used together with
williamr@4
    43
Position information and allows to define a rough accuracy of the position.
williamr@4
    44
williamr@4
    45
@publishedAll
williamr@4
    46
@prototype
williamr@4
    47
 */
williamr@4
    48
class TPositionAreaInfo : public TPositionAreaInfoBase
williamr@4
    49
	{
williamr@4
    50
public:
williamr@4
    51
	/** Defined type for TArea */
williamr@4
    52
	typedef TUint32 TArea;
williamr@4
    53
	
williamr@4
    54
	/** Position area. Please note that the values assigned to each enumeration
williamr@4
    55
	have no numerical meaning and should not be directly used.
williamr@4
    56
	
williamr@4
    57
	Note that the _TArea enum may be extended in the future by adding
williamr@4
    58
	more enumerated values. To maintain compatibility any unrecognized values 
williamr@4
    59
	must be handled as EAreaUnknown.*/
williamr@4
    60
	enum _TArea
williamr@4
    61
		{
williamr@4
    62
		/** Data initialisation or unknown value. */
williamr@4
    63
		EAreaUnknown		= 0,
williamr@4
    64
		/** Accuracy is country size */
williamr@4
    65
		EAreaCountry		= 500,
williamr@4
    66
		/** Accuracy is region size */
williamr@4
    67
		EAreaRegion		= 600,
williamr@4
    68
		/** Accuracy is city size */
williamr@4
    69
		EAreaCity			= 700,
williamr@4
    70
		/** Accuracy is district size */
williamr@4
    71
		EAreaDistrict		= 800,
williamr@4
    72
		/** Accuracy is street size */
williamr@4
    73
		EAreaStreet  		= 900
williamr@4
    74
		};
williamr@4
    75
		
williamr@4
    76
williamr@4
    77
	IMPORT_C TPositionAreaInfo();
williamr@4
    78
	IMPORT_C TPositionAreaInfo(TArea aArea);
williamr@4
    79
	
williamr@4
    80
	IMPORT_C TArea Area() const;
williamr@4
    81
	IMPORT_C void SetArea(TArea aArea);
williamr@4
    82
williamr@4
    83
protected:
williamr@4
    84
	TArea iArea;
williamr@4
    85
williamr@4
    86
private:
williamr@4
    87
	/** Unused variable for future expansion. */
williamr@4
    88
	TUint8 iReserved[16];
williamr@4
    89
	};
williamr@4
    90
williamr@4
    91
williamr@4
    92
/**
williamr@4
    93
TPositionAreaExtendedInfo is a specialised area class and provides detailed
williamr@4
    94
information about the match between the current network information and the network
williamr@4
    95
information related to a known position.
williamr@4
    96
williamr@4
    97
In the future the class may be extended to provide information about a match between
williamr@4
    98
other available location information (e.g. WiFi MAC address).
williamr@4
    99
williamr@4
   100
In order to provide a user with simplified area information, the match between
williamr@4
   101
the two network information should be translated into a area information supported
williamr@4
   102
by the TPositionAreaInfo type.
williamr@4
   103
williamr@4
   104
Network Info Match > Area info conversion table
williamr@4
   105
@code
williamr@4
   106
||==========================================================================================||
williamr@4
   107
|| Mobile Country Code  | Mobile Network Code | Location Area Code | Cell Id | Area         ||
williamr@4
   108
||==========================================================================================||
williamr@4
   109
||           1          |          1          |         1          |    1    | EAreaCity    ||
williamr@4
   110
||           1          |          1          |         1          |    0    | EAreaRegion  ||
williamr@4
   111
||           1          |          1          |         0          |    0    | EAreaCountry ||
williamr@4
   112
||           1          |          0          |         0          |    0    | EAreaCountry ||
williamr@4
   113
||                                  Any other combination                    | EAreaUnknown ||
williamr@4
   114
||==========================================================================================||
williamr@4
   115
@endcode
williamr@4
   116
williamr@4
   117
Please note that the conversion of the Cell Id match assumes the worst case scenario, where cells
williamr@4
   118
are big (e.g. tens of km radius). In centres of big cities the cell sizes are normally much smaller,
williamr@4
   119
taking the area down to the District or even Street level.
williamr@4
   120
williamr@4
   121
@publishedAll
williamr@4
   122
@prototype
williamr@4
   123
*/
williamr@4
   124
class TPositionAreaExtendedInfo : public TPositionAreaInfo
williamr@4
   125
	{
williamr@4
   126
public:
williamr@4
   127
	IMPORT_C TPositionAreaExtendedInfo();
williamr@4
   128
	
williamr@4
   129
	IMPORT_C TBool MobileCountryCodeMatch() const;
williamr@4
   130
	IMPORT_C TBool MobileNetworkCodeMatch() const;
williamr@4
   131
	IMPORT_C TBool LocationAreaCodeMatch() const;
williamr@4
   132
	IMPORT_C TBool CellIdMatch() const;
williamr@4
   133
	
williamr@4
   134
	IMPORT_C void SetMobileCountryCodeMatch(TBool aMccMatch);
williamr@4
   135
	IMPORT_C void SetMobileNetworkCodeMatch(TBool aMncMatch);
williamr@4
   136
	IMPORT_C void SetLocationAreaCodeMatch(TBool aLacMatch);
williamr@4
   137
	IMPORT_C void SetCellIdMatch(TBool aCidMatch);
williamr@4
   138
	
williamr@4
   139
protected:
williamr@4
   140
	TBool iMCC;
williamr@4
   141
	TBool iMNC;
williamr@4
   142
	TBool iLAC;
williamr@4
   143
	TBool iCID;
williamr@4
   144
	
williamr@4
   145
private:
williamr@4
   146
	/** Unused variable for future expansion. */
williamr@4
   147
	TUint8 iReserved2[32];
williamr@4
   148
	};
williamr@4
   149
williamr@4
   150
#endif //LBS_AREAINFO_H