CObexMtmHeader Class Reference

class CObexMtmHeader : public CBase

Base class for OBEX object headers. Allows them to be stored and restored to and from the CMsvStore.

Inherits from

Public Member Functions
~CObexMtmHeader()
IMPORT_C TPtrC8Addr()
IMPORT_C TPtrC8ConnectionID()
IMPORT_C voidExternalizeL(RMsvWriteStream &)
IMPORT_C voidInternalizeL(RMsvReadStream &)
IMPORT_C TIntLength()
IMPORT_C TPtrCName()
IMPORT_C voidRestoreL(const CMsvStore &)
IMPORT_C voidSetAddrL(const TDesC8 &)
IMPORT_C voidSetConnectionIDL(const TDesC8 &)
IMPORT_C voidSetLength(TInt)
IMPORT_C voidSetNameL(const TDesC &)
IMPORT_C voidSetSubjectL(const TDesC &)
IMPORT_C voidSetTargetL(const TDesC8 &)
IMPORT_C voidSetTime(const TTime &)
IMPORT_C voidSetTypeL(const TDesC8 &)
IMPORT_C voidStoreL(CMsvStore &)
IMPORT_C TPtrCSubject()
IMPORT_C TPtrC8Target()
IMPORT_C const TTime &Time()
IMPORT_C TPtrC8Type()
Protected Member Functions
CObexMtmHeader(TUid, TInt32)
IMPORT_C voidBaseConstructL()
IMPORT_C voidBaseExternalizeL(RMsvWriteStream &)
IMPORT_C voidBaseInternalizeL(RMsvReadStream &)
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()
Protected Attributes
HBufC8 *iConnectionID
TInt iLength
HBufC *iName
const TUidiStreamUid
const TInt32iStreamVersion
HBufC *iSubject
HBufC8 *iTarget
TTime iTime
HBufC8 *iType

Constructor & Destructor Documentation

CObexMtmHeader(TUid, TInt32)

IMPORT_CCObexMtmHeader(TUidaStreamUid,
TInt32aStreamVersion
)[protected]

Default constructor, which assigns the TUid for the stream and stream version

Parameters

TUid aStreamUidUid of the header stream--specified in the derived class
TInt32 aStreamVersionVersion number for the stream, must be specified in the derived classes and incremented each time a new version of the stream is implemented.

~CObexMtmHeader()

IMPORT_C~CObexMtmHeader()

Destructor which deletes all of the HBufC members

Member Functions Documentation

Addr()

IMPORT_C TPtrC8Addr()const [pure virtual]

BaseConstructL()

IMPORT_C voidBaseConstructL()[protected]

Leaving constructor, which must be called by the base classes to initialise the HBufC members

BaseExternalizeL(RMsvWriteStream &)

IMPORT_C voidBaseExternalizeL(RMsvWriteStream &aWriteStream)const [protected]
Externalizes CObexMtmHeader object to a stream. Must be called by the derived class BEFORE that class externalizes
leave
KErrXXX Standard EPOC stream leave codes

Parameters

RMsvWriteStream & aWriteStreamThe stream to be written to

BaseInternalizeL(RMsvReadStream &)

IMPORT_C voidBaseInternalizeL(RMsvReadStream &aReadStream)[protected]

Internalizes the CObexMtmHeader object from a stream.Must be called by the derived class BEFORE that class internalizes

leave
KErrXXX Standard EPOC stream leave codes

Parameters

RMsvReadStream & aReadStreamThe stream to be read from

ConnectionID()

IMPORT_C TPtrC8ConnectionID()const

Returns the ConnectionID header value.

ExternalizeL(RMsvWriteStream &)

IMPORT_C voidExternalizeL(RMsvWriteStream &aWriteStream)const [pure virtual]

Parameters

RMsvWriteStream & aWriteStream

InternalizeL(RMsvReadStream &)

IMPORT_C voidInternalizeL(RMsvReadStream &aReadStream)[pure virtual]

