#include <mw/obexheaders.h>
class CObexHeader : public CBase |
Public Member Enumerations | |
---|---|
enum | THeaderAttr { ESuppressed, ESent, EDeleted } |
enum | THeaderType { EUnicode, EByteSeq, EByte, EFourByte } |
Public Member Functions | |
---|---|
virtual | ~CObexHeader() |
IMPORT_C TUint8 | AsByte() |
IMPORT_C const TDesC8 & | AsByteSeq() |
IMPORT_C TUint32 | AsFourByte() |
IMPORT_C const TDesC16 & | AsUnicode() |
IMPORT_C TUint16 | Attributes() |
IMPORT_C CObexHeader * | CopyL() |
IMPORT_C TInt | EncodedSize() |
IMPORT_C TUint8 | HI() |
IMPORT_C CObexHeader * | NewL() |
IMPORT_C void | Reset() |
IMPORT_C void | ResetContents() |
IMPORT_C void | Set(CObexHeader *) |
IMPORT_C void | SetAttributes(TUint16) |
IMPORT_C void | SetByte(const TUint8, const TUint8) |
IMPORT_C void | SetByteSeqL(const TUint8, const TDesC8 &) |
IMPORT_C void | SetFourByte(const TUint8, const TUint32) |
IMPORT_C void | SetUnicodeL(const TUint8, const TDesC16 &) |
IMPORT_C THeaderType | Type() |
Encapsulates an Obex header.
This class provides the ability to hold a header of any of the Obex supported types as a native Symbian OS type.
A header may also have one or more attributes set. These are used by the object which owns the header collection so that it can keep track of which headers should be sent (!(ESuppressed || EDeleted)), which have been sent (ESent), and whether the header should be deleted (EDeleted). Deletion is a special case---any operation on the Object which causes a scan of the headers will trigger deletion of any marked headers. This is required as they are owned by the Object, but can be accessed seperately (including through the creator keeping a pointer to the header).
See also: CObexBaseObject
IMPORT_C TUint8 | AsByte | ( | ) | const |
Returns: The value of this header.
IMPORT_C const TDesC8 & | AsByteSeq | ( | ) | const |
Returns: The value of this header.
IMPORT_C TUint32 | AsFourByte | ( | ) | const |
Returns: The value of this header.
IMPORT_C const TDesC16 & | AsUnicode | ( | ) | const |
Returns: The value of this header.
IMPORT_C CObexHeader * | CopyL | ( | ) | const |
Return a pointer to a copy of this object. This must be used instead of merely copying the pointer to the initial CObexHeader object as reference counting is used to keep track of instances of the header. The underlying data is not cloned, so any change to the data pointed to by this pointer could change the underlying data.
IMPORT_C TInt | EncodedSize | ( | ) | const |
Returns: The encoded size of this header in bytes, including the HI byte and the HV body.
IMPORT_C void | Reset | ( | ) |
Resets the contents of this header, discarding the underlying data. This is only called by the last instance of the header.
IMPORT_C void | Set | ( | CObexHeader * | aHeader | ) |
Sets this object to use the same underlying header as the parameter. This performs essentially the same function as the CopyL() function, but does not allocate a new object. The underlying data is not cloned, so any change to the data pointed to by this pointer could change the underlying data.
IMPORT_C void | SetAttributes | ( | TUint16 | aAttr | ) |
Sets the attibutes of this header.