File/lib/api.php

Description

Kronolith external API interface.

$Horde: kronolith/lib/api.php,v 1.126.2.67 2010/05/09 19:00:32 mrubinsk Exp $

This file defines Kronolith's external API interface. Other applications can interact with Kronolith through this API.

Functions
_kronolith_browse (line 227)

Browse through Kronolith's object tree.

  • return: The contents of $path
array _kronolith_browse ([string $path = ''], [array $properties = array()])
  • string $path: The level of the tree to browse.
  • array $properties: The item properties to return. Defaults to 'name', 'icon', and 'browseable'.
_kronolith_delete (line 943)

Deletes an event identified by UID.

  • return: Success or failure.
boolean _kronolith_delete (string|array $uid)
  • string|array $uid: A single UID or an array identifying the event(s) to delete.
_kronolith_eventFromUID (line 1107)

Retrieves a Kronolith_Event object, given an event UID.

  • return: A valid Kronolith_Event on success, or a PEAR_Error on failure.
Kronolith_Event &_kronolith_eventFromUID (string $uid)
  • string $uid: The event's UID.
_kronolith_export (line 840)

Exports an event, identified by UID, in the requested content type.

  • return: The requested data.
string _kronolith_export (string $uid, string $contentType)
  • string $uid: Identify the event to export.
  • string $contentType: What format should the data be in? A string with one of:
                                 text/calendar (VCALENDAR 2.0. Recommended as
                                                this is specified in rfc2445)
                                 text/x-vcalendar (old VCALENDAR 1.0 format.
                                                  Still in wide use)
_kronolith_exportCalendar (line 890)

Exports a calendar in the requested content type.

  • return: The iCalendar representation of the calendar.
string _kronolith_exportCalendar (string $calendar, string $contentType)
  • string $calendar: The calendar to export.
  • string $contentType: What format should the data be in? A string with one of:
                                 text/calendar (VCALENDAR 2.0. Recommended as
                                                this is specified in rfc2445)
                                 text/x-vcalendar (old VCALENDAR 1.0 format.
                                                  Still in wide use)
_kronolith_getActionTimestamp (line 715)

Returns the timestamp of an operation for a given uid an action

  • return: The timestamp for this action.
integer _kronolith_getActionTimestamp (string $uid, string $action, [string $calendar = null])
  • string $uid: The uid to look for.
  • string $action: The action to check for - add, modify, or delete.
  • string $calendar: The calendar to search in.
_kronolith_getFreeBusy (line 1084)

Generates free/busy information for a given time period.

  • return: A freebusy object that covers the specified time period.
Horde_iCalendar_vfreebusy _kronolith_getFreeBusy ([integer $startstamp = null], [integer $endstamp = null], [string $calendar = null])
  • integer $startstamp: The start of the time period to retrieve.
  • integer $endstamp: The end of the time period to retrieve.
  • string $calendar: The calendar to view free/busy slots for. Defaults to the user's default calendar.
_kronolith_import (line 746)

Imports an event represented in the specified content type.

  • return: The event's UID, or a PEAR_Error on failure.
mixed _kronolith_import (string $content, string $contentType, [string $calendar = null])
  • string $content: The content of the event.
  • string $contentType: What format is the data in? Currently supports:
                                 text/calendar
                                 text/x-vcalendar
  • string $calendar: What calendar should the event be added to?
_kronolith_list (line 648)

Returns all the events that happen within a time period.

  • return: The events happening in this time period.
array _kronolith_list ([string $calendar = null], [object $startstamp = 0], [object $endstamp = 0])
  • string $calendar: The calendar to check for events.
  • object $startstamp: The start of the time range.
  • object $endstamp: The end of the time range.
_kronolith_listAlarms (line 1257)

Lists alarms for a given moment.

  • return: An array of UIDs
array _kronolith_listAlarms (integer $time, [string $user = null])
  • integer $time: The time to retrieve alarms for.
  • string $user: The user to retrieve alarms for. All users if null.
_kronolith_listBy (line 683)

Returns an array of UIDs for events that have had $action happen since $timestamp.

  • return: An array of UIDs matching the action and time criteria.
