epoc32/include/mw/mhttpcontentsource.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/mhttpcontentsource.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,76 @@
     1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +
    1.20 +#ifndef __MHTTPCONTENTSOURCE_H__
    1.21 +#define __MHTTPCONTENTSOURCE_H__
    1.22 +
    1.23 +#include <e32base.h>
    1.24 +
    1.25 +class MHttpDataSender;
    1.26 +
    1.27 +/**
    1.28 + * THttpContentSourceOp is an operator to notify the HTTP Service
    1.29 + * when content is available. 
    1.30 + *  
    1.31 + * @publishedAll
    1.32 + * @prototype
    1.33 + */
    1.34 +class THttpContentSourceOp
    1.35 +    {
    1.36 +    friend class CHttpDataSender;
    1.37 +public:
    1.38 +    IMPORT_C THttpContentSourceOp();
    1.39 +    IMPORT_C void Notify(const TDesC8& aData, TBool aLast = EFalse);
    1.40 +    private:
    1.41 +        THttpContentSourceOp(MHttpDataSender* aSender);
    1.42 +    MHttpDataSender* iDataSender;
    1.43 +    };
    1.44 +
    1.45 +/**
    1.46 + * The implementation of MHttpContentSink can supply the request body data.
    1.47 + *  
    1.48 + * @publishedAll
    1.49 + * @prototype
    1.50 + */
    1.51 +class MHttpContentSource
    1.52 +	{
    1.53 +	public:	
    1.54 +	/**
    1.55 +	 * Obtain a part of request body data from the source. The data should be guranteed to survive till 
    1.56 +	 * another call to OnData or a call to CHttpClientTransaction::OnCompletion/OnError
    1.57 +	 * 
    1.58 +	 * @param aData Data source operator
    1.59 +	 */
    1.60 +	    	    
    1.61 +	virtual void OnData(THttpContentSourceOp& aData) =0;
    1.62 +	
    1.63 +	private:
    1.64 +    // Reserved for future use.
    1.65 +    inline virtual void Reserved();
    1.66 +    inline virtual void Reserved2();	    
    1.67 +	};
    1.68 +
    1.69 +inline void MHttpContentSource::Reserved()
    1.70 +    {
    1.71 +    
    1.72 +    }
    1.73 +
    1.74 +inline void MHttpContentSource::Reserved2()
    1.75 +    {
    1.76 +    
    1.77 +    }
    1.78 +
    1.79 +#endif // __MHTTPCONTENTSOURCE_H__