Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: http\mhttpdatasupplier.h

Class MHTTPDataSupplier

class MHTTPDataSupplier

Support

Supported from 7.0

Description

Abstract interface that clients implement to receive response message data from the framework, and to supply request message body data to the framework.

Data is supplied in a number of parts. When a part is available, it can be retrieved with GetNextDataPart(). The returned descriptor remains valid until ReleaseData() is called.

Defined in MHTTPDataSupplier:
GetNextDataPart(), MHDS_Reserved1(), MHDS_Reserved2(), MHDS_Reserved3(), OverallDataSize(), ReleaseData(), Reset()

See also:


Member Functions


GetNextDataPart()

virtual TBool GetNextDataPart(TPtrC8& aDataPart)=0;

Description

Obtains a data part from the supplier.

The data is guaranteed to survive until a call is made to ReleaseData().

Parameters

TPtrC8& aDataPart

The data part

Return value

TBool

ETrue if this is the last part, EFalse otherwise


ReleaseData()

virtual void ReleaseData()=0;

Description

Releases the current data part being held at the data supplier.

This call indicates to the supplier that the part is no longer needed, and another one can be supplied, if appropriate.


OverallDataSize()

virtual TInt OverallDataSize()=0;

Description

Obtains the overall size of the data being supplied, if known to the supplier.

Where a body of data is supplied in several parts, this size is the sum of all the part sizes. If the size is not known, KErrNotFound is returned; in this case the caller must use the return code of GetNextDataPart() to find out when the data is complete.

Return value

TInt

A size in bytes, or KErrNotFound if the size is not known.


Reset()

virtual TInt Reset()=0;

Description

Resets the data supplier.

This indicates to the data supplier that it should return to the first part of the data. This could be used in a situation where the data consumer has encountered an error and needs the data to be supplied afresh. Even if the last part has been supplied (i.e. GetNextDataPart() has returned ETrue), the data supplier should reset to the first part.

Return value

TInt

If the supplier cannot reset, it should return an error code, otherwise it should return KErrNone, where the reset will be assumed to have succeeded

[Top]


Internal members


MHDS_Reserved1()

private: inline virtual void MHDS_Reserved1();

Description

This is internal and not intended for use.


MHDS_Reserved2()

private: inline virtual void MHDS_Reserved2();

Description

This is internal and not intended for use.


MHDS_Reserved3()

private: inline virtual void MHDS_Reserved3();

Description

This is internal and not intended for use.