CObexPacket Class Reference

class CObexPacket : public CBase

Packets, which are the basic unit transfered between CObex and the transport

Inherits from

Constructor & Destructor Documentation

CObexPacket(TUint16, TUint16)

CObexPacket(TUint16aBufferSize,
TUint16aDataLimit
)[private]

Parameters

TUint16 aBufferSize
TUint16 aDataLimit

~CObexPacket()

IMPORT_C~CObexPacket()

Destructor

Member Functions Documentation

AddPacketProcessEvents(TObexPacketProcessEvents)

IMPORT_C voidAddPacketProcessEvents(TObexPacketProcessEventsaEvents)

Adds events that should be notified.

Add events into the packet process events mask. When this packet is processed this mask will be checked and notifications will be issued only if the appropriate bits are set.

Parameters

TObexPacketProcessEvents aEventsThe additional events to notify on.

BufferSize()

IMPORT_C TUint16BufferSize()const

return the buffer size

ConstructL()

voidConstructL()[private]

DataLimit()

IMPORT_C TUint16DataLimit()const

return the data limit

Dump()

IMPORT_C voidDump()const

Logs the size of the packet. If __LOG_PACKET_DUMP__ is defined (obex/common/logger.h) then also logs the packet's contents.

ExtractData(TObexData &)

IMPORT_C TBoolExtractData(TObexData &aHeader)

Extract into the passed data object from iExtractPoint

Parameters

TObexData & aHeaderContainer for extracted data

Init(TObexOpcode)

IMPORT_C voidInit(TObexOpcodeaOpcode)

Set up as a fresh packet with the given opcode.

Parameters

TObexOpcode aOpcodea opcode

InsertData(const TObexData &)

IMPORT_C TBoolInsertData(const TObexData &aHeader)

Insert the passed packet data object at iInsertPoint

Parameters

const TObexData & aHeaderOBEX header to insert

IsFinal()

IMPORT_C TBoolIsFinal()const

True if the packet's final bit is set

NewL(TUint16, TUint16)

IMPORT_C CObexPacket *NewL(TUint16aBufferSize,
TUint16aDataLimit
)[static]

Parameters

TUint16 aBufferSize
TUint16 aDataLimit

Opcode()

IMPORT_C TObexOpcodeOpcode()const

Returns the packet opcode, with the final bit cleared (regardless of its actual value)

PacketProcessNotificationEvents()

IMPORT_C TObexPacketProcessEventsPacketProcessNotificationEvents()const

Gets events that will be notified.

Retrieves the packet process events mask. When this packet is processed this mask will be checked and notifications will be issued only if the appropriate bits are set.

PacketSize()

IMPORT_C TUint16PacketSize()const

Returns the total size of the current packet.

Payload()

const TUint8 *Payload()const [private, inline]

Payload()

TUint8 *Payload()[private, inline]

PayloadSize()

TUint16 PayloadSize()const [private, inline]

RemainingExtractSpace()

IMPORT_C TUint16RemainingExtractSpace()const

Returns the number of bytes of unread data in the obex packet (on reads)

RemainingInsertSpace()

IMPORT_C TUint16RemainingInsertSpace()const

Returns the number of bytes of unused space in the obex packet (on writes)

RemovePacketProcessEvents(TObexPacketProcessEvents)

IMPORT_C voidRemovePacketProcessEvents(TObexPacketProcessEventsaEvents)

Removes events from packet notification.

Remove events from the packet process events mask. When this packet is processed this mask will be checked and notifications will be issued only if the appropriate bits are set.

Parameters

TObexPacketProcessEvents aEventsThe events to cease notification of.

SetFinal(TBool)

IMPORT_C voidSetFinal(TBoolaFinal = ETrue)

If aFinal == ETrue (default), the final bit is set, otherwise it is cleared.

Parameters

TBool aFinal = ETruewhether or not to set or clear the final bit

SetLegalDataLimit(TUint16)

IMPORT_C TUint16SetLegalDataLimit(TUint16aSize)

Sets the data limit of the buffer, ensuring it's larger than minimum possible but not larger than the buffer Parameter passed in is the requested new data limit Returns size that was set

Parameters

TUint16 aSizea Requested size for the data limit

SetOpcode(TObexOpcode)

IMPORT_C voidSetOpcode(TObexOpcodeaOpcode)

Set the packet opcode to the passed value -- final bit will get through too.

Parameters

TObexOpcode aOpcodean Opcode

SetPacketSize(TUint16)

IMPORT_C voidSetPacketSize(TUint16aSize)

Sets the crruent packet's size.

Parameters

TUint16 aSizea packet size

Member Data Documentation

TUint8 * iBuffer

TUint8 *iBuffer[private]

TUint16 iBufferSize

TUint16 iBufferSize[private]

TUint16 iDataLimit

TUint16 iDataLimit[private]

TUint8 * iExtractPoint

TUint8 *iExtractPoint[private]

TUint8 * iInsertPoint

TUint8 *iInsertPoint[private]

TObexPacketProcessEvents iNotificationEvents

TObexPacketProcessEvents iNotificationEvents[private]