ContentAccess::CMetaDataArray Class Reference

#include <caf/metadataarray.h>

Link against: cafutils.lib

class ContentAccess::CMetaDataArray : public CBase

Inherits from

  • ContentAccess::CMetaDataArray

Detailed Description

Stores an array of CMetaData objects for use in a supplier import operation

It provides search and routines (for both 8 bit and Unicode) to find the value corresponding to a particular field in the array.

Applications should use the unicode search function whenever possible because it removes the risk of losing information during the unicode to 8 bit conversion.

Constructor & Destructor Documentation

~CMetaDataArray ( )

~CMetaDataArray()[virtual]

Destructor

Member Function Documentation

AddL ( const TDesC8 &, const TDesC8 & )

IMPORT_C voidAddL(const TDesC8 &aField,
const TDesC8 &aData
)

Adds a new meta data,

Parameters
aFieldThe name used to index the value of interest
aDataThe data

AddL ( const TDesC &, const TDesC & )

IMPORT_C voidAddL(const TDesC &aField,
const TDesC &aData
)

Adds a new meta data,

Parameters
aFieldThe name used to index the value of interest
aDataThe data

Count ( )

IMPORT_C TIntCount()const

The number of metadata objects in the list

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalizes the CMetaDataArray object to a stream.

Parameters
aStreamThe stream to write the header information to.

NewL ( )

IMPORT_C CMetaDataArray *NewL()[static]

NewL ( RReadStream & )

IMPORT_C CMetaDataArray *NewL(RReadStream &aStream)[static]

Construct a CMetaDataArray from a stream

Parameters
aStreamthe stream containing the metadata array
Return Value
a new CMetaDataArray

NewLC ( )

IMPORT_C CMetaDataArray *NewLC()[static]

SearchL ( const TDesC &, TBool )

IMPORT_C const TDesC &SearchL(const TDesC &aField,
TBoolaMatchCase = EFalse
)const

Find the unicode data for a given unicode field.

Parameters
aFieldThe field to retrieve
aMatchCaseETrue To perform case sensitive search, EFalse - To perform non case sensitive search
Return Value
The corresponding data or else a zero length string if the field was not found

SearchL ( const TDesC8 &, TBool )

IMPORT_C const TDesC8 &SearchL(const TDesC8 &aField8,
TBoolaMatchCase = EFalse
)const

Find the 8 bit data for a given 8 bit field.

Parameters
aField8The field to retrieve
aMatchCaseETrue To perform case sensitive search, EFalse - To perform non case sensitive search
Return Value
The corresponding data or else a zero length string if the field was not found

operator[] ( TInt )

IMPORT_C const CMetaData &operator[](TIntaIndex)const

Retrieves the MetaData at the given index

Parameters
aIndexThe index of the meta-data