epoc32/include/http/mhttpdataoptimiser.h
branchSymbian2
changeset 2 2fe1408b6811
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     1 // Copyright (c) 2007-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file mhttpoptimisercallback.h
       
    20  @warning : This file contains Rose Model ID comments - please do not delete
       
    21 */
       
    22 
       
    23 #ifndef	__MHTTPDATAOPTIMISER_H__
       
    24 #define	__MHTTPDATAOPTIMISER_H__
       
    25 
       
    26 
       
    27 //@publishedPartner
       
    28 //@released
       
    29 class MHttpDataOptimiser
       
    30 {
       
    31 	public:
       
    32 	/**
       
    33 	This method converts the HTTP message data to the proprietary protocol format. 
       
    34 	It is the responsibility of the implementation to allocate the required buffer for the encoded data. 
       
    35 	It is the responsibility of the caller to free the allocated memory.
       
    36 	@param	aHTTPData Contains the message data in HTTP format.
       
    37 	@param	aEncodedData On return it contains the encoded message data.
       
    38 	@leave		KErrNoMemory On insuffcient memory conditions.
       
    39 	*/
       
    40 	virtual void EncodeL (const TDesC8& aHttpData, HBufC8*& aEncodedData) = 0;
       
    41 
       
    42 	/**
       
    43 	This method converts the data from the proprietary protocol format to the HTTP format. 
       
    44 	It is the responsibility of the implementation to allocate the required buffer for the encoded data. 
       
    45 	It is the responsibility of the caller to free the allocated memory.
       
    46 	@param	aData Is the raw data received over the TCP connection.
       
    47 	@param	aHTTPData On return contains the data in HTTP format.
       
    48 	@param	aTransFail If set to ETrue, sends the KErrHTTPOptimiserFailsTrans event to the client. 
       
    49 	@leave		KErrNoMemory On insuffcient memory conditions.
       
    50 	*/
       
    51 	virtual void DecodeL (const TDesC8& aData, HBufC8*& aHttpData, TBool& aTransFail) = 0;
       
    52 };
       
    53 
       
    54 
       
    55 #endif //	__MHTTPDATAOPTIMISER_H__