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 ( TUint16 aBufferSize,
TUint16 aDataLimit
) [private]

Parameters

TUint16 aBufferSize
TUint16 aDataLimit

~CObexPacket()

IMPORT_C ~CObexPacket ( )

Destructor

Member Functions Documentation

AddPacketProcessEvents(TObexPacketProcessEvents)

IMPORT_C void AddPacketProcessEvents ( TObexPacketProcessEvents aEvents )

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 aEvents The additional events to notify on.

BufferSize()

IMPORT_C TUint16 BufferSize ( ) const

return the buffer size

ConstructL()

void ConstructL ( ) [private]

DataLimit()

IMPORT_C TUint16 DataLimit ( ) const

return the data limit

Dump()

IMPORT_C void Dump ( ) 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 TBool ExtractData ( TObexData & aHeader )

Extract into the passed data object from iExtractPoint

Parameters

TObexData & aHeader Container for extracted data

Init(TObexOpcode)

IMPORT_C void Init ( TObexOpcode aOpcode )

Set up as a fresh packet with the given opcode.

Parameters

TObexOpcode aOpcode a opcode

InsertData(const TObexData &)

IMPORT_C TBool InsertData ( const TObexData & aHeader )

Insert the passed packet data object at iInsertPoint

Parameters

const TObexData & aHeader OBEX header to insert

IsFinal()

IMPORT_C TBool IsFinal ( ) const

True if the packet's final bit is set

NewL(TUint16, TUint16)

IMPORT_C CObexPacket * NewL ( TUint16 aBufferSize,
TUint16 aDataLimit
) [static]

Parameters

TUint16 aBufferSize
TUint16 aDataLimit

Opcode()

IMPORT_C TObexOpcode Opcode ( ) const

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

PacketProcessNotificationEvents()

IMPORT_C TObexPacketProcessEvents PacketProcessNotificationEvents ( ) 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 TUint16 PacketSize ( ) 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 TUint16 RemainingExtractSpace ( ) const

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

RemainingInsertSpace()

IMPORT_C TUint16 RemainingInsertSpace ( ) const

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

RemovePacketProcessEvents(TObexPacketProcessEvents)

IMPORT_C void RemovePacketProcessEvents ( TObexPacketProcessEvents aEvents )

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 aEvents The events to cease notification of.

SetFinal(TBool)

IMPORT_C void SetFinal ( TBool aFinal = ETrue )

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

Parameters

TBool aFinal = ETrue whether or not to set or clear the final bit

SetLegalDataLimit(TUint16)

IMPORT_C TUint16 SetLegalDataLimit ( TUint16 aSize )

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 aSize a Requested size for the data limit

SetOpcode(TObexOpcode)

IMPORT_C void SetOpcode ( TObexOpcode aOpcode )

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

Parameters

TObexOpcode aOpcode an Opcode

SetPacketSize(TUint16)

IMPORT_C void SetPacketSize ( TUint16 aSize )

Sets the crruent packet's size.

Parameters

TUint16 aSize a 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]