locationrequestmgmt/locationserver/inc/EPos_CPosSession.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /*
       
     2 * Copyright (c) 2005-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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPOSSESSION_H
       
    21 #define CPOSSESSION_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <lbscommon.h>
       
    26 
       
    27 #include "EPos_CPosLocMonitorReqHandlerHub.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CPosServer;
       
    31 class CPosSubSession;
       
    32 class CPosModuleSettings;
       
    33 struct TPosModulesEvent;
       
    34 class CPrivacyClientArray;
       
    35 class TPositionModuleInfo;
       
    36 class CPosSubsessionRegistry;
       
    37 class CPosModulesStatus;
       
    38 class CPosLocMonitorReqHandlerHub;
       
    39 
       
    40 #ifdef _DEBUG
       
    41 class CPosTrace;
       
    42 #endif
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 *  The EPos session class.
       
    48 *
       
    49 *  This inherits from CSession2
       
    50 */
       
    51 class CPosSession : public CSession2
       
    52     {
       
    53     public:  // Constructors and destructor
       
    54         ~CPosSession();
       
    55         static CPosSession* NewL(CPosServer& aServer,
       
    56         		CPosModuleSettings& aModuleSettings,
       
    57 	        	CPosModulesStatus& aModulesStatus,
       
    58 	        	CPosLocMonitorReqHandlerHub& aLocMonitorReqHandlerHub);
       
    59 
       
    60     public:     // New functions
       
    61         void HandleSettingsChangeL(TPosModulesEvent aEvent);
       
    62         void NotifyServerShutdown();
       
    63 
       
    64     public:		// Functions from CSession2
       
    65         void ServiceL(const RMessage2& aMessage);
       
    66         void ServiceError(const RMessage2& aMessage, TInt aError);
       
    67 
       
    68 	private:
       
    69         CPosSession(CPosServer& aServer,
       
    70         		CPosModuleSettings& aModuleSettings,
       
    71                 CPosModulesStatus& aModulesStatus,
       
    72                 CPosLocMonitorReqHandlerHub& aLocMonitorReqHandlerHub);
       
    73 
       
    74         void ConstructL();
       
    75         CPosSession( const CPosSession& );
       
    76         CPosSession& operator= ( const CPosSession& );
       
    77 
       
    78         void OpenFromModuleIdL(const RMessage2& aMessage);
       
    79         void OpenDefaultPositionerL(const RMessage2& aMessage);
       
    80         void OpenPositionerFromCriteriaL(const RMessage2& aMessage);
       
    81         void ClosePositioner(const RMessage2& aMessage);
       
    82         void GetDefaultModuleIdL(const RMessage2& aMessage);
       
    83         void GetNumModulesL(const RMessage2& aMessage);
       
    84         void GetModuleInfoByIndexL(const RMessage2& aMessage);
       
    85         void GetModuleInfoByIdL(const RMessage2& aMessage);
       
    86         void GetModuleStatusL(const RMessage2& aMessage);
       
    87         void NotifyModuleStatusEventL(const RMessage2& aMessage);
       
    88         void NotifyModuleStatusEventCancelL(const RMessage2& aMessage);
       
    89         void HandleCancelAsyncRequestL(const RMessage2& aMessage);
       
    90         void EmptyLastKnownPositionStoreL(const RMessage2& aMessage);		// TODO Verify
       
    91         void EmptyLastKnownPositionStoreCancelL(const RMessage2& aMessage); // TODO Verify
       
    92 
       
    93         void ForwardToSubSessionL(const RMessage2& aMessage);
       
    94         void CreateSubSessionL(TPositionModuleId aId, TBool aIsProxy, const RMessage2& aMessage);
       
    95         void RequestComplete(const RMessage2& aMessage, TInt aCompleteCode);
       
    96 
       
    97     private:    // Data
       
    98         CPosServer&                 iPosServer;
       
    99         CPosSubsessionRegistry*     iSubSessionRegistry;
       
   100         CPosModuleSettings&         iModuleSettings;
       
   101         CPosModulesStatus&          iModulesStatus;
       
   102         TBool                       iDecrementSessions;
       
   103         TBool                       iServerShutdown;
       
   104         CPosLocMonitorReqHandlerHub&    iLocMonitorReqHandlerHub;
       
   105     };
       
   106 
       
   107 #endif      // CPOSSESSION_H
       
   108 
       
   109 // End of File