CParserProperty Class Reference

class CParserProperty : public CBase

A vCard or vCalendar property.

A property consists of a name, an optional value and one or more optional parameters.

The name, value and parameters are initialised on construction.

Versit properties have the general form:

Property Name (; Property Parameter Name(=Property Parameter Value)* : Property Value)

where items in brackets are optional and * indicates that the item may be repeated.

For instance, TEL; HOME; ENCODING=QUOTED-PRINTABLE; CHARSET=US-ASCII : 01234 567890

Here, TEL is the property name; HOME, ENCODING and CHARSET are property parameter names; QUOTED-PRINTABLE and US-ASCII are property parameter values. The component following the colon is the property value.

Properties also have a name UID, which set during internalisation of a property and used only during internalisation. It is set by SetNameUid() and is used to allow number comparisons during internalisation. This provides a faster alternative to string comparisons when checking a property to see if it is a significant one (e.g. a begin or binary property). This is the only use of the name UID: it is not used during externalisation of a property.

Note that grouped properties are supported by the derived class, CParserGroupedProperty. The vCalender parser does not have property groups, and so stores all properties using this base class, whereas the vCard parser stores all properties using CParserGroupedProperty.

Inherits from

Public Member Functions
CParserProperty(CArrayPtr< CParserParam > *)
~CParserProperty()
IMPORT_C voidAddParamL(CParserParam *)
IMPORT_C voidDeleteParam(TDesC8 &)
IMPORT_C voidExternalizeL(RWriteStream &, CVersitParser *)
IMPORT_C TBoolLoadBinaryValuesFromFilesL(RFs &)
IMPORT_C TPtrC8Name()
TUid NameUid()
IMPORT_C CParserProperty *NewL(CParserPropertyValue &, const TDesC8 &, CArrayPtr< CParserParam > *)
IMPORT_C CParserParam *Param(const TDesC8 &)
IMPORT_C CArrayPtr< CParserParam > *ParamArray()
IMPORT_C TBoolSaveBinaryValuesToFilesL(TInt, const TDesC &, RFs &)
IMPORT_C voidSetNameL(const TDesC8 &)
voidSetNameUid(TUid)
voidSetParamArray(CArrayPtr< CParserParam > *)
voidSetValue(CParserPropertyValue *)
IMPORT_C TBoolSupportsInterface(const TUid &)
TUid Uid()
CParserPropertyValue *Value()
Protected Member Functions
CParserProperty(CParserPropertyValue &, CArrayPtr< CParserParam > *)
IMPORT_C voidConstructSelfL(CParserProperty &, const TDesC8 &)
Private Member Functions
voidGenerateNameAndCreateFileL(RFs &, TPtr8, RFile &, TDes &)
HBufC8 *&NameBuf()
voidReadBinaryDataL(const CBufSeg *, HBufC8 **)
IMPORT_C voidReserved()
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
CArrayPtr< CParserParam > *iArrayOfParams
HBufC8 *iPropertyName
TUid iPropertyNameUid
CParserPropertyValue *iPropertyValue

Constructor & Destructor Documentation

CParserProperty(CArrayPtr< CParserParam > *)

IMPORT_CCParserProperty(CArrayPtr< CParserParam > *aArrayOfParams)

Parameters

CArrayPtr< CParserParam > * aArrayOfParams

CParserProperty(CParserPropertyValue &, CArrayPtr< CParserParam > *)

IMPORT_CCParserProperty(CParserPropertyValue &aPropertyValue,
CArrayPtr< CParserParam > *aArrayOfParams
)[protected]

Parameters

CParserPropertyValue & aPropertyValue
CArrayPtr< CParserParam > * aArrayOfParams

~CParserProperty()

IMPORT_C~CParserProperty()

Member Functions Documentation

AddParamL(CParserParam *)

IMPORT_C voidAddParamL(CParserParam *aParam)

Parameters

CParserParam * aParam

ConstructSelfL(CParserProperty &, const TDesC8 &)

IMPORT_C voidConstructSelfL(CParserProperty &aSelf,
const TDesC8 &aName
)[protected, static]

Parameters

CParserProperty & aSelf
const TDesC8 & aName

DeleteParam(TDesC8 &)

IMPORT_C voidDeleteParam(TDesC8 &aParamName)

Parameters

