|
|
|
Location:
chttpformencoder.h
Link against: http.lib
class CHTTPFormEncoder
Supported from 7.0
A data supplier class for supplying HTTP POST data for HTML form submissions.
The class is used to build up data that is to be URL encoded (MIME type application/x-www-form-urlencoded). A client creates an instance of this class and adds name/value pairs using AddFieldL(). It then uses the object as the data supplier for the body of an HTTP request that is a form submission.
The names and values must be supplied in the correct character encoding that you want to send to the server.
|
Defined in CHTTPFormEncoder:
AddFieldL(), AppendData(), AppendSpecialChar(), CHTTPFormEncoder(), ConstructL(), EAllowAppendData, EDataReleased, ESuppliedSize, ESupplyingData, GetNextDataPart(), IsAlphaNumeric(), NewL(), OverallDataSize(), ReleaseData(), Reset(), THTTPFormEncoderState, iData, iState, ~CHTTPFormEncoder()
Inherited from CBase:
operator new()
static CHTTPFormEncoder* NewL();
Creates and allocates a new CHTTPFormEncoder.
|
virtual TBool GetNextDataPart(TPtrC8& aDataPart);
Implements the MHTTPDataSupplier interface to supply data parts.
The data is guaranteed to survive until a call is made to ReleaseData().
|
|
virtual void ReleaseData();
Implements the MHTTPDataSupplier interface to release 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.
virtual TInt OverallDataSize();
Implements the MHTTPDataSupplier interface to obtain 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.
|
virtual TInt Reset();
Implements the MHTTPDataSupplier interface to reset 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.
|
void AddFieldL(const TDesC8& aFieldName, const TDesC8& aFieldValue);
Adds a field to the data.
A field consists of a name and value pair.
|
|
|
private: THTTPFormEncoderState
This is internal and not intended for use.
|
private: TBool IsAlphaNumeric(TUint8 aChar);
This is internal and not intended for use.
|
|
private: void AppendSpecialChar(TUint8 aChar);
This is internal and not intended for use.
|
private: void AppendData(const TDesC8& aData);
This is internal and not intended for use.
|