networkprotocolmodules/suplprotocolmodule/SuplProtocol/inc/suplsessioncompleter.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 // Copyright (c) 2008-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 completes sessions with
       
    15 // LBS asynchronously.
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalTechnology
       
    22  @deprecated
       
    23 */
       
    24 
       
    25 #ifndef __SUPLSESSIONCOMPLETER_H__
       
    26 #define __SUPLSESSIONCOMPLETER_H__
       
    27 #include <e32base.h>
       
    28 #include <lbs/lbsnetcommon.h>
       
    29 
       
    30 class MSuplProtocolManagerObserver;
       
    31 
       
    32 
       
    33 /** Session Completer class
       
    34 
       
    35 This class is used by the SUPL Procol Manager for completing sessions 
       
    36 requested by LBS for procedures that are not supported by SUPL (like Transmit
       
    37 to Third Party) and for procedures that do not require the use of SUPL (like
       
    38 a self-locate request in Autonomous mode).
       
    39 
       
    40 */
       
    41 NONSHARABLE_CLASS(CSuplSessionCompleter) : public CActive
       
    42 	{
       
    43 
       
    44 public:
       
    45 
       
    46 	typedef struct {TLbsNetSessionId iSessionId;
       
    47 					TInt iError;} 
       
    48 				   TSuplCompleteDetails;
       
    49 
       
    50 	static CSuplSessionCompleter* NewL(MSuplProtocolManagerObserver& aGateway);
       
    51 	~CSuplSessionCompleter();
       
    52 
       
    53 	void CompleteSession(const TLbsNetSessionId& aSessionId, TInt aError);
       
    54 	
       
    55 	// From CActive
       
    56 	void RunL();
       
    57 	void RunError();
       
    58 	void DoCancel();
       
    59 
       
    60 private:
       
    61 
       
    62 	CSuplSessionCompleter(MSuplProtocolManagerObserver& aGateway);
       
    63 	void ConstructL();
       
    64 	
       
    65 	void ActivateCompleter();
       
    66 
       
    67 private:
       
    68 
       
    69 	/** Protocol Manager Observer
       
    70 	Reference to the Gateway Interface for 
       
    71 	sending session completion messages
       
    72 	to LBS	*/
       
    73 	MSuplProtocolManagerObserver& iGateway;
       
    74 
       
    75 	/** Queue of session IDs plus associated errors to be used when
       
    76 	completing sessions
       
    77 	*/
       
    78 	RArray<TSuplCompleteDetails> iSessionInfo;
       
    79 	};
       
    80 
       
    81 #endif // __SUPLSESSIONCOMPLETER_H__