supl/locationsuplfw/gateway/inc/epos_csuplsessionmanager.h
changeset 0 667063e416a2
child 32 b12ea03c50a3
child 41 d746aee05493
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/supl/locationsuplfw/gateway/inc/epos_csuplsessionmanager.h	Tue Feb 02 01:06:48 2010 +0200
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   Registry for subsessions
+*
+*/
+
+
+
+#ifndef __CSuplSessionManager_H__
+#define __CSuplSessionManager_H__
+
+
+#include <e32base.h>
+#include <lbspositioninfo.h>
+#include <epos_suplterminal.h>
+#include <epos_suplterminaltrigger.h>
+#include "epos_csuplecomeventwatcher.h"
+
+// FORWARD DECLARATIONS
+class CSUPLProtocolManagerBase;
+class CSuplSessionBase;
+class CSuplCommunicationManager;
+
+// CLASS DECLARATION
+
+/**
+*  Class to handle SUPL sessions 
+*/
+class CSuplSessionManager : public CBase
+	{
+    public:  // Constructors and destructor
+
+        /**
+        * Two-phased constructor
+        *
+        * @return a new instance of this class
+        */
+		static CSuplSessionManager* NewL();
+
+        /**
+        * C++ destructor
+        */
+		~CSuplSessionManager();
+
+	public:		// New functions
+		void InitializeL(TUid uId,TRequestStatus& aStatus,MSuplEcomEventObserver& aSuplEcomEventObserver);
+		CSuplSessionBase* CreateNewSessionL(CSUPLProtocolManagerBase::TSuplReqType aReqType, TInt aIpcSessionId,RSuplTerminalSubSession::TSuplServiceType aSuplService);
+		void RunSuplSessionL(CSuplSessionBase* aSuplSessn,  TRequestStatus& aStatus,const TDesC& aHslpAddress, TBool aFallBack, TInt aSuplSETCaps, TInt aReqId, TBool aFirstReq);
+		void RunSuplSessionL(CSuplSessionBase* aSuplSessn,  TRequestStatus& aStatus,const TDesC& aHslpAddress, TBool aFallBack, TInt aSuplSETCaps, TInt aReqId,TSuplTerminalQop& aQop, TBool aFirstReq);
+		TInt DestroySession(CSuplSessionBase* aSuplSession);
+		void CancelRunSession(CSuplSessionBase *aSessn);
+		void ForwardMessageL(CSuplSessionBase* aSuplSession,TRequestStatus& iStatus,HBufC8* clientBuf);
+		TInt GetConnectError();
+		void CancelInitialize();
+		void ProtocolHUnloaded(); 
+        void DeInitialize(TRequestStatus& aStatus);
+        void CancelDeInitialize();
+
+		void StartTriggerSessionL(
+				CSuplSessionBase* aSuplSession,
+				TRequestStatus& aStatus,
+				TSuplTerminalPeriodicTrigger& aPTrigger,
+				const TDesC& aHslpAddress, 
+				TBool aFallBack,
+				TInt aAllowedCapabilities,
+				TInt aRequestID
+   			);
+   		
+		void CancelTriggerringSession(CSuplSessionBase *aSessn);
+		 
+		void NotifyTriggerFired(
+				CSuplSessionBase *aSessn,        	
+				TRequestStatus& aStatus,  
+        		TSuplTriggerFireInfo& aFireInfo
+        	);
+		
+		TInt GetSUPLMessageVersionL(TInt& aMajorVersion, const TDesC8& aReceivedMessage);
+		
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CSuplSessionManager();
+
+        /**
+        * By default EPOC constructor is private.
+        */
+        void ConstructL();
+
+        // By default, prohibit copy constructor
+        CSuplSessionManager( const CSuplSessionManager& );
+        // Prohibit assigment operator
+        CSuplSessionManager& operator= ( const CSuplSessionManager& );
+		
+	
+    private:	// Data
+        CSUPLProtocolManagerBase*   iProtocolMgr;
+        CSuplCommunicationManager*  iCommMgr;
+        TInt iConnectError;
+        CSuplEcomEventWatcher*      iEcomWatcher;
+
+    };
+
+
+#endif // __CSuplSessionManager_H__
+
+// End of File