array _kronolith_listBy (string $action, integer $timestamp, [string $calendar = null])
  • string $action: The action to check for - add, modify, or delete.
  • integer $timestamp: The time to start the search.
  • string $calendar: The calendar to search in.
_kronolith_listCalendars (line 630)

Returns all calendars a user has access to, according to several parameters/permission levels.

  • return: The calendar list.
array _kronolith_listCalendars ([boolean $owneronly = false], [integer $permission = null])
  • boolean $owneronly: Only return calenders that this user owns? Defaults to false.
  • integer $permission: The permission to filter calendars by.
_kronolith_listEvents (line 1228)

Lists events for a given time period.

  • return: A list of event hashes.
array _kronolith_listEvents ([integer $startstamp = null], [integer $endstamp = null], [array $calendars = null], [boolean $showRecurrence = true], [boolean $alarmsOnly = false])
  • integer $startstamp: The start of the time period to retrieve.
  • integer $endstamp: The end of the time period to retrieve.
  • array $calendars: The calendars to view events from. Defaults to the user's default calendar.
  • boolean $showRecurrence: Return every instance of a recurring event? If false, will only return recurring events once inside the $startDate - $endDate range.
  • boolean $alarmsOnly: Filter results for events with alarms. Defaults to false.
_kronolith_modified (line 209)

Returns the last modification timestamp for the given uid.

  • return: The timestamp for the last modification of $uid.
integer _kronolith_modified (string $uid)
  • string $uid: The uid to look for.
_kronolith_path_delete (line 578)

Deletes a file from the Kronolith tree.

  • return: The event's UID, or a PEAR_Error on failure.
mixed _kronolith_path_delete (string $path)
  • string $path: The path to the file.
_kronolith_perms (line 139)

Returns a list of available permissions.

  • return: An array describing all available permissions.
array _kronolith_perms ()
_kronolith_put (line 445)

Saves a file into the Kronolith tree.

  • return: The event UIDs, or a PEAR_Error on failure.
array _kronolith_put (string $path, string $content, string $content_type)
  • string $path: The path where to PUT the file.
  • string $content: The file content.
  • string $content_type: The file's content type.
_kronolith_removeUserData (line 156)

Removes user data.

  • return: true on success | PEAR_Error on failure
mixed _kronolith_removeUserData (string $user)
  • string $user: Name of user to remove data for.
_kronolith_replace (line 1015)

Replaces the event identified by UID with the content represented in the specified contentType.

  • return: True on success, PEAR_Error otherwise.
mixed _kronolith_replace (string $uid, mixed $content, string $contentType)
  • string $uid: Idenfity the event to replace.
  • mixed $content: The content of the event. String or Horde_iCalendar_vevent
  • string $contentType: What format is the data in? Currently supports: text/calendar text/x-vcalendar (Ignored if content is Horde_iCalendar_vevent)
_kronolith_shareHelp (line 197)

Returns the share helper prefix

string _kronolith_shareHelp ()
_kronolith_subscribe (line 1333)

Subscribe to a calendar.

void _kronolith_subscribe (array $calendar)
  • array $calendar: Calendar description hash, with required 'type' parameter. Currently supports 'http' and 'webcal' for remote calendars.
_kronolith_unsubscribe (line 1383)

Unsubscribe from a calendar.

void _kronolith_unsubscribe (array $calendar)
  • array $calendar: Calendar description array, with required 'type' parameter. Currently supports 'http' and 'webcal' for remote calendars.
_kronolith_updateAttendee (line 1139)

Updates an attendee's response status for a specified event.

  • return: True on success, PEAR_Error on failure.
mixed _kronolith_updateAttendee (Horde_iCalender_vevent $response, [string $sender = null])
  • Horde_iCalender_vevent $response: A Horde_iCalender_vevent object, with a valid UID attribute that points to an existing event. This is typically the vEvent portion of an iTip meeting-request response, with the attendee's response in an ATTENDEE parameter.
  • string $sender: The email address of the person initiating the update. Attendees are only updated if this address matches.

Documentation generated on Sun, 30 Jan 2011 05:31:44 +0000 by phpDocumentor 1.4.3