camerauis/cameraxui/cxengine/tsrc/unit/system_include/rlocationtrail.h
changeset 46 c826656d6714
parent 42 feebad15db8c
equal deleted inserted replaced
42:feebad15db8c 46:c826656d6714
     1 /*
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description:  An interface to Location Trail.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #ifndef R_RLOCATIONTRAIL_H
    18 #ifndef R_RLOCATIONTRAIL_H
    19 #define R_RLOCATIONTRAIL_H
    19 #define R_RLOCATIONTRAIL_H
    20 
    20 
    21 #include <e32base.h>
       
    22 #include <etel3rdparty.h>
       
    23 #include <lbsposition.h>
       
    24 #include <locationdatatype.h>
       
    25 
       
    26 typedef TPckg<TLocality> TLocalityPckg;
       
    27 
    21 
    28 /**
    22 /**
    29  *  RLocationManager dummy.
    23  *  Fake implementation of RLocationManager class which is used for creating a Location Manager session.
    30  */
    24  *  Location Manager is used to start and stop the location trail, retrieve 
    31 class RLocationTrail
    25  *  location information and write the location information to images.
       
    26 */
       
    27 class  RLocationTrail
    32     {
    28     {
    33 public:
    29 public:
    34 
    30     /**
       
    31      * Location trail states.
       
    32      */
    35     enum TTrailState
    33     enum TTrailState
    36         {
    34         {
    37         ETrailStopped,
    35         ETrailStopped,
    38         EWaitingGPSData,
    36         EWaitingGPSData,
    39         ESearchingGPS,
    37         ESearchingGPS,
    40         ETrailStarted,
    38         ETrailStarted,
    41         ETrailStopping,
    39         ETrailStopping,
    42         ETrailStarting
    40         ETrailStarting
    43         };
    41         };
       
    42 
    44     enum TTrailCaptureSetting
    43     enum TTrailCaptureSetting
    45         {
    44     	{
    46         EOff,
    45     	EOff,
    47         ECaptureNetworkInfo,
    46     	ECaptureNetworkInfo,
    48         ECaptureAll
    47     	ECaptureAll 
    49         };
    48     	};    
    50 
    49 
    51 public:
    50 public:
    52     RLocationTrail();
    51 	RLocationTrail();
    53     ~RLocationTrail();
    52 	
       
    53 	~RLocationTrail();
    54 
    54 
    55     TInt Connect();
    55     /**
       
    56      * Starts recording location information to location trail.
       
    57      * @since S60 3.2
       
    58      * @param aState, an enumeration of ECaptureNetworkInfo  
       
    59      * (only cell ID stored) and ECaptureAll 
       
    60      * (GPS coordinates and cell ID stored).
       
    61      * @return KErrNone if successful, otherwise one of the other 
       
    62      *         system-wide error codes.
       
    63      */
       
    64     int StartLocationTrail(TTrailCaptureSetting aState);
       
    65     
       
    66     /**
       
    67      * Stops recording location information to location trail.
       
    68      * @since S60 3.1
       
    69      * @param None.
       
    70      * @return KErrNone if successful, otherwise one of the other 
       
    71      *         system-wide error codes.
       
    72      */
       
    73     int StopLocationTrail();
       
    74     
       
    75     
       
    76     /**
       
    77     * Connect to location trail server
       
    78     * @return KErrNone if successful, otherwise one of the other 
       
    79     *         system-wide error codes.
       
    80     **/
       
    81     int Connect();
       
    82     
    56     void Close();
    83     void Close();
    57 
    84 
    58     TInt StartLocationTrail(TTrailCaptureSetting aState);
    85 private:
    59     TInt StopLocationTrail();
    86     bool mTrailConnected;
    60     TInt GetLocationTrailState( TTrailState& aState );
    87     bool mTrailStarted;
    61     void NotifyLocationTrailStateChange( TRequestStatus& aStatus );
       
    62     void CancelNotificationRequest();
       
    63     TInt RetrieveLocation( const TTime& aTimeStamp,
       
    64                            TLocationData& aLocationData,
       
    65                            TTrailState& aState );
       
    66     void CurrentLocation( TRequestStatus& aStatus,
       
    67                           TLocationData& aLocationData);
       
    68     void CancelLocationRequest();
       
    69     TInt GetTrailCaptureSetting( TTrailCaptureSetting& aCaptureSetting );
       
    70     };
    88     };
    71 
    89     
    72 #endif // R_RLOCATIONTRAIL_H
    90 #endif // R_RLOCATIONTRAIL_H
    73 
    91 
    74 // end of file
    92 //End of File