ContentAccess::CMetaData Class Reference

class ContentAccess::CMetaData : public CBase

Stores a field and data pair for use in a supplier import operation

The field and data can be any values the application doing the import thinks the agent will find useful. Some information that could be included here are headers, eg:

"Content Type", "application/vnd.oma.drm.dm"

The application can include anything it likes, if the agent doesn't understand the header it can just ignore it, eg:

"Colour", "Yellow"

CMetaData can be used with 8-bit or unicode data and automatically performs conversions between the two.

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

Inherits from

Constructor & Destructor Documentation

CMetaData(TBool)

CMetaData ( TBool aUnicode ) [private]

Parameters

TBool aUnicode

~CMetaData()

~CMetaData ( ) [virtual]

destructor

Member Functions Documentation

ConstructL(const TDesC8 &, const TDesC8 &)

void ConstructL ( const TDesC8 & aField,
const TDesC8 & aData
) [private]

Parameters

const TDesC8 & aField
const TDesC8 & aData

ConstructL(const TDesC16 &, const TDesC16 &)

void ConstructL ( const TDesC16 & aField,
const TDesC16 & aData
) [private]

Parameters

const TDesC16 & aField
const TDesC16 & aData

Data()

IMPORT_C const TDesC & Data ( ) const

The data value

Data8()

IMPORT_C const TDesC8 & Data8 ( ) const

The data value

ExternalizeL(RWriteStream &)

void ExternalizeL ( RWriteStream & aStream ) const

Write the CMetaData to a data stream

Parameters

RWriteStream & aStream The stream to write the CMetaData object to

Field()

IMPORT_C const TDesC & Field ( ) const

The field name

Field8()

IMPORT_C const TDesC8 & Field8 ( ) const

The field name

InternalizeL(RReadStream &)

void InternalizeL ( RReadStream & aStream ) [private]

Read the CMetaData from a data stream

Parameters

RReadStream & aStream

NewL(const TDesC8 &, const TDesC8 &)

CMetaData * NewL ( const TDesC8 & aField,
const TDesC8 & aData
) [static]

Construct a new CMetaData with 8 bit data The 8-bit data will be stored in CMetaData as unicode

Parameters

const TDesC8 & aField The name of the field
const TDesC8 & aData The data associated with the field

NewL(const TDesC16 &, const TDesC16 &)

CMetaData * NewL ( const TDesC16 & aField,
const TDesC16 & aData
) [static]

Construct a new CMetaData with unicode data

Parameters

const TDesC16 & aField The name of the field
const TDesC16 & aData The data associated with the field

NewL(RReadStream &)

CMetaData * NewL ( RReadStream & aStream ) [static]

Construct a new CMetaData from a data stream

Parameters

RReadStream & aStream The stream to read the CMetaData object from

Member Data Documentation

HBufC * iData

HBufC * iData [private]

HBufC8 * iData8

HBufC8 * iData8 [private]

HBufC * iField

HBufC * iField [private]

HBufC8 * iField8

HBufC8 * iField8 [private]

TBool iUnicode

TBool iUnicode [private]