TDesC8 & aParamName

ExternalizeL(RWriteStream &, CVersitParser *)

IMPORT_C voidExternalizeL(RWriteStream &aStream,
CVersitParser *aVersitParser = NULL
)[virtual]

Parameters

RWriteStream & aStream
CVersitParser * aVersitParser = NULL

GenerateNameAndCreateFileL(RFs &, TPtr8, RFile &, TDes &)

voidGenerateNameAndCreateFileL(RFs &aFileSession,
TPtr8aPropertyName,
RFile &aFile,
TDes &aFileName
)[private]

Parameters

RFs & aFileSession
TPtr8 aPropertyName
RFile & aFile
TDes & aFileName

LoadBinaryValuesFromFilesL(RFs &)

IMPORT_C TBoolLoadBinaryValuesFromFilesL(RFs &aFileSession)

Parameters

RFs & aFileSession

Name()

IMPORT_C TPtrC8Name()const

NameBuf()

HBufC8 *&NameBuf()[private, inline]

NameUid()

TUid NameUid()const [inline]

Gets the property name UID.

UID of the property name.

NewL(CParserPropertyValue &, const TDesC8 &, CArrayPtr< CParserParam > *)

IMPORT_C CParserProperty *NewL(CParserPropertyValue &aPropertyValue,
const TDesC8 &aName,
CArrayPtr< CParserParam > *aArrayOfParams
)[static]

Parameters

CParserPropertyValue & aPropertyValue
const TDesC8 & aName
CArrayPtr< CParserParam > * aArrayOfParams

Param(const TDesC8 &)

IMPORT_C CParserParam *Param(const TDesC8 &aParamName)const

Parameters

const TDesC8 & aParamName

ParamArray()

IMPORT_C CArrayPtr< CParserParam > *ParamArray()const

ReadBinaryDataL(const CBufSeg *, HBufC8 **)

voidReadBinaryDataL(const CBufSeg *aBufseg_ptr,
HBufC8 **aBuffer
)[private]

Parameters

const CBufSeg * aBufseg_ptr
HBufC8 ** aBuffer

Reserved()

IMPORT_C voidReserved()[private, virtual]

SaveBinaryValuesToFilesL(TInt, const TDesC &, RFs &)

IMPORT_C TBoolSaveBinaryValuesToFilesL(TIntaSizeThreshold,
const TDesC &aPath,
RFs &aFileSession
)

Parameters

TInt aSizeThreshold
const TDesC & aPath
RFs & aFileSession

SetNameL(const TDesC8 &)

IMPORT_C voidSetNameL(const TDesC8 &aName)

Parameters

const TDesC8 & aName

SetNameUid(TUid)

voidSetNameUid(TUidaUid)[inline]

Sets a property name UID.

This function is called by CVersitParser::AddProperty() when internalising, and will not normally be used directly.

Parameters

TUid aUidA property name UID.

SetParamArray(CArrayPtr< CParserParam > *)

voidSetParamArray(CArrayPtr< CParserParam > *aArrayOfParams)[inline]

Sets the array of property parameters.

The property takes ownership of aArrayOfParams

Parameters

CArrayPtr< CParserParam > * aArrayOfParamsArray of property parameters.

SetValue(CParserPropertyValue *)

voidSetValue(CParserPropertyValue *aPropertyValue)[inline]

Sets the property value.

The property takes ownership of the property value.

Parameters

CParserPropertyValue * aPropertyValueA pointer to the property value to be set.

SupportsInterface(const TUid &)

IMPORT_C TBoolSupportsInterface(const TUid &)const [virtual]

Parameters

const TUid &

Uid()

TUid Uid()const [inline]

Gets the UID of the property value.

UID of the property value.

Value()

CParserPropertyValue *Value()const [inline]

Gets a pointer to the property value.

Ownership of the property value is not transferred by this function.

Pointer to generic parser property value.

Member Data Documentation

CArrayPtr< CParserParam > * iArrayOfParams

CArrayPtr< CParserParam > *iArrayOfParams[protected]

HBufC8 * iPropertyName

HBufC8 *iPropertyName[protected]

TUid iPropertyNameUid

TUid iPropertyNameUid[protected]

CParserPropertyValue * iPropertyValue

CParserPropertyValue *iPropertyValue[protected]