CObexHeaderList Class Reference

#include <app/obexheaderlist.h>

Link against: obexmtmutil.lib

class CObexHeaderList : public CBase

Inherits from

Detailed Description

Encapsulates and owns a list of CObexHeader objects. Public users of this class can add CObexHeader objects

Constructor & Destructor Documentation

~CObexHeaderList ( )

IMPORT_C~CObexHeaderList()

Destructor which frees all allocated memory with the list.

Destructor which frees all allocated memory with the list

Member Function Documentation

AddHeader ( const CObexHeader * )

IMPORT_C TIntAddHeader(const CObexHeader *aHeader)

Add a CObexHeader object to the list. The CObexHeader object added should have its attribute, header ID and header value set before it is added to the list. CObexHeaderlist will not change these values of its contained CObexHeader objects Add a CObexHeader object to the list. The CObexHeader object added should have its attribute, header ID and header value set before it is added to the list. CObexHeaderlist will not change these values of its contained CObexHeader objects

Parameters
aHeaderis a pointer to a constant CObexHeader object
Return Value
KErrNone, if the operation is successful, otherwise one of the system wide error codesKErrNone, if the operation is successful, otherwise one of the system wide error codes

AddHeadersToBaseObjectL ( CObexBaseObject & )

IMPORT_C voidAddHeadersToBaseObjectL(CObexBaseObject &aObexBaseObj)[protected]

Add all the CObexHeader objects contained in a list to a CObexBaseObject.

Add all the CObexHeader objects contained in a list to a CObexBaseObject
Parameters
aObexBaseObjis a reference to a CObexBaseObject
Leave Codes
ErrorSystem wide error code
itmay leave with one of the system wide error code

Count ( )

IMPORT_C TIntCount()const [protected]

Return the number of CObexHeader object pointers contained in the list.

Return the number of CObexHeader object pointers contained in the list

Return Value
The number of CObexHeader object pointers in the listreturn the number of CObexHeader object pointers in the list

ExportToAttachmentL ( CMsvAttachment & )

IMPORT_C voidExportToAttachmentL(CMsvAttachment &aAttachment)const
Exports the Obex header list to the attachment. The header list is then stored with the attachment.
Parameters
aAttachmentThe attachment to store the header list for.
Leave Codes
System-wideerror codes.

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aWriteStream)const

Externalise the contents of the CObexHeaderList class to a stream in CMsvStore

Parameters
aWriteStreamis a reference to a RMsvWriteStream
Leave Codes
itmay leave with one of the system wide error code

ImportFromAttachmentL ( CMsvAttachment & )

IMPORT_C voidImportFromAttachmentL(CMsvAttachment &aAttachment)
Imports the Obex header list from the attachment. The header list is retrieved and stored in this object. Any existing header data is over-written with the headers from the attachment. If the headers have not been set, this obex list will still be over written and result in zero headers.
Parameters
aAttachmentThe attachment to retieve the header list from.
Leave Codes
System-wideerror codes.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aReadStream)

Internalise the contents of the CObexHeaderList class from a stream in CMsvStore

Parameters
aReadStreamis a reference to a RMsvReadStream
Leave Codes
itmay leave with one of the system wide error code

NewL ( )

IMPORT_C CObexHeaderList *NewL()[static]

Factory function to return a new CObexHeaderList. Factory function to return a CObexHeaderList*

Return Value
New CObexHeaderList object

NewLC ( )

IMPORT_C CObexHeaderList *NewLC()[static]

Factory function to return a new CObexHeaderList and leave it on the cleanup stack. Factory function to return a CObexHeaderList* and leave it on the CleanupStack

Return Value
New CObexHeaderList object

ObexHeaderL ( TInt )

IMPORT_C CObexHeader *&ObexHeaderL(TIntaPos)[protected]

Get a non constant reference to the CObexHeader object pointer at position aPos into the list.

Get a non constant reference to the CObexHeader object pointer at position aPos into the list.
Parameters
aPosis a list index specifying the CObexHeader object pointer to be returned
Return Value
A non constant reference to the CObexHeader object pointerreturn a non constant reference to the CObexHeader object pointer
Leave Codes
KErrArgumentaPos is out of range
KErrNotFoundThe list is empty
leaveif aPos is out of range(KErrArgument) or the list is empty (KErrNotFound)