applayerpluginsandutils/httptransportplugins/httptransporthandler/chttptransportlayer.h
changeset 0 b16258d2340f
child 18 5f1cd966e0d9
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2003-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 #ifndef __CHTTPTRANSPORTLAYER_H__
       
    17 #define __CHTTPTRANSPORTLAYER_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include "msocketfactory.h"
       
    21 
       
    22 class MConnectionPrefsProvider;
       
    23 
       
    24 class THttpTransportConstructionParams
       
    25 /**
       
    26 This class is defines the construction parameters required by the 
       
    27 CHttpTransportLayer ECom interface.
       
    28 @see		CHttpTransportLayer
       
    29 */
       
    30 	{
       
    31 public: // Methods
       
    32 
       
    33 	inline THttpTransportConstructionParams(MConnectionPrefsProvider& aConnectionPrefsProvider);	
       
    34 
       
    35 public:	//	attributes
       
    36 
       
    37 	/**	Reference to a comms connection preferences provider 
       
    38 	*/
       
    39 	MConnectionPrefsProvider& iConnectionPrefsProvider;
       
    40 	
       
    41 	TBool iPriority;
       
    42 
       
    43 	};
       
    44 
       
    45 class CHttpTransportLayer : public CBase,
       
    46 							public MSocketFactory
       
    47 /**
       
    48 This is the ECOM interface class for the http transport layer. 
       
    49 Implementations are identified by the underlying transport protocol they use.
       
    50 An implementation of this class needs to provide implementations for the 
       
    51 MSocketFactory API, the MInputStream API and the MOutputStream API.
       
    52 @see		MSocketFactory
       
    53 @see		MInputStream
       
    54 @see		MOutputStream
       
    55 */
       
    56 	{
       
    57 public:	// methods
       
    58 
       
    59 	inline static CHttpTransportLayer* NewL(const TDesC8& aTransportType, THttpTransportConstructionParams& aHttpTransportParams);
       
    60 	
       
    61 	inline virtual ~CHttpTransportLayer();
       
    62 	
       
    63 	inline MSocketFactory& SocketFactory();
       
    64 	
       
    65 protected:	// methods
       
    66 
       
    67 	inline CHttpTransportLayer();
       
    68 
       
    69 private:	// methods
       
    70 
       
    71 /**	
       
    72 	Reserved function for future expansion.
       
    73 */
       
    74 	virtual void CHttpTransportLayer_Reserved() =0;
       
    75 
       
    76 private:	// attributes
       
    77 
       
    78 /** D'tor key identification required for ECOM
       
    79 */
       
    80 	TUid	iDtor_ID_Key;
       
    81 
       
    82 	};
       
    83 	
       
    84 #include "chttptransportlayer.inl"
       
    85 
       
    86 #endif	// __CHTTPTRANSPORTLAYER_H__
       
    87