locationmanager/server/inc/clocationmanagersession.h
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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:  A session class for LocationManagerServer.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_CLOCATIONMANAGERSESSION_H
       
    19 #define C_CLOCATIONMANAGERSESSION_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <etel3rdparty.h>
       
    23 
       
    24 class CLocationManagerServer;
       
    25 
       
    26 /**
       
    27 *  A session class for LocationManagerServer.
       
    28 *
       
    29 *  @since S60 3.1
       
    30 */
       
    31 class CLocationManagerSession : public CSession2
       
    32     {
       
    33 public:
       
    34     /**
       
    35      * C++ constructor.
       
    36      */
       
    37     CLocationManagerSession();
       
    38     
       
    39     /**
       
    40      * From CSession2, passes the request forward to DispatchMessageL.
       
    41      * @since S60 3.1
       
    42      * @param aMessage, a message from client.
       
    43      * @return None.
       
    44      */
       
    45     void ServiceL( const RMessage2& aMessage );
       
    46     
       
    47     /**
       
    48      * Handles the request from client.
       
    49      * @since S60 3.1
       
    50      * @param aMessage, a message from client.
       
    51      * @return None.
       
    52      */
       
    53     void DispatchMessageL( const RMessage2& aMessage );
       
    54     
       
    55     /**
       
    56      * From CSession2 to add session to server's counter.
       
    57      * @since S60 3.1
       
    58      * @param None.
       
    59      * @return None.
       
    60      */
       
    61     void CreateL();    
       
    62 
       
    63 private:
       
    64     /**
       
    65      * Start location recording.
       
    66      */  
       
    67     void StartLocationTrailL( const RMessage2& aMessage );
       
    68 
       
    69     /**
       
    70      * Stop location recordind.
       
    71      */  
       
    72     void StopLocationTrailL( const RMessage2& aMessage );
       
    73 
       
    74     /**
       
    75      * Get the current state of the location trail.
       
    76      */
       
    77     void GetLocationTrailStateL( const RMessage2& aMessage );
       
    78 
       
    79     /**
       
    80      * Add notification request for location trail's state changes.
       
    81      */    
       
    82     void NotifyLocationTrailStateChangeL( const RMessage2& aMessage );
       
    83     
       
    84     /**
       
    85      * Cancel notification request.
       
    86      */    
       
    87     void CancelNotificationRequest( const RMessage2& aMessage );    
       
    88 
       
    89     /**
       
    90      * Get location by time stamp.
       
    91      */
       
    92     void RetrieveLocationL( const RMessage2& aMessage );
       
    93 
       
    94     /**
       
    95      * Get current location.
       
    96      */
       
    97     void CurrentLocationL( const RMessage2& aMessage );
       
    98     
       
    99     /**
       
   100      * Cancel request for current location.
       
   101      */
       
   102     void CancelLocationRequest( const RMessage2& aMessage );
       
   103     
       
   104     /**
       
   105      * Cancel request for tracklog notifications.
       
   106      */
       
   107     void CancelTrackLogNotificationRequest( const RMessage2& aMessage );
       
   108     
       
   109     /**
       
   110      * Create new location object with given coordinates.
       
   111      */ 
       
   112     void CreateLocationObjectL( const RMessage2& aMessage );
       
   113     
       
   114     /**
       
   115      * Create new location object from location trail.
       
   116      */ 
       
   117     void LocationSnapshotL( const RMessage2& aMessage );
       
   118     
       
   119     /**
       
   120      * Remove location object by object ID
       
   121      */ 
       
   122     void RemoveLocationObjectL( const RMessage2& aMessage );
       
   123     
       
   124     /**
       
   125      * Copy location data from one meadia object to 
       
   126      * defined media objects by media object Id.
       
   127      */ 
       
   128     void CopyLocationDataByIdL( const RMessage2& aMessage );
       
   129     
       
   130     /**
       
   131      * Copy location data from one media object to 
       
   132      * defined media objects by media object Uri.
       
   133      */ 
       
   134     void CopyLocationDataByURIL( const RMessage2& aMessage );
       
   135     
       
   136     /**
       
   137      * Start Track Log recording.
       
   138      */
       
   139     void StartTrackLogL( const RMessage2& aMessage );
       
   140     
       
   141     /**
       
   142      * Stop Track Log recording.
       
   143      */
       
   144     void StopTrackLogL( const RMessage2& aMessage );
       
   145     
       
   146     /**
       
   147      * Get Track Log recording status and GPS signal quality.
       
   148      */
       
   149     void GetTrackLogStatusL( const RMessage2& aMessage );
       
   150     
       
   151     /**
       
   152      * Delete Track Log file.
       
   153      */
       
   154     void DeleteTrackLogL( const RMessage2& aMessage );
       
   155 
       
   156     /**
       
   157      * Get track-log recording status.
       
   158      */
       
   159     void IsTrackLogRecordingL( const RMessage2& aMessage );
       
   160     
       
   161     /**
       
   162      * Get currently track log file name
       
   163      */
       
   164     void TrackLogNameL( const RMessage2& aMessage );
       
   165     
       
   166     /**
       
   167      * Get changed gps quality info when it is really changed
       
   168      */
       
   169     void RegisterTrackLogObserver( const RMessage2& aMessage );
       
   170     
       
   171     void GetCaptureSettingL( const RMessage2& aMessage );
       
   172 
       
   173 private:
       
   174     /**
       
   175     * C++ destructor.
       
   176     */
       
   177     virtual ~CLocationManagerSession(); 
       
   178 
       
   179     /*
       
   180     * Reference to Location Manager Server.
       
   181     */
       
   182     CLocationManagerServer& Server();
       
   183         
       
   184 private:
       
   185     CBufFlat* iIdBuffer;
       
   186     RMessage2 iMessage;
       
   187 
       
   188     TInt iNotificationHandle;
       
   189     TInt iLocationHandle;
       
   190     TInt iTrackLogNotificationHandle;
       
   191     };
       
   192 
       
   193 #endif // C_CLOCATIONMANAGERSESSION_H
       
   194 
       
   195 // End of file.