icalvircal Class Reference

Inheritance diagram for icalvircal:

virtual_calendar Collaboration diagram for icalvircal:

Collaboration graph
[legend]
List of all members.

Detailed Description

Ical data handling for Virtual Calendars.

This class extends a virtual_calendar with methods to get updated by a iCalendar data (import) or export its contents as iCalendar data (export).

For its current implementation this class relies heavily egwical_resourcehandlers provided by the package egwical.

Basic extra operations supported on virtual calendars by this class are:

Author:
jvl
Version:
0.9.36 first version adapted to NAPI-3.1
Date:
20060410


Public Member Functions

VcalStr export_vcal (array $attribs=null)
 Export all data as a iCalendar formatted string.
RscUpdateTable I false import_vcal (VcalStr &$vcal)
 Import all suited elements from an iCalendar string into the various bound Egw resources of the virtual calendar.

Public Attributes

string $deviceType = 'all'
 The devicetype of the kind of client that is currently exporting or importing.
 $ivdebug = false
boolean $reimport_missing_elements = true
 Switch to allow reimport of gone egw elements.
int $uid_mapping_export = UMM_ID2UID
 Switch that determines the way uid fields are generated at export.
int $uid_mapping_import = UMM_UID2ID
 Switch that determines how uid fields are used for import.


Member Function Documentation

VcalStr icalvircal::export_vcal array $  attribs = null  ) 
 

Export all data as a iCalendar formatted string.

All resources found in the vircal ($_caldef member) are queried according to the queries setting in there. The resulting egw elements are then converted according to the resourcehandler settings and their results are collected and returned as a compound iCalendar string.

Parameters:
$attribs optional hash with global iCalendar attributes settings. These attributes will passed through to the egwical_resourcehandler::render_velt2vcal() routine to possibly override the standard attributes as provided in egwical_resourcehandler::_provided_vcalendar2egwAttributes
Returns:
a iCalendar formatted string corresponding to the VElt data converted from egw elements referred to by all the defined queries in the virtual calendar On error: false

RscUpdateTable I false icalvircal::import_vcal VcalStr &$  vcal  ) 
 

Import all suited elements from an iCalendar string into the various bound Egw resources of the virtual calendar.

This import routine parses the Vcal string and then tries to import import each of the components (VElts like VEVENT, VTODO) into an appropiate egw resource (calendar, infolog etc. instance) as determined by the virtual calendar resource handling settings. Thereby respecting the access rights of the grants settings in the virtual calendar. Import can mean here: add as new, update, or delete an existing egw data element (events, task, ..).

Parameters:
$vcal a iCalendar formatted string with one or more VElts.
Returns:
a hash with for each resource (by classname) a list of ids of updated elements in that resource On error: false


Member Data Documentation

string icalvircal::$deviceType = 'all'
 

The devicetype of the kind of client that is currently exporting or importing.

This is needed to determine what fields are imported and exported from and to the icaldata: most devices only support a selected set of VEVENT or VTODO fields.

Note:
this should be derived from the requesting http agent info

boolean icalvircal::$reimport_missing_elements = true
 

Switch to allow reimport of gone egw elements.

Switch that determines if events not anymore in egw are allowed to be reimported

Default this is on

int icalvircal::$uid_mapping_export = UMM_ID2UID
 

Switch that determines the way uid fields are generated at export.

According to the value, on export, a uid will be generated:

  • completely unrelated to the related egw element id (UMM_NEWUID) or
  • with the related egw element id encoded (UMM_ID2UID Default situation!) or
  • directly copied from the uid field of the related egw element (UMM_UID2UID Strongly discouraged!). For more info see secuidmappping

int icalvircal::$uid_mapping_import = UMM_UID2ID
 

Switch that determines how uid fields are used for import.

According to the value, on import, the uid field of a vcalendar element will be determine how the search for a matching egw element is done. The choices are:

  • no search for a related egw element id is done, Just a new element is added to the bound egw resource (UMM_NEWID) or
  • a related egw element is searched for based on a egw id decoded from the uid field of the ical element(UMM_ID2UID Note: Default situation!). This requires of course that at some earlier (exportd) moment an actual egw id was encoded in this uid field.
  • a related egw element is searched for based on the full value of the uid field of the ical element by searching trough the uid fields of the egw elements (UMM_UID2UID Note: Strongly discouraged!). This requires that the egw resource does support correct and unique manipulation (storage etc.) of the egw element uid fields! For more info see secuidmapping


Generated on Thu Jun 8 22:17:13 2006 for IcalSrv-API by  doxygen 1.4.6