php-doc-en/functions/icap.xml
2001-08-02 17:37:51 +00:00

459 lines
12 KiB
XML

<!-- $Revision: 1.9 $ -->
<reference id="ref.icap">
<title>ICAP Functions</title>
<titleabbrev>ICAP</titleabbrev>
<partintro>
<simpara>
To get these functions to work, you have to compile PHP with
<option role="configure">--with-icap</option>. That requires the
icap library to be installed. Grab the latest version from <ulink
url="&url.icap;">&url.icap;</ulink> and compile and install it.
</simpara>
</partintro>
<refentry id="function.icap-open">
<refnamediv>
<refname>icap_open</refname>
<refpurpose>Opens up an ICAP connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>stream <function>icap_open</function></funcdef>
<paramdef>string <parameter>calendar</parameter></paramdef>
<paramdef>string <parameter>username</parameter></paramdef>
<paramdef>string <parameter>password</parameter></paramdef>
<paramdef>string <parameter>options</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns an ICAP stream on success, &false; on error.</para>
<para>
<function>icap_open</function> opens up an ICAP connection to the
specified <parameter>calendar</parameter> store. If the optional
<parameter>options</parameter> is specified, passes the
<parameter>options</parameter> to that mailbox also.
</para>
</refsect1>
</refentry>
<refentry id="function.icap-close">
<refnamediv>
<refname>icap_close</refname>
<refpurpose>Close an ICAP stream</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>icap_close</function></funcdef>
<paramdef>int <parameter>icap_stream</parameter></paramdef>
<paramdef>int
<parameter><optional>flags</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Closes the given icap stream.
</para>
</refsect1>
</refentry>
<refentry id="function.icap-fetch-event">
<refnamediv>
<refname>icap_fetch_event</refname>
<refpurpose>Fetches an event from the calendar stream/</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>icap_fetch_event</function></funcdef>
<paramdef>int <parameter>stream_id</parameter></paramdef>
<paramdef>int <parameter>event_id</parameter></paramdef>
<paramdef>int
<parameter><optional>options</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>icap_fetch_event</function> fetches an event from the
calendar stream specified by <parameter>event_id</parameter>.
</para>
<para>
Returns an event object consisting of:
<itemizedlist>
<listitem>
<simpara>
int id - ID of that event.
</simpara>
</listitem>
<listitem>
<simpara>
int public - &true; if the event if public, &false; if it is private.
</simpara>
</listitem>
<listitem>
<simpara>
string category - Category string of the event.
</simpara>
</listitem>
<listitem>
<simpara>
string title - Title string of the event.
</simpara>
</listitem>
<listitem>
<simpara>
string description - Description string of the event.
</simpara>
</listitem>
<listitem>
<simpara>
int alarm - number of minutes before the event to send an
alarm/reminder.
</simpara>
</listitem>
<listitem>
<simpara>
object start - Object containing a datetime entry.
</simpara>
</listitem>
<listitem>
<simpara>
object end - Object containing a datetime entry.
</simpara>
</listitem>
</itemizedlist>
All datetime entries consist of an object that contains:
<itemizedlist>
<listitem>
<simpara>
int year - year
</simpara>
</listitem>
<listitem>
<simpara>
int month - month
</simpara>
</listitem>
<listitem>
<simpara>
int mday - day of month
</simpara>
</listitem>
<listitem>
<simpara>
int hour - hour
</simpara>
</listitem>
<listitem>
<simpara>
int min - minutes
</simpara>
</listitem>
<listitem>
<simpara>
int sec - seconds
</simpara></listitem>
</itemizedlist>
</para>
</refsect1>
</refentry>
<refentry id="function.icap-list-events">
<refnamediv>
<refname>icap_list_events</refname>
<refpurpose>
Return a list of events between two given datetimes
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>array <function>icap_list_events</function></funcdef>
<paramdef>int <parameter>stream_id</parameter></paramdef>
<paramdef>int <parameter>begin_date</parameter></paramdef>
<paramdef>int
<parameter><optional>end_date</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns an array of event ID's that are between the two given
datetimes.
</para>
<para>
<function>icap_list_events</function> function takes in a
beginning datetime and an end datetime for a calendar stream. An
array of event id's that are between the given datetimes are
returned.
</para>
<para>
All datetime entries consist of an object that contains:
<itemizedlist>
<listitem>
<simpara>
int year - year
</simpara>
</listitem>
<listitem>
<simpara>
int month - month
</simpara>
</listitem>
<listitem>
<simpara>
int mday - day of month
</simpara>
</listitem>
<listitem>
<simpara>
int hour - hour
</simpara>
</listitem>
<listitem>
<simpara>
int min - minutes
</simpara>
</listitem>
<listitem>
<simpara>
int sec - seconds
</simpara>
</listitem>
</itemizedlist>
</para>
</refsect1>
</refentry>
<refentry id="function.icap-store-event">
<refnamediv>
<refname>icap_store_event</refname>
<refpurpose>Store an event into an ICAP calendar</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>icap_store_event</function></funcdef>
<paramdef>int <parameter>stream_id</parameter></paramdef>
<paramdef>object <parameter>event</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>icap_store_event</function> Stores an event into
an ICAP calendar. An event object consists of:
<itemizedlist>
<listitem>
<simpara>
int public - 1 if public, 0 if private;
</simpara>
</listitem>
<listitem>
<simpara>
string caegory - Category string of the event.
</simpara>
</listitem>
<listitem>
<simpara>
string title - Title string of the event.
</simpara>
</listitem>
<listitem>
<simpara>
string description - Description string of the event.
</simpara>
</listitem>
<listitem>
<simpara>
int alarm - Number of minutes before the event to sned out an alarm.
</simpara>
</listitem>
<listitem>
<simpara>
datetime start - datetime object of the start of the event.
</simpara>
</listitem>
<listitem>
<simpara>
datetime end - datetime object of the end of the event.
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
All datetime entries consist of an object that contains:
<itemizedlist>
<listitem>
<simpara>
int year - year
</simpara>
</listitem>
<listitem>
<simpara>
int month - month
</simpara>
</listitem>
<listitem>
<simpara>
int mday - day of month
</simpara>
</listitem>
<listitem>
<simpara>
int hour - hour
</simpara>
</listitem>
<listitem>
<simpara>
int min - minutes
</simpara>
</listitem>
<listitem>
<simpara>
int sec - seconds
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Returns &true; on success and &false; on error.
</para>
</refsect1>
</refentry>
<refentry id="function.icap-delete-event">
<refnamediv>
<refname>icap_delete_event</refname>
<refpurpose>Delete an event from an ICAP calendar</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>icap_delete_event</function></funcdef>
<paramdef>int <parameter>sream_id</parameter></paramdef>
<paramdef>int <parameter>uid</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>icap_delete_event</function> deletes the calendar event
specified by the <parameter>uid</parameter>.
</para>
<para>
Returns &true;.
</para>
</refsect1>
</refentry>
<refentry id="function.icap-snooze">
<refnamediv>
<refname>icap_snooze</refname>
<refpurpose>Snooze an alarm</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>icap_snooze</function></funcdef>
<paramdef>int <parameter>stream_id</parameter></paramdef>
<paramdef>int <parameter>uid</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>icap_snooze</function> turns on an alarm for a
calendar event specified by the <parameter>uid</parameter>.
</para>
<para>
Returns &true;.
</para>
</refsect1>
</refentry>
<refentry id="function.icap-list-alarms">
<refnamediv>
<refname>icap_list_alarms</refname>
<refpurpose>
Return a list of events that has an alarm triggered at the given
datetime
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>icap_list_alarms</function></funcdef>
<paramdef>int <parameter>stream_id</parameter></paramdef>
<paramdef>array <parameter>date</parameter></paramdef>
<paramdef>array <parameter>time</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Returns an array of event ID's that has an alarm going off at the
given datetime.
</para>
<para>
<function>icap_list_alarms</function> function takes in a
datetime for a calendar stream. An array of event id's that has
an alarm should be going off at the datetime are returned.
</para>
<para>
All datetime entries consist of an object that contains:
<itemizedlist>
<listitem>
<simpara>
int year - year
</simpara>
</listitem>
<listitem>
<simpara>
int month - month
</simpara>
</listitem>
<listitem>
<simpara>
int mday - day of month
</simpara>
</listitem>
<listitem>
<simpara>
int hour - hour
</simpara>
</listitem>
<listitem>
<simpara>
int min - minutes
</simpara>
</listitem>
<listitem>
<simpara>
int sec - seconds
</simpara>
</listitem>
</itemizedlist>
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->