networkprotocolmodules/networkprotocolmodule/LbsProtocolModule/inc/cgatewayinterface.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     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 // This file defines the class that implements the ECOM plug-in 
       
    15 // interface for LBS Network Protocol Modules.
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalComponent
       
    22  @test
       
    23 */
       
    24 
       
    25 #ifndef __CGATEWAYINTERFACE_H__
       
    26 #define __CGATEWAYINTERFACE_H__
       
    27 
       
    28 #include <e32base.h>
       
    29 #include <lbs/lbsnetcommon.h>
       
    30 #include <lbs/lbsnetprotocolbase.h>
       
    31 #include "cprotocolmanager.h"
       
    32 
       
    33 
       
    34 /** LBS Network Protocol Interface 
       
    35 This class implements the LBS Network Gateway plug-in interface which
       
    36 allows the module to be accessed by, and to interact with, LBS.
       
    37 @see CLbsNetworkProtocolBase
       
    38 @see MLbsNetworkProtocolObserver
       
    39 
       
    40 The class also implements the internal MProtocolMgrObserver interface
       
    41 which is used to receive calls from within the protocol module.
       
    42 @see MProtocolMgrObserver
       
    43 */
       
    44 NONSHARABLE_CLASS(CGatewayInterface)
       
    45  : public CLbsNetworkProtocolBase, public MProtocolMgrObserver
       
    46 	{
       
    47 	
       
    48 public:
       
    49 
       
    50 	static CGatewayInterface* NewL(TAny* aParams);
       
    51 	~CGatewayInterface();
       
    52 
       
    53 
       
    54 	// CLbsNetworkProtocolBase methods
       
    55 
       
    56 	void RespondPrivacyRequest(const TLbsNetSessionId& aSessionId,
       
    57 								const TLbsPrivacyResponse& aResponse);
       
    58 	
       
    59 	void RespondLocationRequest(const TLbsNetSessionId& aSessionId,
       
    60 								TInt  aReason,
       
    61 								const TPositionInfoBase& aPosInfo);
       
    62 
       
    63 	void RequestTransmitLocation(const TLbsNetSessionId& aSessionId,
       
    64 								const TDesC& aDestination,
       
    65 								TInt aPriority);
       
    66 									
       
    67 	void CancelTransmitLocation(const TLbsNetSessionId& aSessionId,
       
    68 								TInt  aReason);
       
    69 	
       
    70 	void RequestAssistanceData(TLbsAsistanceDataGroup aDataRequestMask);
       
    71 	
       
    72 	void RequestNetworkLocation(const TLbsNetSessionId& aSessionId,
       
    73 							const TLbsNetPosRequestOptionsBase& aOptions);	
       
    74 	
       
    75 	void CancelNetworkLocation(const TLbsNetSessionId& aSessionId,
       
    76 							TInt  aReason);
       
    77 
       
    78 	void RequestSelfLocation(const TLbsNetSessionId& aSessionId,
       
    79 							const TLbsNetPosRequestOptionsBase& aOptions);	
       
    80 	
       
    81 	void CancelSelfLocation(const TLbsNetSessionId& aSessionId,
       
    82 							TInt  aReason);
       
    83 
       
    84 	void AdviceSystemStatus(TLbsSystemStatus aStatus);
       
    85 
       
    86 	// MProtocolMgrObserver methods	
       
    87 
       
    88 	void PrivacyReq(const TLbsNetSessionId& aSessionId, TBool aEmergency, 
       
    89 					const TLbsNetPosRequestPrivacy& aPrivacy,
       
    90 					const TLbsExternalRequestInfo& aRequestInfo); 
       
    91 
       
    92 	void NetworkLocationInd(const TLbsNetSessionId& aSessionId, const TPositionInfoBase& aPosInfo);
       
    93 
       
    94 	void AssistanceDataInd(const TLbsAsistanceDataGroup& aGroupMask,
       
    95 					const RLbsAssistanceDataBuilderSet& aData, TInt aReason);
       
    96 
       
    97 	void LocationReq(const TLbsNetSessionId& aSessionId, TBool aEmergency,
       
    98 					const MLbsNetworkProtocolObserver::TLbsNetProtocolService& aType, 
       
    99 					const TLbsNetPosRequestQuality& aQuality, const TLbsNetPosRequestMethod& aPosMethod);
       
   100 
       
   101 	void SessionCompleteInd(const TLbsNetSessionId& aSessionId, TInt aReason);
       
   102 	void GetCapabilities(TLbsNetPosCapabilities& aCapabilities);
       
   103 	void StatusUpdate(MLbsNetworkProtocolObserver::TLbsNetProtocolServiceMask aActiveServiceMask);
       
   104 	void ResetAssistanceData(TLbsAssistanceDataGroup aMask, const RLbsAssistanceDataBuilderSet& aData);
       
   105 	
       
   106 private:
       
   107 
       
   108 	CGatewayInterface(MLbsNetworkProtocolObserver& aObserver);
       
   109 	
       
   110 	void ConstructL();
       
   111 
       
   112 private:
       
   113 
       
   114 	/** Reference to this protocol module's observer.
       
   115 	This is used to make callbacks into LBS from the protocol module.
       
   116 	*/
       
   117 	MLbsNetworkProtocolObserver& iObserver;
       
   118 
       
   119 	/** Protocol manager object pointer.
       
   120 	This object is created and owned by this class and represents the
       
   121 	internal manager for the protocol module. The object is used to
       
   122 	make requests into the module in support of LBS interactions.
       
   123 	*/
       
   124 	CProtocolManager* iManager;
       
   125 	
       
   126 	};
       
   127     
       
   128 #endif // __CGATEWAYINTERFACE_H__