00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 #ifndef LBS_GSM_CELL_INFO_H
00029 #define LBS_GSM_CELL_INFO_H
00030
00031
00032 #include <e32std.h>
00033 #include <lbs/lbslocationcommon.h>
00034 #include <lbs/lbslocationgsmneighbourinfo.h>
00035
00036
00042 NONSHARABLE_CLASS(CLbsGsmCellInfo) : public CLbsAreaInfoBase
00043 {
00044
00045 public:
00046
00055 IMPORT_C static CLbsGsmCellInfo* NewL();
00056
00067 IMPORT_C static CLbsGsmCellInfo* NewL( const TInt aCountryCode,
00068 const TInt aNetworkCode,
00069 const TInt aLocationAreaCode,
00070 const TInt aCellId );
00071
00072
00078 IMPORT_C static CLbsGsmCellInfo* NewL( const CLbsGsmCellInfo& aPositionInfo );
00079
00080
00084 IMPORT_C ~CLbsGsmCellInfo();
00085
00091 IMPORT_C void SetMobileCountryCode(const TInt aCountryCode);
00092
00099 IMPORT_C TInt MobileCountryCode() const;
00100
00106 IMPORT_C void SetMobileNetworkCode( const TInt aNetworkCode );
00107
00114 IMPORT_C TInt MobileNetworkCode() const;
00115
00121 IMPORT_C void SetLocationAreaCode( const TInt aLocationAreaCode );
00122
00129 IMPORT_C TInt LocationAreaCode() const;
00130
00136 IMPORT_C void SetCellId( const TInt aCellId );
00137
00144 IMPORT_C TInt CellId() const;
00145
00151 IMPORT_C void SetRxLevel( const TInt aRxLev );
00152
00159 IMPORT_C TInt RxLevel() const;
00160
00166 IMPORT_C void SetTimingAdvance( const TInt aTimingAdvance );
00167
00174 IMPORT_C TInt TimingAdvance() const;
00175
00184 IMPORT_C void AddNeighbouringCellInfoL(
00185 TLbsGsmNeighbourCellInfo* aNeighbourCellInfo );
00186
00196 IMPORT_C void GetNeighbouringCellInfoL(
00197 RLbsGsmNeighbourCellInfoArray& aNeighbourCellInfo ) const;
00198
00202 IMPORT_C void ResetNeighbouringCellInfo();
00203
00204 public:
00205
00211 virtual TLbsAreaInfoClassType Type();
00212
00230 virtual void ValidateDataL() const;
00231
00232 protected:
00233
00237 virtual void DoInternaliseL( RReadStream& aStream );
00238
00242 virtual void DoExternaliseL( RWriteStream& aStream ) const;
00243
00244 private:
00245
00249 CLbsGsmCellInfo();
00250
00254 CLbsGsmCellInfo( CLbsGsmCellInfo& );
00255
00259 CLbsGsmCellInfo& operator=( CLbsGsmCellInfo& );
00260
00264 void ConstructL();
00265
00269 void ConstructL( const TInt aCountryCode, const TInt aNetworkCode,
00270 const TInt aLocationAreaCode, const TInt aCellId );
00271
00272 private:
00273
00274 enum _TGsmDataValidationMask
00275 {
00276 EGsmDataNull = 0x00,
00277 EGsmMCC = 0x01,
00278 EGsmMNC = 0x02,
00279 EGsmLAC = 0x04,
00280 EGsmCI = 0x08,
00281 EGsmRx = 0x10,
00282 EGsmTA = 0x20
00283 };
00284
00288 TInt16 iMCC;
00289
00293 TInt16 iMNC;
00294
00298 TInt32 iLAC;
00299
00303 TInt32 iCid;
00304
00308 TInt32 iRxLev;
00309
00313 TInt16 iTA;
00314
00318 TInt8 iDataValidationMask;
00319
00323 RLbsGsmNeighbourCellInfoArray iNeighbourCellInfo;
00324 };
00325
00326 #endif //LBS_GSM_CELL_INFO_H