Parameters

RMsvReadStream & aReadStream

Length()

IMPORT_C TIntLength()const

Returns the Length header value

Name()

IMPORT_C TPtrCName()const

Returns the Name header value.

RestoreL(const CMsvStore &)

IMPORT_C voidRestoreL(const CMsvStore &aStore)
Opens a stream in aStore and internalises this object from it.
leave
KErrXXX Standard EPOC stream leave codes.
leave
KErrAccessDenied aStore is not opened with read access.

Parameters

const CMsvStore & aStoreThe store from which this object is to be restored. Note this must be open with read or read/write access or this function will leave.

SetAddrL(const TDesC8 &)

IMPORT_C voidSetAddrL(const TDesC8 &aSubject)[pure virtual]

Parameters

const TDesC8 & aSubject

SetConnectionIDL(const TDesC8 &)

IMPORT_C voidSetConnectionIDL(const TDesC8 &aSubject)

Sets the ConnectionID header value.

leave
KErrXXX Standard EPOC error codes if allocation of a buffer to hold the ConnectionID header fails.

Parameters

const TDesC8 & aSubject

SetLength(TInt)

IMPORT_C voidSetLength(TIntaLength)

Sets the Length header value

Parameters

TInt aLengthThe new Length header value

SetNameL(const TDesC &)

IMPORT_C voidSetNameL(const TDesC &aSubject)
Sets the Name header value.
leave
KErrXXX Standard EPOC error codes if allocation of a buffer to hold the Name header fails.

Parameters

const TDesC & aSubjectThe new Name header value

SetSubjectL(const TDesC &)

IMPORT_C voidSetSubjectL(const TDesC &aSubject)

Sets the Subject header value.

leave
KErrXXX Standard EPOC error codes if allocation of a buffer to hold the Subject header fails.

Parameters

const TDesC & aSubject

SetTargetL(const TDesC8 &)

IMPORT_C voidSetTargetL(const TDesC8 &aSubject)

Sets the ConnectionID header value.

leave
KErrXXX Standard EPOC error codes if allocation of a buffer to hold the Target header fails.

Parameters

const TDesC8 & aSubject

SetTime(const TTime &)

IMPORT_C voidSetTime(const TTime &aTime)

Sets the Time header value

Parameters

const TTime & aTimeThe new Time header value

SetTypeL(const TDesC8 &)

IMPORT_C voidSetTypeL(const TDesC8 &aSubject)

Sets the Type header value.

leave
KErrXXX Standard EPOC error codes if allocation of a buffer to hold the Type header fails.

Parameters

const TDesC8 & aSubjectThe new Type header value

StoreL(CMsvStore &)

IMPORT_C voidStoreL(CMsvStore &aStore)const

Creates a stream in aStore and externalises this object to it.

leave
KErrXXX Standard EPOC stream leave codes.
leave
KErrAccessDenied aStore is not opened with write access.

Parameters

CMsvStore & aStoreThe store to which this object is to be stored. Note this must be open with write access or this function will leave.

Subject()

IMPORT_C TPtrCSubject()const

Returns the Subject header value.

Target()

IMPORT_C TPtrC8Target()const

Returns the Target header value.

Time()

IMPORT_C const TTime &Time()const

Returns the Time header value

Type()

IMPORT_C TPtrC8Type()const

Returns the Type header value.

Member Data Documentation

HBufC8 * iConnectionID

HBufC8 *iConnectionID[protected]

TInt iLength

TInt iLength[protected]

HBufC * iName

HBufC *iName[protected]

const TUid iStreamUid

const TUidiStreamUid[protected]

const TInt32 iStreamVersion

const TInt32iStreamVersion[protected]

HBufC * iSubject

HBufC *iSubject[protected]

HBufC8 * iTarget

HBufC8 *iTarget[protected]

TTime iTime

TTime iTime[protected]

HBufC8 * iType

HBufC8 *iType[protected]