Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: VPROP.H
Link against: versit.lib

Class CParserParam

class CParserParam : public CBase;

Description

A Versit property parameter.

A property parameter consists of a name and optionally a value, both in descriptor form. Parser properties (class CParserProperty) may own one or more property parameters.

Note:

The private parameter name and value members are stored as narrow (8-bit) rather than 16-bit Unicode descriptors.

However, certain member functions take or return a Unicode value, for the purpose of backwards compatibility. In this case a simple conversion takes place: this ignores the top 8 bits (for Unicode -> Narrow) or adds zero for the top 8-bits (for Narrow->Unicode).

Derivation

Members

Defined in CParserParam:
ExternalizeL(), ExternalizeL(), Name(), NewL(), NewL(), SetValueL(), SetValueL(), Value(), ValueL(), ~CParserParam()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CParserParam *NewL(const TDesC8 &aName, const TDesC8 &aValue);

Description

Parameters

const TDesC8 &aName

const TDesC8 &aValue

Return value

CParserParam *


NewL()

static IMPORT_C CParserParam *NewL(const TDesC8 &aName, const TDesC &aValue);

Description

Allocates and constructs a new property parameter with the name and value specified.

This object does does not take ownership of aName or aValue.

A Unicode value string is converted to a narrow string for storage.

Parameters

const TDesC8 &aName

The parameter name.

const TDesC &aValue

The parameter value. (Use KNullDesC if applicable).

Return value

CParserParam *

Pointer to the newly created property parameter.


~CParserParam()

IMPORT_C ~CParserParam();

Description

Frees all resources owned by the property parameter, prior to its destruction.

[Top]


Member functions


SetValueL()

IMPORT_C void SetValueL(const TDesC8 &aValue);

Description

Sets the property parameter value.

Parameters

const TDesC8 &aValue

The new property parameter value.


SetValueL()

IMPORT_C void SetValueL(HBufC8 *aValue);

Description

Sets the property parameter value.

The property parameter takes ownership of aValue.

Parameters

HBufC8 *aValue

The new property parameter value.


ExternalizeL()

IMPORT_C TInt ExternalizeL(RWriteStream &aStream) const;

Description

Externalises a property parameter to the stream, in the form NAME=VALUE (or just NAME, depending on whether there is a value).

This function performs the esacaping of characters.

Parameters

RWriteStream &aStream

Stream to which the property parameter is to be externalised.

Return value

TInt

The length of data written to the stream.


Name()

IMPORT_C TPtrC8 Name() const;

Description

Gets the property parameter name.

If no name has been set, the function returns an empty string.

Return value

TPtrC8

The property parameter name.


Value()

IMPORT_C TPtrC8 Value() const;

Description

Gets the property parameter value.

If no value has been set, the function returns an empty descriptor.

Return value

TPtrC8

The property parameter value.


ValueL()

IMPORT_C HBufC *ValueL() const;

Description

Gets the property parameter value as a Unicode heap descriptor.

If no value has been set, the function returns an empty descriptor.

Return value

HBufC *

A Unicode version of the property parameter value.


ExternalizeL()

IMPORT_C TInt ExternalizeL(RWriteStream &aStream, TInt &aLengthOutput, CVersitParser *aVersitParser) const;

Description

Externalises vCard3.0 property parameter to the stream, in the form NAME=VALUE or just VALUE, if it is a nameless parameter.

This function performs the esacaping of characters.

Property parameter contains value only -> TEL;Home:984536577 in which case iParamName contains the parameter value.

Escape semi-colon,backslash,comma characters in parameter value.

Parameters

RWriteStream &aStream

TInt &aLengthOutput

CVersitParser *aVersitParser

Return value

TInt