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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @file mhttpoptimisercallback.h
20 @warning : This file contains Rose Model ID comments - please do not delete
23 #ifndef __MHTTPDATAOPTIMISER_H__
24 #define __MHTTPDATAOPTIMISER_H__
29 class MHttpDataOptimiser
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.
40 virtual void EncodeL (const TDesC8& aHttpData, HBufC8*& aEncodedData) = 0;
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.
51 virtual void DecodeL (const TDesC8& aData, HBufC8*& aHttpData, TBool& aTransFail) = 0;
55 #endif // __MHTTPDATAOPTIMISER_H__