#include <app/vcal.h>
class CParserVCal : public CVersitParser |
Public Member Functions | |
---|---|
virtual IMPORT_C void | ExternalizeL(RWriteStream &) |
virtual IMPORT_C void | InternalizeL(RReadStream &) |
IMPORT_C CParserVCal * | NewL() |
virtual IMPORT_C TInt | RecognizeEntityName() |
virtual IMPORT_C TUid | RecognizeToken(const TDesC8 &) |
Protected Member Functions | |
---|---|
virtual IMPORT_C CVersitParser * | MakeEntityL(TInt, HBufC *) |
Inherited Enumerations | |
---|---|
CVersitParser:TCharCodes | |
CVersitParser:TVersitParserFlags |
A vCalendar parser.
Adds support for parsing vToDos and vEvents, and associated alarms (see CParserPropertyValueAlarm) to the functionality of CVersitParser.
Adds a constructor and overrides CVersitParser::InternalizeL() for streams, ExternalizeL() for streams, RecognizeToken(), RecognizeEntityName() and MakeEntityL().
The vCalendar data is read from or written to a stream or file, using the InternalizeL() and ExternalizeL() functions. Most users of this class will only need to use these functions.
Note: if you are sequentially creating and destroying multiple parsers, a major performance improvement may be achieved by using thread local storage to store an instance of CVersitUnicodeUtils which persists and can be used by all of the parsers.
See CVersitTlsData for more information.
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | [virtual] |
Reimplemented from CVersitParser::ExternalizeL(RWriteStream &)
Externalises a vCalendar entity (and all sub-entities) to a write stream.
Sets the entity name to KVersitVarTokenVCALENDAR if it hasn't already been set.
Adds a version property to the start of the current entity's array of properties if the entity supports this. (If there isn't an array of properties then one is made).
The presence of this function means that the standard templated operator<<() (defined in s32strm.h) is available to externalise objects of this class.
See also: CVersitParser::ExternalizeL()
Parameter | Description |
---|---|
aStream | Stream to which the vCalendar should be externalised. |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) | [virtual] |
Reimplemented from CVersitParser::InternalizeL(RReadStream &)
Internalises a vCalendar entity from a read stream.
The presence of this function means that the standard templated operator>>() (defined in s32strm.h) is available to internalise objects of this class.
See also: CVersitParser::InternalizeL()
Parameter | Description |
---|---|
aStream | Stream from which the vCalendar should be internalised. |
IMPORT_C CVersitParser * | MakeEntityL | ( | TInt | aEntityUid, |
HBufC * | aEntityName | |||
) | [protected, virtual] |
Reimplemented from CVersitParser::MakeEntityL(TInt,HBufC *)
IMPORT_C CParserVCal * | NewL | ( | ) | [static] |
Allocates and constructs a vCalendar parser.
Returns: Pointer to the newly created vCalendar parser.
IMPORT_C TInt | RecognizeEntityName | ( | ) | const [virtual] |
Reimplemented from CVersitParser::RecognizeEntityName()const
Tests the current value to see if it a vEvent or vTodo entity.
Returns: KVCalEntityUidVEvent if it is a vEvent entity; KVersitVarTokenVTODO if it is a vTodo entity; zero if there is no current property or it has no value.
Reimplemented from CVersitParser::RecognizeToken(const TDesC8 &)const
Returns a UID that identifies a specified token's type.
For example, if aToken contains the property name DAYLIGHT the function returns KVersitPropertyDaylightUid. If the token is not recognized as vCalendar-specific, the function calls CVersitParser::RecognizeToken(), which recognizes generic Versit tokens.
Parameter | Description |
---|---|
aToken | The token to be recognized. |
Returns: A defined UID value if the token has been recognized, KVersitTokenUnknownUid otherwise.