CObexBaseObject Class Reference

class CObexBaseObject : public CBase

Objects of this class are used to describe the objects to be transferred and those received via Obex. Consists of a number of attributes describing the object, along with methods to set them. CObexBaseObject is an abstract base class, which defines attribute setting and transferring functionality, but does not specify the storage mechanism for the data part (called the object body) of the object. This body part is defined in derived classes.

Object description attributes are tracked for validity automatically, so that only valid attributes are sent to the remote machine. Also has the concept of "header masks". This selects which of the various attributes will actually be sent out/read in when the object is used in an operation with the remote machine. Objects default to transferring all valid attributes, use the header mask if restriction is required on the headers exchanged.

See the various derived classes for description of object body representation.

The common attributes are defined to be as close to the underlying OBEX headers as usefully possible, hence any OBEX header specified as a Unicode string (e.g. Name) translate to TDes (variant) EPOC descriptors, "byte sequences" (e.g. Type) are TDes8 (or ASCII invariant), and byte and 32 bit integers (e.g. Length) are TUint32s.

This class is not designed for user derivation (ie. outside of this dll).

CObexHeader

Inherits from

Public Member Functions
~CObexBaseObject()
IMPORT_C voidAddHeaderL(CObexHeader &)
IMPORT_C voidAddHttpL(const TDesC8 &)
IMPORT_C const TDesC8 &AppParam()
IMPORT_C TIntBytesReceived()
IMPORT_C TIntBytesSent()
TUint32 ConnectionID()
IMPORT_C const TDesC &Description()
TObexResponse GetLastError()
IMPORT_C TObexHeaderMaskHeaderMask()
IMPORT_C const CObexHeaderSet &HeaderSet()
IMPORT_C CObexHeaderSet &HeaderSet()
IMPORT_C const RPointerArray< HBufC8 > *Http()
TInt InitReceive()
TInt InitSend(TObexOpcode)
IMPORT_C TUint32Length()
IMPORT_C const TDesC &Name()
TProgress ParseNextReceivePacket(CObexPacket &)
voidPrepareConnectionHeader(CObexPacket &)
TProgress PrepareNextSendPacket(CObexPacket &)
IMPORT_C voidReset()
IMPORT_C voidSetAppParamL(const TDesC8 &)
voidSetConnectionIdL(TUint32)
IMPORT_C voidSetDescriptionL(const TDesC &)
IMPORT_C voidSetHeaderMask(const TObexHeaderMask)
IMPORT_C voidSetLengthL(const TUint32)
IMPORT_C voidSetNameL(const TDesC &)
IMPORT_C voidSetTargetL(const TDesC8 &)
IMPORT_C voidSetTimeL(const TTime)
IMPORT_C voidSetTypeL(const TDesC8 &)
IMPORT_C const TDesC8 &Target()
IMPORT_C const TTimeTime()
IMPORT_C const TDesC8 &Type()
IMPORT_C TObexHeaderMaskValidHeaders()
Protected Member Functions
CObexBaseObject()
voidCreateHeaderStorageDataL()
TInt DataSize()
voidGetData(TInt, TDes8 &)
voidGuessTypeFromExtL(const TDesC &)
voidNewData(TInt, TDes8 &)
voidResetData()
voidResetHeaders()
voidSetTimeHeaderL(const TDesC8 &)
voidSetUtcTimeL(const TTime)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTProgress { EContinue, EComplete, EError, ELastPacket }
Private Attributes
TObexHeaderMask iHeaderMask
CObexHeaderSet *iHeaderSet
RPointerArray< HBufC8 > *iHttp
TObexResponse iLastError
CObexHeader *iObexHeader
TInt iRecvBytes
TProgress iRecvProgress
TInt iSendBytes
TObexHeaderMask iSendHeaders
TObexOpcode iSendOpcode
TProgress iSendProgress
TObexHeaderMask iValidHeaders

Constructor & Destructor Documentation

CObexBaseObject()

CObexBaseObject()[protected]

~CObexBaseObject()

~CObexBaseObject()[virtual]

Member Functions Documentation

AddHeaderL(CObexHeader &)

IMPORT_C voidAddHeaderL(CObexHeader &aHeader)

Parameters

CObexHeader & aHeader

AddHttpL(const TDesC8 &)

IMPORT_C voidAddHttpL(const TDesC8 &aDesc)

Parameters

const TDesC8 & aDesc

AppParam()

IMPORT_C const TDesC8 &AppParam()const

BytesReceived()

IMPORT_C TIntBytesReceived()

BytesSent()

IMPORT_C TIntBytesSent()

ConnectionID()

TUint32 ConnectionID()

CreateHeaderStorageDataL()

voidCreateHeaderStorageDataL()[protected]

DataSize()

TInt DataSize()[protected, pure virtual]

Description()

IMPORT_C const TDesC &Description()

GetData(TInt, TDes8 &)

