ContentAccess::CMetaData Class Reference

#include <caf/metadata.h>

Link against: cafutils.lib

class ContentAccess::CMetaData : public CBase

Inherits from

  • ContentAccess::CMetaData

    Detailed Description

    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.

    Constructor & Destructor Documentation

    ~CMetaData ( )

    ~CMetaData()[virtual]

    destructor

    Member Function Documentation

    Data ( )

    IMPORT_C const TDesC &Data()const

    The data value

    Returns: The data value

    Data8 ( )

    IMPORT_C const TDesC8 &Data8()const

    The data value

    Returns: The data value

    ExternalizeL ( RWriteStream & )

    voidExternalizeL(RWriteStream &aStream)const

    Write the CMetaData to a data stream

    ParameterDescription
    aStreamThe stream to write the CMetaData object to

    Field ( )

    IMPORT_C const TDesC &Field()const

    The field name

    Returns: The field name

    Field8 ( )

    IMPORT_C const TDesC8 &Field8()const

    The field name

    Returns: The field name

    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

    ParameterDescription
    aFieldThe name of the field
    aDataThe data associated with the field

    Returns: A CMetaData object populated with the given field and data

    NewL ( const TDesC16 &, const TDesC16 & )

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

    Construct a new CMetaData with unicode data

    ParameterDescription
    aFieldThe name of the field
    aDataThe data associated with the field

    Returns: A CMetaData object populated with the given field and data

    NewL ( RReadStream & )

    CMetaData *NewL(RReadStream &aStream)[static]

    Construct a new CMetaData from a data stream

    ParameterDescription
    aStreamThe stream to read the CMetaData object from

    Returns: A CMetaData object read from the stream