applayerprotocols/httptransportfw/inc/framework/cheadercodecplugin.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2005-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 __CHEADERCODECPLUGIN_H__
       
    17 #define __CHEADERCODECPLUGIN_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <http/framework/cheadercodec.h>
       
    21 #include <stringpool.h>
       
    22 #include <ecom/ecom.h>
       
    23 
       
    24 /**
       
    25 ECOM interface definition.
       
    26 
       
    27 
       
    28 This interface is derived from CHeaderCodec and it performs construction of Codec plugins 
       
    29 and allows the caller to determine which codecs are used and in which order. 
       
    30 
       
    31 
       
    32 The caller specifies the order of the desired codecs using a slash-separated string of names, 
       
    33 starting with the protocol name.
       
    34 
       
    35 
       
    36 for example:
       
    37 
       
    38 
       
    39 @code
       
    40 _LIT8(KHttpClientCodecName, "HTTP/client");
       
    41 CHeaderCodec* codec = CHeaderCodecPlugin::NewL( KHttpClientCodecName, iSession.StringPool());
       
    42 @endcode
       
    43 
       
    44 
       
    45 This says to use, for the HTTP protocol a client Codec, in addition to these are the implicit
       
    46 general and default HTTP Codecs.
       
    47 
       
    48 
       
    49 @publishedPartner
       
    50 @released
       
    51 */
       
    52 
       
    53 class CHeaderCodecPlugin : public CHeaderCodec
       
    54 	{
       
    55 public: // methods
       
    56 	IMPORT_C static CHeaderCodecPlugin* NewL(const TDesC8& aCodec, RStringPool aStringPool);
       
    57 	IMPORT_C virtual ~CHeaderCodecPlugin();
       
    58 
       
    59 protected:
       
    60 	IMPORT_C virtual CHeaderCodec* CreateDelegateCodecL(RStringPool aStringPool) const;
       
    61 
       
    62 private:	// methods
       
    63 	static TUid FindImplementationUidL(const TDesC8& aCodec, TPtrC8& aNext);
       
    64 	void ConstructL(TDesC8& aDelegateName);
       
    65 	
       
    66 private:	// attributes
       
    67 	HBufC8*  iDelegateName; // the name of the delegate to create
       
    68 	TUid  iDtor_ID_Key;   // Destructor key identification required for ECOM
       
    69 	TAny* iData;		//reserved for future use
       
    70 	};
       
    71 
       
    72 #endif //__CHEADERCODECPLUGIN_H__