locationmgmt/networklocationmgr/inc/lbsnetlocmanlogic.h
changeset 36 b47902b73a93
parent 0 9cfd9a3ee49c
equal deleted inserted replaced
35:a2efdd544abf 36:b47902b73a93
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef __NETLOCMANLOGIC_H__
       
    23 #define __NETLOCMANLOGIC_H__
       
    24 
       
    25 //****************************************************************
       
    26 // Includes
       
    27 //****************************************************************
       
    28 //System
       
    29 #include <e32base.h>
       
    30 
       
    31 //LBS
       
    32 #include <lbs.h>
       
    33 #include "LbsInternalInterface.h"
       
    34 #include "lbsrootapi.h"
       
    35 #include "lbsprocesssupervisor.h"
       
    36 #include "cquietus.h"
       
    37 
       
    38 //Component
       
    39 #include "lbsnetlocmanrequesthandler.h"
       
    40 #include "lbsnetlocmanresponsehandler.h"
       
    41 
       
    42 
       
    43 //****************************************************************
       
    44 // Classes
       
    45 //****************************************************************
       
    46 
       
    47 /** This is the class implementing the main logic of the Network Location Manager
       
    48 This class is responsible for:
       
    49 	- Subscribing to position update request from the LocServer
       
    50 	- Starting the requesthandler, which is handles the request 
       
    51 	  (LocServer->NetworkLocationManager->NetworkGateway) 
       
    52 	  and the responsehandler, which handles the response
       
    53 	  (NetworkLocationManager->NetworkGateway->LocServer)
       
    54 	- Keeping track of session id's for requests passed through
       
    55 	- Listening for close down requests
       
    56 
       
    57 @see MLbsProcessCloseDown
       
    58 */
       
    59 
       
    60 //************************************************************************************************************
       
    61 //	CManagerMainLogic
       
    62 //************************************************************************************************************
       
    63 class CNetLocManLogic :	public CBase, public MLbsProcessCloseDown
       
    64 	{
       
    65 public:
       
    66 	static CNetLocManLogic* NewL();
       
    67 	~CNetLocManLogic();
       
    68 	
       
    69 public:
       
    70 	TVersion Version();
       
    71 	void UpdateLocation(TInt aStatus, TPositionInfoBase& aPosition, const TTime& aTargetTime);
       
    72 	void GetSessionId(TLbsNetSessionIdInt& aSessionId);
       
    73 	void IncrementSessionId();
       
    74 	
       
    75 	//from MLbsCloseDownObserver
       
    76 	void OnProcessCloseDown();
       
    77 	void UpdateDeviceStatus(TPositionModuleStatus::TDeviceStatus aDeviceStatus);
       
    78 private:
       
    79 	CNetLocManLogic();
       
    80 	void ConstructL();
       
    81 
       
    82 private:
       
    83 	CNetLocManRequestHandler*		iLocSvrLocationRequestHandler;
       
    84 	CNetLocManResponseHandler*		iNetLocationResponseHandler;
       
    85 	CLbsCloseDownRequestDetector*	iCloseDownRequestDetector;
       
    86 	RLbsPositionUpdates 			iPositionUpdates;
       
    87 	TLbsNetSessionIdInt				iCurrentId;
       
    88 	RLbsModuleStatus				iModuleStatus;
       
    89 	TPositionModuleStatus			iPreviousReportedModuleStatus;
       
    90 	};
       
    91 
       
    92 
       
    93 #endif //__NETLOCMANLOGIC_H__