![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
class CHTTPFormEncoder : public CBase, public MHTTPDataSupplier;
A data supplier class that is used to build up data that is to be encoded to application/x-www-form-urlencoded.
A client will create an instance of this class and add name/value pairs. They then use this as the data supplier for the body of an http request that is a forms submission.
The name and value must both be supplied in the correct character encoding that you want to send to the server. This then gets url encoded.
MHTTPDataSupplier
- A data supplier - This class is used to deliver the response data to the client,...
CBase
-
Base class for all classes to be instantiated on the heap.
CHTTPFormEncoder
- A data supplier class that is used to build up data that is to be encoded to app...
Defined in CHTTPFormEncoder
:
AddFieldL(const TDesC8 &,const TDesC8 &)
Adds a field to the data. A field consists a name and value pair GetNextDataPart(TPtrC8 &)
Obtain a data part from the supplier. The data is guaranteed to survive until a ...NewL()
OverallDataSize()
Obtain the overall size of the data being supplied, if known to the supplier. Wh...ReleaseData()
Release the current data part being held at the data supplier. This call indicat...Reset()
Reset the data supplier. This indicates to the data supplier that it should retu...~CHTTPFormEncoder()
Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...virtual TBool GetNextDataPart(TPtrC8 &aDataPart);
Obtain a data part from the supplier. The data is guaranteed to survive until a call is made to CHTTPFormEncoder::ReleaseData()
.
|
|
virtual void ReleaseData();
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();
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 will be the sum of all the part sizes. If the size is not known, KErrNotFound is returned; in this case the client must use the return code of GetNextDataPart to find out when the data is complete.
|
virtual TInt Reset();
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.
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
|
IMPORT_C void AddFieldL(const TDesC8 &aFieldName, const TDesC8 &aFieldValue);
Adds a field to the data. A field consists a name and value pair
|
|
|