• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KCalCore Library

  • KCalCore
  • ICalTimeZoneSource
Public Member Functions | Static Public Member Functions | Protected Member Functions
KCalCore::ICalTimeZoneSource Class Reference

A class which reads and parses iCalendar VTIMEZONE components, and accesses libical time zone data. More...

#include <icaltimezones.h>

Inherits KTimeZoneSource.

List of all members.

Public Member Functions

 ICalTimeZoneSource ()
virtual ~ICalTimeZoneSource ()
ICalTimeZone parse (icaltimezone *tz)
bool parse (const QString &fileName, ICalTimeZones &zones)
bool parse (icalcomponent *calendar, ICalTimeZones &zones)
ICalTimeZone parse (const QString &name, const QStringList &tzList, ICalTimeZones &zones)
ICalTimeZone parse (MSTimeZone *tz, ICalTimeZones &zones)
ICalTimeZone parse (MSTimeZone *tz)
ICalTimeZone parse (const QString &name, const QStringList &tzList)
ICalTimeZone parse (icalcomponent *vtimezone)
ICalTimeZone standardZone (const QString &zone, bool icalBuiltIn=false)

Static Public Member Functions

static QByteArray icalTzidPrefix ()

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Detailed Description

A class which reads and parses iCalendar VTIMEZONE components, and accesses libical time zone data.

ICalTimeZoneSource is used to parse VTIMEZONE components and create ICalTimeZone instances to represent them.

Reader and parser for iCalendar time zone data

See also:
ICalTimeZone, ICalTimeZoneData
Author:
David Jarvie <software@astrojar.org.uk>.

Definition at line 405 of file icaltimezones.h.


Constructor & Destructor Documentation

KCalCore::ICalTimeZoneSource::ICalTimeZoneSource ( )

Constructs an iCalendar time zone source.

Definition at line 780 of file icaltimezones.cpp.

KCalCore::ICalTimeZoneSource::~ICalTimeZoneSource ( ) [virtual]

Destructor.

Definition at line 786 of file icaltimezones.cpp.


Member Function Documentation

QByteArray KCalCore::ICalTimeZoneSource::icalTzidPrefix ( ) [static]

Returns the prefix string used in the TZID field in built-in libical time zones.

The prefix string starts and ends with '/'. The name normally used for the time zone is obtained by stripping the prefix and the following characters up to the next '/', inclusive.

Returns:
prefix string

Definition at line 1346 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZoneSource::parse ( icalcomponent *  vtimezone)

Creates an ICalTimeZone instance containing the detailed information parsed from a VTIMEZONE component.

Parameters:
vtimezonethe VTIMEZONE component from which data is to be extracted
Returns:
an ICalTimeZone instance containing the parsed data, or invalid on error

Definition at line 832 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZoneSource::parse ( const QString &  name,
const QStringList &  tzList,
ICalTimeZones &  zones 
)

Creates an ICalTimeZone instance and adds it to a ICalTimeZones collection or returns an existing instance for the vcal component.

Parameters:
namethe name of timezone
tzListthe QStringList to parse
zonesthe time zones collection to which the ICalTimeZone instances are to be added
Returns:
an ICalTimeZone instance containing the time zone data, or invalid on error

Definition at line 1025 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZoneSource::parse ( MSTimeZone *  tz,
ICalTimeZones &  zones 
)

Creates an ICalTimeZone instance and adds it to a ICalTimeZones collection or returns an existing instance for the MSTimeZone component.

Parameters:
tzthe MSTimeZone structure to parse
zonesthe time zones collection to which the ICalTimeZone instances are to be added
Returns:
an ICalTimeZone instance containing the time zone data, or invalid on error
ICalTimeZone KCalCore::ICalTimeZoneSource::parse ( icaltimezone *  tz)

Creates an ICalTimeZone instance containing the detailed information contained in an icaltimezone structure.

Note that an icaltimezone instance may internally refer to a built-in (i.e. system) time zone, in which case the data obtained from tz will actually be derived from the built-in time zone rather than from a VTIMEZONE component.

Parameters:
tzthe icaltimezone structure from which data is to be extracted
Returns:
an ICalTimeZone instance containing the time zone data, or invalid on error

Definition at line 1141 of file icaltimezones.cpp.

bool KCalCore::ICalTimeZoneSource::parse ( const QString &  fileName,
ICalTimeZones &  zones 
)

Reads an iCalendar file and creates an ICalTimeZone instance for each VTIMEZONE component within it.

The ICalTimeZone instances are added to a ICalTimeZones collection.

If an error occurs while processing any time zone, any remaining time zones are left unprocessed.

Parameters:
fileNamethe file from which data is to be extracted
zonesthe time zones collection to which the ICalTimeZone instances are to be added
Returns:
false if any error occurred, true otherwise

Definition at line 790 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZoneSource::parse ( const QString &  name,
const QStringList &  tzList 
)

Creates an ICalTimeZone instance containing the detailed information contained in an QStringList produced by vcalformat.

Parameters:
namethe name of timezone
tzListthe QStringList from which data is to be extracted
Returns:
an ICalTimeZone instance containing the time zone data, or invalid on error

Definition at line 1051 of file icaltimezones.cpp.

bool KCalCore::ICalTimeZoneSource::parse ( icalcomponent *  calendar,
ICalTimeZones &  zones 
)

Creates an ICalTimeZone instance for each VTIMEZONE component within a CALENDAR component.

The ICalTimeZone instances are added to a ICalTimeZones collection.

If an error occurs while processing any time zone, any remaining time zones are left unprocessed.

Parameters:
calendarthe CALENDAR component from which data is to be extracted
zonesthe time zones collection to which the ICalTimeZone instances are to be added
Returns:
false if any error occurred (either parsing a VTIMEZONE component or adding an ICalTimeZone to zones), true otherwise

Definition at line 812 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZoneSource::parse ( MSTimeZone *  tz)

Creates an ICalTimeZone instance containing the detailed information contained in an MSTimeZone structure.

Parameters:
tzthe MSTimeZone structure from which data is to be extracted
Returns:
an ICalTimeZone instance containing the time zone data, or invalid on error
ICalTimeZone KCalCore::ICalTimeZoneSource::standardZone ( const QString &  zone,
bool  icalBuiltIn = false 
)

Creates an ICalTimeZone instance for a standard time zone.

The system time zone definition is used in preference; otherwise, the built-in libical time zone definition is used.

Parameters:
zonetime zone name, which may optionally include the libical prefix string
icalBuiltIntrue to fetch only the libical built-in time zone, and ignore system time zone definitions
Returns:
an ICalTimeZone instance containing the time zone data, or invalid on error

Definition at line 1309 of file icaltimezones.cpp.

void KCalCore::ICalTimeZoneSource::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Standard trick to add virtuals later.

Parameters:
idis any integer unique to this class which we will use to identify the method to be called.
datais a pointer to some glob of data, typically a struct.

Definition at line 1363 of file icaltimezones.cpp.


The documentation for this class was generated from the following files:
  • icaltimezones.h
  • icaltimezones.cpp

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal