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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #ifndef __MHTTPCONTENTSOURCE_H__
18 #define __MHTTPCONTENTSOURCE_H__
22 class MHttpDataSender;
25 * THttpContentSourceOp is an operator to notify the HTTP Service
26 * when content is available.
31 class THttpContentSourceOp
33 friend class CHttpDataSender;
35 IMPORT_C THttpContentSourceOp();
36 IMPORT_C void Notify(const TDesC8& aData, TBool aLast = EFalse);
38 THttpContentSourceOp(MHttpDataSender* aSender);
39 MHttpDataSender* iDataSender;
43 * The implementation of MHttpContentSink can supply the request body data.
48 class MHttpContentSource
52 * Obtain a part of request body data from the source. The data should be guranteed to survive till
53 * another call to OnData or a call to CHttpClientTransaction::OnCompletion/OnError
55 * @param aData Data source operator
58 virtual void OnData(THttpContentSourceOp& aData) =0;
61 // Reserved for future use.
62 inline virtual void Reserved();
63 inline virtual void Reserved2();
66 inline void MHttpContentSource::Reserved()
71 inline void MHttpContentSource::Reserved2()
76 #endif // __MHTTPCONTENTSOURCE_H__