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.
Public Member Functions | |
---|---|
CParserProperty(CArrayPtr< CParserParam > *) | |
~CParserProperty() | |
IMPORT_C void | AddParamL(CParserParam *) |
IMPORT_C void | DeleteParam(TDesC8 &) |
IMPORT_C void | ExternalizeL(RWriteStream &, CVersitParser *) |
IMPORT_C TBool | LoadBinaryValuesFromFilesL(RFs &) |
IMPORT_C TPtrC8 | Name() |
TUid | NameUid() |
IMPORT_C CParserProperty * | NewL(CParserPropertyValue &, const TDesC8 &, CArrayPtr< CParserParam > *) |
IMPORT_C CParserParam * | Param(const TDesC8 &) |
IMPORT_C CArrayPtr< CParserParam > * | ParamArray() |
IMPORT_C TBool | SaveBinaryValuesToFilesL(TInt, const TDesC &, RFs &) |
IMPORT_C void | SetNameL(const TDesC8 &) |
void | SetNameUid(TUid) |
void | SetParamArray(CArrayPtr< CParserParam > *) |
void | SetValue(CParserPropertyValue *) |
IMPORT_C TBool | SupportsInterface(const TUid &) |
TUid | Uid() |
CParserPropertyValue * | Value() |
Protected Member Functions | |
---|---|
CParserProperty(CParserPropertyValue &, CArrayPtr< CParserParam > *) | |
IMPORT_C void | ConstructSelfL(CParserProperty &, const TDesC8 &) |
Private Member Functions | |
---|---|
void | GenerateNameAndCreateFileL(RFs &, TPtr8, RFile &, TDes &) |
HBufC8 *& | NameBuf() |
void | ReadBinaryDataL(const CBufSeg *, HBufC8 **) |
IMPORT_C void | Reserved() |
Protected Attributes | |
---|---|
CArrayPtr< CParserParam > * | iArrayOfParams |
HBufC8 * | iPropertyName |
TUid | iPropertyNameUid |
CParserPropertyValue * | iPropertyValue |
IMPORT_C | CParserProperty | ( | CArrayPtr< CParserParam > * | aArrayOfParams | ) |
CArrayPtr< CParserParam > * aArrayOfParams |
IMPORT_C | CParserProperty | ( | CParserPropertyValue & | aPropertyValue, |
CArrayPtr< CParserParam > * | aArrayOfParams | |||
) | [protected] |
CParserPropertyValue & aPropertyValue | |
CArrayPtr< CParserParam > * aArrayOfParams |
IMPORT_C void | AddParamL | ( | CParserParam * | aParam | ) |
CParserParam * aParam |
IMPORT_C void | ConstructSelfL | ( | CParserProperty & | aSelf, |
const TDesC8 & | aName | |||
) | [protected, static] |
CParserProperty & aSelf | |
const TDesC8 & aName |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream, |
CVersitParser * | aVersitParser = NULL | |||
) | [virtual] |
RWriteStream & aStream | |
CVersitParser * aVersitParser = NULL |
void | GenerateNameAndCreateFileL | ( | RFs & | aFileSession, |
TPtr8 | aPropertyName, | |||
RFile & | aFile, | |||
TDes & | aFileName | |||
) | [private] |
IMPORT_C TBool | LoadBinaryValuesFromFilesL | ( | RFs & | aFileSession | ) |
RFs & aFileSession |
IMPORT_C CParserProperty * | NewL | ( | CParserPropertyValue & | aPropertyValue, |
const TDesC8 & | aName, | |||
CArrayPtr< CParserParam > * | aArrayOfParams | |||
) | [static] |
CParserPropertyValue & aPropertyValue | |
const TDesC8 & aName | |
CArrayPtr< CParserParam > * aArrayOfParams |
IMPORT_C CParserParam * | Param | ( | const TDesC8 & | aParamName | ) | const |
const TDesC8 & aParamName |
void | ReadBinaryDataL | ( | const CBufSeg * | aBufseg_ptr, |
HBufC8 ** | aBuffer | |||
) | [private] |
IMPORT_C TBool | SaveBinaryValuesToFilesL | ( | TInt | aSizeThreshold, |
const TDesC & | aPath, | |||
RFs & | aFileSession | |||
) |
void | SetNameUid | ( | TUid | aUid | ) | [inline] |
Sets a property name UID.
This function is called by CVersitParser::AddProperty() when internalising, and will not normally be used directly.
TUid aUid | A property name UID. |
void | SetParamArray | ( | CArrayPtr< CParserParam > * | aArrayOfParams | ) | [inline] |
Sets the array of property parameters.
The property takes ownership of aArrayOfParams
CArrayPtr< CParserParam > * aArrayOfParams | Array of property parameters. |
void | SetValue | ( | CParserPropertyValue * | aPropertyValue | ) | [inline] |
Sets the property value.
The property takes ownership of the property value.
CParserPropertyValue * aPropertyValue | A pointer to the property value to be set. |
IMPORT_C TBool | SupportsInterface | ( | const TUid & | ) | const [virtual] |
const TUid & |
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.