williamr@2: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file mhttpoptimisercallback.h williamr@2: @warning : This file contains Rose Model ID comments - please do not delete williamr@2: */ williamr@2: williamr@2: #ifndef __MHTTPDATAOPTIMISER_H__ williamr@2: #define __MHTTPDATAOPTIMISER_H__ williamr@2: williamr@2: williamr@2: //@publishedPartner williamr@2: //@released williamr@2: class MHttpDataOptimiser williamr@2: { williamr@2: public: williamr@2: /** williamr@2: This method converts the HTTP message data to the proprietary protocol format. williamr@2: It is the responsibility of the implementation to allocate the required buffer for the encoded data. williamr@2: It is the responsibility of the caller to free the allocated memory. williamr@2: @param aHTTPData Contains the message data in HTTP format. williamr@2: @param aEncodedData On return it contains the encoded message data. williamr@2: @leave KErrNoMemory On insuffcient memory conditions. williamr@2: */ williamr@2: virtual void EncodeL (const TDesC8& aHttpData, HBufC8*& aEncodedData) = 0; williamr@2: williamr@2: /** williamr@2: This method converts the data from the proprietary protocol format to the HTTP format. williamr@2: It is the responsibility of the implementation to allocate the required buffer for the encoded data. williamr@2: It is the responsibility of the caller to free the allocated memory. williamr@2: @param aData Is the raw data received over the TCP connection. williamr@2: @param aHTTPData On return contains the data in HTTP format. williamr@2: @param aTransFail If set to ETrue, sends the KErrHTTPOptimiserFailsTrans event to the client. williamr@2: @leave KErrNoMemory On insuffcient memory conditions. williamr@2: */ williamr@2: virtual void DecodeL (const TDesC8& aData, HBufC8*& aHttpData, TBool& aTransFail) = 0; williamr@2: }; williamr@2: williamr@2: williamr@2: #endif // __MHTTPDATAOPTIMISER_H__