| class CWspHeaderEncoder : public CBase |
This class can be used to encode one header field at a time, with all its values and parameters.
It has no knowledge of encoding the BNF of a particular header field, but the functions provided can be used in combination, producing an 8-bit buffer containing the encoded header.
Intended usage would be to call a series of functions. The first one being StartHeader, The final one being EndHeader, which would return a buffer containing the complete encoded header field. eg: encoder->StartHeaderL(); encoder->AddLongIntL(); encoder->AddTextStringL(); HBufC8* output = encoder->EndHeaderL();
| Public Member Functions | |
|---|---|
| ~CWspHeaderEncoder() | |
| IMPORT_C void | AddDataL(const TDesC8 &) |
| IMPORT_C void | AddDateL(const TDateTime) |
| IMPORT_C void | AddIntegerL(const TUint) |
| IMPORT_C void | AddLongIntL(const TUint32) |
| IMPORT_C void | AddShortIntL(const TUint8) |
| IMPORT_C void | AddShortLengthL(const TUint8) |
| IMPORT_C void | AddTextStringL(const RString &) |
| IMPORT_C void | AddTextStringL(const TDesC8 &) |
| IMPORT_C void | AddTokenL(const TUint8) |
| IMPORT_C void | AddTokenTextL(const TDesC8 &) |
| IMPORT_C void | AddUintVarL(const TUint) |
| IMPORT_C HBufC8 * | EndHeaderL() |
| IMPORT_C void | EndValueLengthL() |
| IMPORT_C CWspHeaderEncoder * | NewL() |
| IMPORT_C CWspHeaderEncoder * | NewLC() |
| IMPORT_C void | StartHeaderL(TUint8) |
| IMPORT_C void | StartHeaderL(const TDesC8 &) |
| IMPORT_C void | StartHeaderL(const RStringF) |
| IMPORT_C void | StartValueLengthL() |
| Private Member Functions | |
|---|---|
| CWspHeaderEncoder() | |
| void | ConstructL() |
| void | Init() |
| Private Attributes | |
|---|---|
| RPointerArray< CDesC8Array > | iArray |
| TInt | iTotalLength |
| IMPORT_C void | AddDateL | ( | const TDateTime | aDate | ) |
| const TDateTime aDate |
| IMPORT_C void | AddLongIntL | ( | const TUint32 | aValue | ) |
| const TUint32 aValue |
| IMPORT_C void | AddShortIntL | ( | const TUint8 | aValue | ) |
| const TUint8 aValue |
| IMPORT_C void | AddShortLengthL | ( | const TUint8 | aValue | ) |
| const TUint8 aValue |
| IMPORT_C void | AddTextStringL | ( | const RString & | aText | ) |
| const RString & aText |
| IMPORT_C void | AddTextStringL | ( | const TDesC8 & | aText | ) |
| const TDesC8 & aText |
| IMPORT_C void | AddTokenTextL | ( | const TDesC8 & | aTokenText | ) |
| const TDesC8 & aTokenText |
| IMPORT_C void | StartHeaderL | ( | const TDesC8 & | aString | ) |
| const TDesC8 & aString |
| IMPORT_C void | StartHeaderL | ( | const RStringF | aString | ) |
| const RStringF aString |
| RPointerArray< CDesC8Array > | iArray | [private] |
Array for storing the partial encoded header. Each time StartValueLength is called a new array element is used. When EndValueLength is called, the array is decremented, data from the last element being added to the one before.
| TInt | iTotalLength | [private] |
Value incremented as the encoded header increases in size. Used to allocate the buffer for storing the final encoded header, output when EndHeader is called.