voidGetData(TIntaPos,
TDes8 &aDes
)[protected, pure virtual]

Parameters

TInt aPos
TDes8 & aDes

GetLastError()

TObexResponse GetLastError()const

GuessTypeFromExtL(const TDesC &)

voidGuessTypeFromExtL(const TDesC &aExt)[protected]

Parameters

const TDesC & aExt

HeaderMask()

IMPORT_C TObexHeaderMaskHeaderMask()

HeaderSet()

IMPORT_C const CObexHeaderSet &HeaderSet()const

HeaderSet()

IMPORT_C CObexHeaderSet &HeaderSet()

Http()

IMPORT_C const RPointerArray< HBufC8 > *Http()const

InitReceive()

TInt InitReceive()

InitSend(TObexOpcode)

TInt InitSend(TObexOpcodeaOpcode)

Parameters

TObexOpcode aOpcode

Length()

IMPORT_C TUint32Length()

Name()

IMPORT_C const TDesC &Name()

NewData(TInt, TDes8 &)

voidNewData(TIntaPos,
TDes8 &aDes
)[protected, pure virtual]

Parameters

TInt aPos
TDes8 & aDes

ParseNextReceivePacket(CObexPacket &)

TProgress ParseNextReceivePacket(CObexPacket &aPacket)

Parameters

CObexPacket & aPacket

PrepareConnectionHeader(CObexPacket &)

voidPrepareConnectionHeader(CObexPacket &aPacket)

Parameters

CObexPacket & aPacket

PrepareNextSendPacket(CObexPacket &)

TProgress PrepareNextSendPacket(CObexPacket &aPacket)

Parameters

CObexPacket & aPacket

Reset()

IMPORT_C voidReset()

ResetData()

voidResetData()[protected, pure virtual]

ResetHeaders()

voidResetHeaders()[protected]

SetAppParamL(const TDesC8 &)

IMPORT_C voidSetAppParamL(const TDesC8 &aDesc)

Parameters

const TDesC8 & aDesc

SetConnectionIdL(TUint32)

voidSetConnectionIdL(TUint32aFourByte)

Parameters

TUint32 aFourByte

SetDescriptionL(const TDesC &)

IMPORT_C voidSetDescriptionL(const TDesC &aDesc)

Parameters

const TDesC & aDesc

SetHeaderMask(const TObexHeaderMask)

IMPORT_C voidSetHeaderMask(const TObexHeaderMaskaHeaderMask)

Parameters

const TObexHeaderMask aHeaderMask

SetLengthL(const TUint32)

IMPORT_C voidSetLengthL(const TUint32aLength)

Parameters

const TUint32 aLength

SetNameL(const TDesC &)

IMPORT_C voidSetNameL(const TDesC &aDesc)

Parameters

const TDesC & aDesc

SetTargetL(const TDesC8 &)

IMPORT_C voidSetTargetL(const TDesC8 &aDesc)

Parameters

const TDesC8 & aDesc

SetTimeHeaderL(const TDesC8 &)

voidSetTimeHeaderL(const TDesC8 &aTimeDes)[protected]

Parameters

const TDesC8 & aTimeDes

SetTimeL(const TTime)

IMPORT_C voidSetTimeL(const TTimeaLocalTime)

Parameters

const TTime aLocalTime

SetTypeL(const TDesC8 &)

IMPORT_C voidSetTypeL(const TDesC8 &aDesc)

Parameters

const TDesC8 & aDesc

SetUtcTimeL(const TTime)

voidSetUtcTimeL(const TTimeaUtcTime)[protected]

Parameters

const TTime aUtcTime

Target()

IMPORT_C const TDesC8 &Target()

Time()

IMPORT_C const TTimeTime()

Type()

IMPORT_C const TDesC8 &Type()

ValidHeaders()

IMPORT_C TObexHeaderMaskValidHeaders()

Member Enumerations Documentation

Enum TProgress

Enumerators

EContinue
EComplete
EError
ELastPacket

Member Data Documentation

TObexHeaderMask iHeaderMask

TObexHeaderMask iHeaderMask[private]

CObexHeaderSet * iHeaderSet

CObexHeaderSet *iHeaderSet[private]

RPointerArray< HBufC8 > * iHttp

RPointerArray< HBufC8 > *iHttp[private]

TObexResponse iLastError

TObexResponse iLastError[private]

CObexHeader * iObexHeader

CObexHeader *iObexHeader[private]

TInt iRecvBytes

TInt iRecvBytes[private]

TProgress iRecvProgress

TProgress iRecvProgress[private]

TInt iSendBytes

TInt iSendBytes[private]

TObexHeaderMask iSendHeaders

TObexHeaderMask iSendHeaders[private]

TObexOpcode iSendOpcode

TObexOpcode iSendOpcode[private]

TProgress iSendProgress

TProgress iSendProgress[private]

TObexHeaderMask iValidHeaders

TObexHeaderMask iValidHeaders[private]