applayerpluginsandutils/httptransportplugins/httptransporthandler/chttptransportlayer.inl
changeset 0 b16258d2340f
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 #include <ecom/ecom.h>
       
    17 
       
    18 inline
       
    19 THttpTransportConstructionParams::THttpTransportConstructionParams(MConnectionPrefsProvider& aConnectionPrefsProvider)
       
    20 :iConnectionPrefsProvider(aConnectionPrefsProvider)
       
    21 /**
       
    22 	Constructor.
       
    23 	@param		aConnectionPrefsProvider	Reference to a comms connection 
       
    24 											callback provider.
       
    25 */
       
    26 	{
       
    27 	iPriority= EFalse;
       
    28 	}
       
    29 
       
    30 inline
       
    31 CHttpTransportLayer* CHttpTransportLayer::NewL(const TDesC8& aTransportType, THttpTransportConstructionParams& aHttpTransportParams)
       
    32 /**	
       
    33 	The factory contructor. Uses ECOM to find the appropriate implementation.
       
    34 	@param		aTransportType The underlying transport protocol, e.g. tcp.
       
    35 	@param		aHttpTransportParams Required construction parameters
       
    36 	@return		A pointer to a fully constructed object.
       
    37 */
       
    38 	{
       
    39 	// CHttpTransportLayer ECOM Interface UID = 101F55EC
       
    40 	const TUid KUidHttpTransportLayer = {0x101F55EC};
       
    41 
       
    42 	// Set resolving parameters
       
    43 	TEComResolverParams resolverParams;
       
    44 	resolverParams.SetDataType(aTransportType);
       
    45 	resolverParams.SetWildcardMatch(ETrue);
       
    46 
       
    47 	// Get the instantiation.  Allow ECOM to use the default resolver.
       
    48 	TAny* ptr = REComSession::CreateImplementationL(
       
    49 												   KUidHttpTransportLayer,
       
    50 												   _FOFF(CHttpTransportLayer, iDtor_ID_Key),
       
    51 												   &aHttpTransportParams,
       
    52 												   resolverParams
       
    53 												   );
       
    54 
       
    55 	return REINTERPRET_CAST(CHttpTransportLayer*, ptr);
       
    56 	}
       
    57 
       
    58 inline
       
    59 CHttpTransportLayer::~CHttpTransportLayer()
       
    60 /**
       
    61 	Destructor.
       
    62 */
       
    63 	{
       
    64 	REComSession::DestroyedImplementation(iDtor_ID_Key);
       
    65 	}
       
    66 
       
    67 inline
       
    68 CHttpTransportLayer::CHttpTransportLayer()
       
    69 : CBase()
       
    70 /**	
       
    71 	Constructor.
       
    72 */
       
    73 	{
       
    74 	}
       
    75 
       
    76 inline
       
    77 MSocketFactory& CHttpTransportLayer::SocketFactory()
       
    78 /**
       
    79 	Accessor to the socket factory object.
       
    80 	@return		A reference to the socket factory object.
       
    81 */
       
    82 	{
       
    83 	return *this;
       
    84 	}
       
    85