locationmanager/locationtrail/inc/clocationrecord.h
branchRCL_3
changeset 19 b73252188534
parent 12 9f21bab39f42
equal deleted inserted replaced
18:63c982fb92f2 19:b73252188534
    20 
    20 
    21 #include <e32base.h>
    21 #include <e32base.h>
    22 #include <e32property.h>
    22 #include <e32property.h>
    23 #include <lbs.h>
    23 #include <lbs.h>
    24 
    24 
       
    25 
       
    26 #include <etel.h>
       
    27 #include <etelmm.h>
       
    28 #include <geotagobserver.h>
       
    29 
    25 #include "rlocationtrail.h"
    30 #include "rlocationtrail.h"
    26 #include "locationdatatype.h"
    31 #include "locationdatatype.h"
    27 #include "cnetworkinfo.h"
    32 #include "cnetworkinfo.h"
    28 #include "cpositioninfo.h"
    33 #include "cpositioninfo.h"
    29 #include "rlocationobjectmanipulator.h"
    34 #include "rlocationobjectmanipulator.h"
    34 #include "mdeobjectdef.h"
    39 #include "mdeobjectdef.h"
    35 #include "mdepropertydef.h"
    40 #include "mdepropertydef.h"
    36 #include "mderelation.h"
    41 #include "mderelation.h"
    37 #include "mdequery.h"
    42 #include "mdequery.h"
    38 #include "locationremappingao.h"
    43 #include "locationremappingao.h"
       
    44 
       
    45 #ifdef LOC_GEOTAGGING_CELLID	
       
    46 #include "cgeoconverter.h"
       
    47 #endif
       
    48 
       
    49 #ifdef LOC_REVERSEGEOCODE
       
    50 #include <geotagger.h>
       
    51 #include "ctagcreator.h"
       
    52 #include "reversegeocode.h"
       
    53 class CReverseGeoCoderPlugin;
       
    54 #endif
    39 
    55 
    40 typedef RLocationTrail::TTrailState TLocTrailState;
    56 typedef RLocationTrail::TTrailState TLocTrailState;
    41 
    57 
    42 class CTelephony;
    58 class CTelephony;
    43 class TPositionSatelliteInfo;
    59 class TPositionSatelliteInfo;
    53 public:    
    69 public:    
    54     /**
    70     /**
    55      * This method is used to notify about location trail state changes.
    71      * This method is used to notify about location trail state changes.
    56      */
    72      */
    57     virtual void LocationTrailStateChange() = 0;
    73     virtual void LocationTrailStateChange() = 0;
    58     
    74 
       
    75 	/**
       
    76      * This method is used to fetch the current location
       
    77      * @param aSatelliteInfo  The satellite information
       
    78      * @param aNetworkInfo  The network informatiom
       
    79      * @param aError ErrCode if any
       
    80      */    
    59     virtual void CurrentLocation( const TPositionSatelliteInfo& aSatelliteInfo, 
    81     virtual void CurrentLocation( const TPositionSatelliteInfo& aSatelliteInfo, 
    60     							  const CTelephony::TNetworkInfoV1& aNetworkInfo,
    82     							  const CTelephony::TNetworkInfoV1& aNetworkInfo,
    61                                   const TInt aError ) = 0;
    83                                   const TInt aError ) = 0;
    62     
    84 
       
    85 
       
    86 	/**
       
    87      * This method is used to notify about GPS signal quality changes.
       
    88      * @param aSatelliteInfo  The satellite information
       
    89      */
    63     virtual void GPSSignalQualityChanged( const TPositionSatelliteInfo& aSatelliteInfo )  = 0;
    90     virtual void GPSSignalQualityChanged( const TPositionSatelliteInfo& aSatelliteInfo )  = 0;
    64     
    91     
    65     /**
    92     /**
    66      * Callback method to notify observer that during waiting for positioning stop timeout remap is done.
    93      * Callback method to notify observer that during waiting for positioning stop timeout remap is done.
    67      */
    94      */
    84     	TLocationData	iLocationData; // Location info & network info
   111     	TLocationData	iLocationData; // Location info & network info
    85         TTime           iTimeStamp;  // Time stamp.
   112         TTime           iTimeStamp;  // Time stamp.
    86         TLocTrailState  iTrailState; // Trail state for this item.
   113         TLocTrailState  iTrailState; // Trail state for this item.
    87     };
   114     };
    88     
   115     
       
   116 /**
       
   117 * Location snap shot item class.
       
   118 */
       
   119 class TLocationSnapshotItem
       
   120     {
       
   121     public:
       
   122         TLocationData   iLocationData; // Location info & network info
       
   123         TItemId         iObjectId;     // current media object id.
       
   124         TItemId         iLocationId;
       
   125         TUint           iFlag;         //indicator for various scenarios
       
   126 #ifdef LOC_REVERSEGEOCODE
       
   127         TItemId         iCountryTagId;
       
   128         TItemId         iCityTagId;
       
   129 #endif		
       
   130     };
    89 class MLocationAddObserver
   131 class MLocationAddObserver
    90 	{
   132 	{
    91 public:
   133 public:
    92 	/**
   134 	/**
    93 	 * This method is used to notify about new locations added to location trail
   135 	 * This method is used to notify about new locations added to location trail
   105  */
   147  */
   106 class CLocationRecord : public CBase,
   148 class CLocationRecord : public CBase,
   107                         public MNetworkInfoObserver,
   149                         public MNetworkInfoObserver,
   108                         public MPositionInfoObserver,
   150                         public MPositionInfoObserver,
   109                         public MMdEQueryObserver
   151                         public MMdEQueryObserver
       
   152 #ifdef LOC_GEOTAGGING_CELLID	
       
   153                         ,public MGeoConverterObserver
       
   154 #endif						
       
   155 #ifdef LOC_REVERSEGEOCODE
       
   156                         ,public MReverseGeocodeObserver
       
   157 #endif
   110     {
   158     {
   111 public:  
   159 public:  
   112     /**
   160     /**
   113      * 2-phased constructor.
   161      * 2-phased constructor.
   114      * @since S60 3.1
   162      * @param aGeoTaggerObserver The observer that is notified after geotagging
   115      */
   163      * @since S60 3.1
   116     IMPORT_C static CLocationRecord* NewL();
   164      */
   117 
   165      IMPORT_C static CLocationRecord* NewL(MGeoTaggerObserver& aGeoTaggerObserver, RMobilePhone& aPhone);
       
   166  
   118     /**
   167     /**
   119      * C++ destructor.
   168      * C++ destructor.
   120      * @since S60 3.1
   169      * @since S60 3.1
   121      */    
   170      */    
   122     IMPORT_C virtual ~CLocationRecord();
   171     IMPORT_C virtual ~CLocationRecord();
   193      */
   242      */
   194     IMPORT_C void SetObserver( MLocationTrailObserver* aObserver );
   243     IMPORT_C void SetObserver( MLocationTrailObserver* aObserver );
   195     
   244     
   196     /**
   245     /**
   197      * Set observer (TrackLog) for notifying new locations in location trail
   246      * Set observer (TrackLog) for notifying new locations in location trail
       
   247      * @param aObserver, An observer for location changes
   198      */
   248      */
   199     IMPORT_C void SetAddObserver( MLocationAddObserver* aObserver );    
   249     IMPORT_C void SetAddObserver( MLocationAddObserver* aObserver );    
   200     
   250 
       
   251 
       
   252 	/**
       
   253 	* Update network information
       
   254 	*
       
   255 	*/
   201     static TInt UpdateNetworkInfo( TAny* aAny );
   256     static TInt UpdateNetworkInfo( TAny* aAny );
       
   257 
       
   258 	/*
       
   259 	* creates a location object from the given location data and objectId
       
   260 	* @param aLocationData the location data
       
   261 	* @param aObjectId the object Id
       
   262 	*/
   202     
   263     
   203     IMPORT_C void CreateLocationObjectL( const TLocationData& aLocationData,
   264     IMPORT_C void CreateLocationObjectL( const TLocationData& aLocationData,
   204     		const TUint& aObjectId );
   265     		const TUint& aObjectId );
   205     
   266 
       
   267 
       
   268 	/**
       
   269 	* Handle the photos taken by phone camera.
       
   270 	* @param aObjectId Object id
       
   271 	*/
   206     IMPORT_C void LocationSnapshotL( const TUint& aObjectId );
   272     IMPORT_C void LocationSnapshotL( const TUint& aObjectId );
   207     
   273 
       
   274 	/**
       
   275 	* Creates a location object with given location data
       
   276 	* @param aLocationData The location data
       
   277 	* @return The locationId
       
   278 	*/
   208     TItemId DoCreateLocationL( const TLocationData& aLocationData );
   279     TItemId DoCreateLocationL( const TLocationData& aLocationData );
   209     
   280 
       
   281 	/**
       
   282 	* Creates a "contains" relation for the given ObjectId and LocationId and adds it to the iMdeSession
       
   283 	* @param aObjectId Object id
       
   284 	* @param aLocationId location id
       
   285 	* @return item id
       
   286 	*/	
   210     TItemId CreateRelationL( const TUint& aObjectId, const TUint& aLocationId );
   287     TItemId CreateRelationL( const TUint& aObjectId, const TUint& aLocationId );
   211     
   288 	/**
       
   289 	* Sets the CMdESession for tagcreation
       
   290 	* @param aSession The CMdESession object
       
   291 	*/    
   212     IMPORT_C void SetMdeSession( CMdESession* aSession );
   292     IMPORT_C void SetMdeSession( CMdESession* aSession );
   213     
   293     
       
   294 	/**
       
   295 	* Sets the current location trail state to Stop
       
   296 	*/	
   214     IMPORT_C void SetStateToStopping();
   297     IMPORT_C void SetStateToStopping();
   215     
   298     
       
   299 	/**
       
   300 	* returns the timevalue of the CMdEObject corresponding to a given ObjectId
       
   301 	* @param aObjectId  the objectId
       
   302 	* @return the timevalue associated with given object
       
   303 	*/	
   216     TTime GetMdeObjectTimeL( TItemId aObjectId );
   304     TTime GetMdeObjectTimeL( TItemId aObjectId );
   217     
   305 
       
   306 	/**
       
   307 	* Checks if Remapping is needed
       
   308 	* @return Boolean to indicate if remapping is needed or not
       
   309 	*/	
   218     IMPORT_C TBool RemappingNeeded();
   310     IMPORT_C TBool RemappingNeeded();
   219     
   311 
       
   312 	
   220     IMPORT_C TBool IsLowBattery();
   313     IMPORT_C TBool IsLowBattery();
   221 
   314 
       
   315     /**
       
   316        * Checks if geotagging is in progress
       
   317        * @return Boolean to indicate if geotagging is in progress
       
   318        */  
       
   319     IMPORT_C TBool TaggingInProgress();   
       
   320 
       
   321 
       
   322     /**
       
   323        * Initiates geotagging
       
   324        * @param aConnectionOption connection option,silent or not
       
   325        * @return Etrue if geotagging is started
       
   326        */  
       
   327     IMPORT_C TBool StartGeoTagging(const TConnectionOption aConnectionOption);
       
   328 
       
   329     /** 
       
   330        * Cancels the geotagging
       
   331        */  
       
   332     IMPORT_C void CancelGeoTagging();
       
   333 
   222 public: // from MNetworkInfoObserver.
   334 public: // from MNetworkInfoObserver.
   223     /**
   335     /**
   224      * 
   336      * 
   225      * @since S60 3.1
   337      * NetworkInfo
   226      * @param 
   338      * This method is used for setting the network cell id to the 
   227      * @return 
   339      * @since S60 3.1
       
   340      * @param  aNetworkInfo N/W info
       
   341      * @param  aError       Error code
   228      */
   342      */
   229     void NetworkInfo( const CTelephony::TNetworkInfoV1 &aNetworkInfo, TInt aError );
   343     void NetworkInfo( const CTelephony::TNetworkInfoV1 &aNetworkInfo, TInt aError );
       
   344 
       
   345     /**
       
   346      * Get mobile phone object for network info object
       
   347      * @return mobile phone object
       
   348      */
       
   349     RMobilePhone& GetMobilePhone4NwInfo();
   230     
   350     
   231 public: // from MPositionInfoObserver    
   351 public: // from MPositionInfoObserver    
   232     /**
   352     /**
   233      * 
   353      * This method is used for setting the position info to the 
   234      * @since S60 3.1
   354      * location trail.
   235      * @param 
   355      * @since S60 3.1
   236      * @return  
   356      * @param aPositionInfo the position information
       
   357      * @param aError Captures the errcode if any
   237      */
   358      */
   238     void Position( const TPositionInfo& aPositionInfo, const TInt aError );
   359     void Position( const TPositionInfo& aPositionInfo, const TInt aError );
   239     
   360     
   240     
   361     
   241 public: // From MMdEQueryObserver
   362 public: // From MMdEQueryObserver
   242 
   363 
       
   364 	/**
       
   365 	* Handle query new results
       
   366 	* @param aQuery Query object
       
   367 	* @param aFirstNewItemIndex new item index
       
   368 	* @param aNewItemCount item count
       
   369 	*/
   243 	void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex, 
   370 	void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex, 
   244 			TInt aNewItemCount);
   371 			TInt aNewItemCount);
   245 	
   372 
       
   373 
       
   374 	/*
       
   375 	* This method  is called when any of the location/image/tag query is completed
       
   376 	* @param aQuery The Query type
       
   377 	* @param aError	Indicates if the query was completed successfully or with any err
       
   378 	*
       
   379 	*/
   246 	void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError);
   380 	void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError);
   247 	
   381 
   248 private:    
   382 #ifdef LOC_GEOTAGGING_CELLID	
       
   383 public:     // MGeoConverterObserver
       
   384     /**
       
   385      * This method is used for notifying completion of geotagging
       
   386      * @param aError error code
       
   387      * @param aPosition position (lat/lon) for the correcponding n/w info
       
   388      */
       
   389      void ConversionCompletedL( const TInt aError, TLocality& aPosition );
       
   390 
       
   391 	/**
       
   392 	* This method is used to handle the conversion error
       
   393 	* @param aError the error code
       
   394 	*/
       
   395 	 void HandleConversionError(TInt aError);
       
   396 	
       
   397 #endif	 
       
   398 public: 
       
   399 
       
   400     /*
       
   401     * Get registrer network country code
       
   402     *
       
   403     * @return current register n/w info
       
   404     */
       
   405     IMPORT_C RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisteredNw();
       
   406 	
       
   407     
       
   408 private:   
   249     /**
   409     /**
   250      * Stores the location info into the array.
   410      * Stores the location info into the array.
   251      */
   411      * @param aSatelliteInfo Satellite information
   252     void StoreLocation( /*const TPosition& aPosition, const TCourse& aCourse,*/ 
   412      */
   253     		const TPositionSatelliteInfo& aSatelliteInfo );
   413     void StoreLocation( const TPositionSatelliteInfo& aSatelliteInfo );
   254     
   414     
   255     /**
   415     /**
   256      * Changes the current state. New state is published in P&S and
   416      * Changes the current state. New state is published in P&S and
   257      * possible observer is notified.
   417      * possible observer is notified.
       
   418      * @param aState The location trail state that is to be set
   258      */    
   419      */    
   259     void SetCurrentState( TLocTrailState aState );
   420     void SetCurrentState( TLocTrailState aState );
   260     
   421     
   261     /**
   422     /**
   262      * Returns the requested location via callback method, if the location
   423      * Returns the requested location via callback method, if the location
   263      * is valid. Otherwise new location value is requested until the value
   424      * is valid. Otherwise new location value is requested until the value
   264      * is succesful, or the time out limit has been reached.
   425      * is succesful, or the time out limit has been reached.
       
   426      * @param aSatelliteInfo The satelliteInfo object
       
   427      * @param aError Indicates any error in handling the location request
   265      * 
   428      * 
   266      */
   429      */
   267     void HandleLocationRequest( const TPositionSatelliteInfo& aSatelliteInfo /*TLocality& aPosition*/, 
   430     void HandleLocationRequest( const TPositionSatelliteInfo& aSatelliteInfo /*TLocality& aPosition*/, 
   268                                 const TInt aError );
   431                                 const TInt aError );
   269     /**
   432     /**
   270      * C++ constructor.
   433      * C++ constructor.
       
   434      * @param aGeoTaggerObserver The observer that is to be notified when geotagging completes
   271      */  
   435      */  
   272     CLocationRecord();
   436      CLocationRecord(MGeoTaggerObserver& aGeoTaggerObserver, RMobilePhone& aPhone);
   273     
   437  
   274     /**
   438     /**
   275      * 2nd phase constructor.
   439      * 2nd phase constructor.
   276      */
   440      */
   277     void ConstructL();
   441     void ConstructL();
   278     
   442     
   280      * Read interval value from Central repository
   444      * Read interval value from Central repository
   281      * @param aKey, Key to item
   445      * @param aKey, Key to item
   282      * @param aValue, Read value
   446      * @param aValue, Read value
   283      */ 
   447      */ 
   284     void ReadCenRepValueL(TInt aKey, TInt& aValue);
   448     void ReadCenRepValueL(TInt aKey, TInt& aValue);
   285     
   449 
       
   450 	/**
       
   451 	* Validates the lat lon values recieved
       
   452 	* @param aSatelliteInfo The satelliteInfo object
       
   453 	* @return ETrue if the lat=lon are valid
       
   454 	*/
   286     TBool CheckGPSFix( const TPositionSatelliteInfo& aSatelliteInfo );
   455     TBool CheckGPSFix( const TPositionSatelliteInfo& aSatelliteInfo );
   287     
   456 
       
   457 
       
   458 	/**
       
   459 	* Starts the network info timer
       
   460 	*/
   288     void StartTimerL();
   461     void StartTimerL();
   289 
   462 
       
   463 
       
   464 	/**
       
   465 	* Fetches the location info from the db
       
   466 	*/
       
   467 	
       
   468     void FindLocationFromDBL();
       
   469 
       
   470 
       
   471 	/**
       
   472 	* Find location entry
       
   473 	* @param aQuery       query type for the tag
       
   474 	* @param aLocationId  Location Id
       
   475 	*/
       
   476     void FindAnyLocationMatchesL( CMdEQuery& aQuery, TUint& aLocationId );
       
   477 	
       
   478     /**
       
   479 	* Remaps the location objects when GPS is available
       
   480 	* @param aGPSInfoAvailable Boolean value to indicate if GPS is available
       
   481 	*/
       
   482     void RemapObjectsL( TBool aGPSInfoAvailable );
       
   483 
       
   484     /**
       
   485 	* Check any location object already exists with same network info
       
   486 	*/	
       
   487     void FindLocationWithSameNetInfoL();
       
   488 
       
   489     /**
       
   490 	* Initialises the location object definitions
       
   491 	*/	
       
   492     void InitialiseL();
       
   493 
       
   494     /**
       
   495 	* handle network location related query on complete
       
   496 	* @param aQuery the query type
       
   497 	*/    
       
   498     void HandleNetLocationQueryL( CMdEQuery& aQuery );
       
   499 
       
   500 
       
   501     /**
       
   502 	* handle the location query  on location query complete
       
   503 	* @param aQuery the query type
       
   504 	*/	
       
   505     void HandleLocationQueryL( CMdEQuery& aQuery );
       
   506 
       
   507     /**
       
   508 	* Callback method on geotagging complete
       
   509 	*/	
       
   510     void GeoTaggingCompleted();
       
   511 
       
   512 #ifdef LOC_REVERSEGEOCODE
       
   513     /**
       
   514      * Get any imagefor this location object
       
   515      * @param aLocID, location object Id
       
   516      */ 
       
   517     void GetRelatedImageL( TItemId aLocID );
       
   518     
       
   519     /**
       
   520      * Get tags for this image
       
   521      * @param aImageID, image object Id
       
   522      */  
       
   523     void GetTagsL( TItemId aImageID );
       
   524 
       
   525     /**
       
   526 	* handle the tag query on complete
       
   527 	* @param aQuery the query type
       
   528 	*/	
       
   529     void HandleTagQueryL( CMdEQuery& aQuery );
       
   530 
       
   531 
       
   532      // MReverseGeocodeObserver
       
   533      //from reverse-geocode observer 
       
   534      /*
       
   535         * Call back method from reverse geo coder with address details like country, city..
       
   536         * @param aErrorcode Indicates any error in Reverse geocoding
       
   537         * aAddressInfo address info
       
   538         */
       
   539      void ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo );
       
   540     
       
   541     /*
       
   542     * Get registrer network country code
       
   543     *
       
   544     * @return current register n/w info
       
   545     */
       
   546     RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
       
   547 	
       
   548     /*
       
   549     * UE is registered to home network?
       
   550     *
       
   551     * @return ETrue if UE is registered at home network else EFalse
       
   552     */
       
   553     TBool IsRegisteredAtHomeNetwork();
       
   554 
       
   555 
       
   556     /*
       
   557     * Get home network country code
       
   558     * @param aHomeNwInfoAvailableFlag ETrue if home n/w info available else EFalse
       
   559     * @return user home n/w info
       
   560     */
       
   561     const RMobilePhone::TMobilePhoneNetworkInfoV1& 
       
   562         GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag);
       
   563 
       
   564 	/**
       
   565 	* Find country & city tags id
       
   566 	* @param aQuery         query type for the tag
       
   567 	* @param aCountryTagId  country tag Id
       
   568 	* @param aCityTagId     city tag Id
       
   569 	*/    
       
   570     void FindCountryAndCityTagL( CMdEQuery& aQuery, TItemId& aCountryTagId, TItemId& aCityTagId );
       
   571 
       
   572 #endif // LOC_REVERSEGEOCODE
       
   573 
       
   574     /**
       
   575 	* Handle n/w related information on taken photograph
       
   576 	* 
       
   577 	*/	
       
   578     void NetworkInfoSnapshotL();
       
   579 
       
   580     /**
       
   581 	* Find location from DB within the non leaving method
       
   582 	*/	
       
   583 	void HandleFindLocationFromDB();
       
   584 
       
   585     /**
       
   586 	* handle MDS query failure sceenario
       
   587 	*/	
       
   588 	void HandleQueryFailure();
       
   589 
       
   590     
   290 private:
   591 private:
       
   592     enum TRemapState
       
   593         {
       
   594         ERemapProgressNone = 0x00,
       
   595         ERemapRevGeoCodeInProgress,
       
   596         ERemapRevGeoCodePending,
       
   597         ERemapNwGeoConverterInProgress,
       
   598         ERemapNwGeoConverterPending
       
   599         };
   291 	/**
   600 	/**
   292 	 * A session to Metadata Engine for creating and manipulating location objects.
   601 	 * A session to Metadata Engine for creating and manipulating location objects.
   293 	 */
   602 	 */
   294 	CMdESession* iMdeSession;
   603 	CMdESession* iMdeSession;
   295 	
   604 	
   307 
   616 
   308     /**
   617     /**
   309      * An array to collect location values.
   618      * An array to collect location values.
   310      * Own.
   619      * Own.
   311      */
   620      */
   312     RArray<TLocationTrailItem> iTrail;
   621     RPointerArray<TLocationTrailItem> iTrail;
   313 
   622 
   314     /**
   623     /**
   315      * P&S key property.
   624      * P&S key property.
   316      * Own.
   625      * Own.
   317      */
   626      */
   319 
   628 
   320     /**
   629     /**
   321      * Active class to get network information.
   630      * Active class to get network information.
   322      * Own.
   631      * Own.
   323      */
   632      */
   324     CNetworkInfo* iNetworkInfo;
   633     CNetworkInfo* iNetworkInfoChangeListener;
   325     
   634     
   326     /**
   635     /**
   327      * Active class to get position information.
   636      * Active class to get position information.
   328      * Own.
   637      * Own.
   329      */
   638      */
   355     TInt iInterval;
   664     TInt iInterval;
   356     
   665     
   357     TBool                  iRequestCurrentLoc;
   666     TBool                  iRequestCurrentLoc;
   358     TBool                  iTrailStarted;
   667     TBool                  iTrailStarted;
   359     
   668     
   360     TUint				   iLastNumberOfSatellitesUsed;
       
   361     TReal32				   iLastHDOP;
       
   362     TReal32				   iLastVDOP;
       
   363     TBool				   iLastGPSFixState;
   669     TBool				   iLastGPSFixState;
   364     
   670     
   365     TInt                   iLocationDelta;
   671     TInt                   iLocationDelta;
   366     TLocationData          iLastLocation;
   672     TLocationData          iLastLocation;
   367     TItemId                iLastLocationId;
       
   368     
   673     
   369     TItemId iObjectId;               
   674     TItemId iObjectId;               
   370     TLocationData iLocationData;
   675     TLocationData iLocationData;
   371     
   676     
   372     /**
   677     /**
   373      * This query object is used to find existing locations
   678      * This query object is used to find existing locations
   374      */
   679      */
   375     CMdEObjectQuery* iLocationQuery;
   680     CMdEObjectQuery* iLocationQuery;
       
   681 	
       
   682 
       
   683     /** 
       
   684      * Net location query
       
   685      */
       
   686     CMdEObjectQuery* iNetLocationQuery;
       
   687     
       
   688     
       
   689     TRemapState iRemapState;
       
   690     
       
   691     
       
   692     /**
       
   693      * Database definitions.
       
   694      */
       
   695     CMdENamespaceDef* iNamespaceDef;  
       
   696     CMdEObjectDef* iLocationObjectDef;
       
   697     CMdEPropertyDef* iLatitudeDef;
       
   698     CMdEPropertyDef* iLongitudeDef;
       
   699     CMdEPropertyDef* iAltitudeDef;
       
   700     
       
   701     /**
       
   702       * An array to collect downloaded object 
       
   703       * and its location details.
       
   704       */
       
   705     RPointerArray<TLocationSnapshotItem> iMediaItems;
       
   706         
       
   707     TLocationSnapshotItem iLastMediaItem;
       
   708         
       
   709     TInt                 iMediaHandlingFlag;
       
   710 	RMobilePhone&	iPhone;	
       
   711 
       
   712     /*
       
   713     * Flag to track GPS data availability to update camera location icon.
       
   714     */
       
   715     TBool iGpsDataAvailableFlag;
       
   716 
       
   717     MGeoTaggerObserver& iGeoTaggerObserver;
       
   718 
       
   719 #ifdef LOC_GEOTAGGING_CELLID	
       
   720     /*
       
   721        * Geo converter
       
   722        */
       
   723 	CGeoConverter* iGeoConverter;
       
   724     TBool iConvertRetry;
       
   725 #endif
       
   726 
       
   727 #ifdef LOC_REVERSEGEOCODE
       
   728     
       
   729     TConnectionOption    iConnectionOption;
       
   730 
       
   731     /** 
       
   732      * query object for getting an image/video object
       
   733      */
       
   734    	CMdERelationQuery* iImageQuery;
       
   735    	/** 
       
   736    	 * query object for getting country and city tags
       
   737    	 */
       
   738     CMdERelationQuery* iTagQuery;	
       
   739     TLocationSnapshotItem iLastLocationItem;
       
   740     RPointerArray<TLocationSnapshotItem> iLocationItems;
       
   741     /** 
       
   742      * to create/attach tags
       
   743      */
       
   744    	CTagCreator *iTagCreator;
       
   745     /*
       
   746      * Flag to track last reverse geocode failure sceenario
       
   747      */
       
   748 	TBool iLastReverseGeocodeFails;
       
   749 
       
   750     /*
       
   751      * Reverse geo coder plugin object
       
   752      */
       
   753 	CReverseGeoCoderPlugin* iRevGeocoderPlugin;
       
   754     TUid iDtorKey;
       
   755 
       
   756 #endif
       
   757 	
   376     };
   758     };
   377 
   759 
   378 #endif // C_CLOCATIONRECORD_H 
   760 #endif // C_CLOCATIONRECORD_H 
   379 
   761 
   380 // End of file.
   762 // End of file.