Evolution-Data-Server Manual: Calendar Client (libecal) | ||||
---|---|---|---|---|
Top | Description |
Synopsis
CalObjInstance; void cal_obj_instance_list_free (GList *list
); void cal_obj_uid_list_free (GList *list
); icalcomponent * e_cal_util_new_top_level (void
); icalcomponent * e_cal_util_new_component (icalcomponent_kind kind
); icalcomponent * e_cal_util_parse_ics_string (const gchar *string
); icalcomponent * e_cal_util_parse_ics_file (const gchar *filename
); ECalComponentAlarms * e_cal_util_generate_alarms_for_comp (ECalComponent *comp
,time_t start
,time_t end
,ECalComponentAlarmAction *omit
,ECalRecurResolveTimezoneFn resolve_tzid
,gpointer user_data
,icaltimezone *default_timezone
); gint e_cal_util_generate_alarms_for_list (GList *comps
,time_t start
,time_t end
,ECalComponentAlarmAction *omit
,GSList **comp_alarms
,ECalRecurResolveTimezoneFn resolve_tzid
,gpointer user_data
,icaltimezone *default_timezone
); const gchar * e_cal_util_priority_to_string (gint priority
); gint e_cal_util_priority_from_string (const gchar *string
); void e_cal_util_add_timezones_from_component (icalcomponent *vcal_comp
,icalcomponent *icalcomp
); gboolean e_cal_util_component_is_instance (icalcomponent *icalcomp
); gboolean e_cal_util_component_has_alarms (icalcomponent *icalcomp
); gboolean e_cal_util_component_has_organizer (icalcomponent *icalcomp
); gboolean e_cal_util_component_has_recurrences (icalcomponent *icalcomp
); gboolean e_cal_util_component_has_rdates (icalcomponent *icalcomp
); gboolean e_cal_util_component_has_rrules (icalcomponent *icalcomp
); gboolean e_cal_util_component_has_attendee (icalcomponent *icalcomp
); gboolean e_cal_util_event_dates_match (icalcomponent *icalcomp1
,icalcomponent *icalcomp2
); #define CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT #define CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS #define CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS #define CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS #define CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS #define CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT #define CAL_STATIC_CAPABILITY_NO_THISANDFUTURE #define CAL_STATIC_CAPABILITY_NO_THISANDPRIOR #define CAL_STATIC_CAPABILITY_NO_TRANSPARENCY #define CAL_STATIC_CAPABILITY_NO_ALARM_AFTER_START #define CAL_STATIC_CAPABILITY_ALARM_DESCRIPTION #define CAL_STATIC_CAPABILITY_BULK_ADDS #define CAL_STATIC_CAPABILITY_BULK_MODIFIES #define CAL_STATIC_CAPABILITY_BULK_REMOVES #define CAL_STATIC_CAPABILITY_REMOVE_ONLY_THIS #define CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY #define CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ATTEND #define CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS #define CAL_STATIC_CAPABILITY_REMOVE_ALARMS #define CAL_STATIC_CAPABILITY_CREATE_MESSAGES #define CAL_STATIC_CAPABILITY_SAVE_SCHEDULES #define CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK #define CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR #define CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS #define CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS #define CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER #define CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT #define CAL_STATIC_CAPABILITY_DELEGATE_SUPPORTED #define CAL_STATIC_CAPABILITY_NO_ORGANIZER #define CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY #define CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING #define CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED icalcomponent * e_cal_util_construct_instance (icalcomponent *icalcomp
,struct icaltimetype rid
); void e_cal_util_remove_instances (icalcomponent *icalcomp
,struct icaltimetype rid
,ECalObjModType mod
); gchar * e_cal_util_get_system_timezone_location (void
); icaltimezone * e_cal_util_get_system_timezone (void
); void e_cal_util_get_component_occur_times (ECalComponent *comp
,time_t *start
,time_t *end
,ECalRecurResolveTimezoneFn tz_cb
,gpointer tz_cb_data
,const icaltimezone *default_timezone
,icalcomponent_kind kind
); enum CalMode; #define cal_mode_to_corba (mode) #define E_CALENDAR_ERROR GQuark e_calendar_error_quark (void
); enum ECalChangeType; ECalChange; enum ECalendarStatus; #define E_CALENDAR_STATUS_CORBA_EXCEPTION enum EDataCalObjType; enum EDataCalObjModType; typedef CalObjModType; #define CALOBJ_MOD_THIS #define CALOBJ_MOD_THISANDPRIOR #define CALOBJ_MOD_THISANDFUTURE #define CALOBJ_MOD_ALL #define CALOBJ_MOD_ONLY_THIS
Details
CalObjInstance
typedef struct { gchar *uid; /* UID of the object */ time_t start; /* Start time of instance */ time_t end; /* End time of instance */ } CalObjInstance;
cal_obj_instance_list_free ()
void cal_obj_instance_list_free (GList *list
);
Frees a list of CalObjInstance structures.
|
List of CalObjInstance structures. |
cal_obj_uid_list_free ()
void cal_obj_uid_list_free (GList *list
);
Frees a list of unique identifiers for calendar objects.
|
List of strings with unique identifiers. |
e_cal_util_new_top_level ()
icalcomponent * e_cal_util_new_top_level (void
);
Creates a new VCALENDAR component.
Returns : |
the newly created top level component. |
e_cal_util_new_component ()
icalcomponent * e_cal_util_new_component (icalcomponent_kind kind
);
Creates a new icalcomponent of the specified kind.
|
Kind of the component to create. |
Returns : |
the newly created component. |
e_cal_util_parse_ics_string ()
icalcomponent * e_cal_util_parse_ics_string (const gchar *string
);
Parses an iCalendar string and returns a new icalcomponent representing that string. Note that this function deals with multiple VCALENDAR's in the string, something that Mozilla used to do and which libical does not support.
|
iCalendar string to be parsed. |
Returns : |
a newly created icalcomponent or NULL if the string isn't a valid iCalendar string. |
e_cal_util_parse_ics_file ()
icalcomponent * e_cal_util_parse_ics_file (const gchar *filename
);
Parses the given file, and, if it contains a valid iCalendar object, parse it and return a new icalcomponent.
|
Name of the file to be parsed. |
Returns : |
a newly created icalcomponent or NULL if the file doesn't contain a valid iCalendar object. |
e_cal_util_generate_alarms_for_comp ()
ECalComponentAlarms * e_cal_util_generate_alarms_for_comp (ECalComponent *comp
,time_t start
,time_t end
,ECalComponentAlarmAction *omit
,ECalRecurResolveTimezoneFn resolve_tzid
,gpointer user_data
,icaltimezone *default_timezone
);
Generates alarm instances for a calendar component. Returns the instances
structure, or NULL
if no alarm instances occurred in the specified time
range.
|
The ECalComponent to generate alarms from |
|
Start time |
|
End time |
|
Alarm types to omit |
|
Callback for resolving timezones. [closure user_data][scope call] |
|
Data to be passed to the resolve_tzid callback. [closure] |
|
The timezone used to resolve DATE and floating DATE-TIME values. |
Returns : |
a list of all the alarms found for the
given component in the given time range. The list of alarms should be freed
by using e_cal_component_free_alarm_list() . [allow-none][transfer full]
|
e_cal_util_generate_alarms_for_list ()
gint e_cal_util_generate_alarms_for_list (GList *comps
,time_t start
,time_t end
,ECalComponentAlarmAction *omit
,GSList **comp_alarms
,ECalRecurResolveTimezoneFn resolve_tzid
,gpointer user_data
,icaltimezone *default_timezone
);
Iterates through all the components in the comps
list and generates alarm
instances for them; putting them in the comp_alarms
list.
|
List of ECalComponents. [element-type ECalComponent] |
|
Start time |
|
End time |
|
Alarm types to omit |
|
List to be returned. [out][transfer full][element-type ECalComponentAlarms] |
|
Callback for resolving timezones. [closure user_data][scope call] |
|
Data to be passed to the resolve_tzid callback. [closure] |
|
The timezone used to resolve DATE and floating DATE-TIME values. |
Returns : |
the number of elements it added to the list |
e_cal_util_priority_to_string ()
const gchar * e_cal_util_priority_to_string (gint priority
);
Converts an iCalendar PRIORITY value to a translated string. Any unknown priority value (i.e. not 0-9) will be returned as "" (undefined).
|
Priority value. |
Returns : |
a string representing the PRIORITY value. This value is a constant, so it should never be freed. |
e_cal_util_priority_from_string ()
gint e_cal_util_priority_from_string (const gchar *string
);
Converts a translated priority string to an iCalendar priority value.
|
A string representing the PRIORITY value. |
Returns : |
the priority (0-9) or -1 if the priority string is not valid. |
e_cal_util_add_timezones_from_component ()
void e_cal_util_add_timezones_from_component (icalcomponent *vcal_comp
,icalcomponent *icalcomp
);
Adds VTIMEZONE components to a VCALENDAR for all tzid's
in the given icalcomp
.
|
A VCALENDAR component. |
|
An iCalendar component, of any type. |
e_cal_util_component_is_instance ()
gboolean e_cal_util_component_is_instance (icalcomponent *icalcomp
);
Checks whether an icalcomponent is an instance of a recurring appointment.
|
An icalcomponent. |
Returns : |
TRUE if it is an instance, FALSE if not. |
e_cal_util_component_has_alarms ()
gboolean e_cal_util_component_has_alarms (icalcomponent *icalcomp
);
Checks whether an icalcomponent has any alarm.
|
An icalcomponent. |
Returns : |
TRUE if it has alarms, FALSE otherwise. |
e_cal_util_component_has_organizer ()
gboolean e_cal_util_component_has_organizer (icalcomponent *icalcomp
);
Checks whether an icalcomponent has an organizer.
|
An icalcomponent. |
Returns : |
TRUE if there is an organizer, FALSE if not. |
e_cal_util_component_has_recurrences ()
gboolean e_cal_util_component_has_recurrences
(icalcomponent *icalcomp
);
Checks if an icalcomponent has recurrence dates or rules.
|
An icalcomponent. |
Returns : |
TRUE if there are recurrence dates/rules, FALSE if not. |
e_cal_util_component_has_rdates ()
gboolean e_cal_util_component_has_rdates (icalcomponent *icalcomp
);
Checks if an icalcomponent has recurrence dates.
|
An icalcomponent. |
Returns : |
TRUE if there are recurrence dates, FALSE if not. |
e_cal_util_component_has_rrules ()
gboolean e_cal_util_component_has_rrules (icalcomponent *icalcomp
);
Checks if an icalcomponent has recurrence rules.
|
An icalcomponent. |
Returns : |
TRUE if there are recurrence rules, FALSE if not. |
e_cal_util_component_has_attendee ()
gboolean e_cal_util_component_has_attendee (icalcomponent *icalcomp
);
Checks if an icalcomponent has any attendees.
|
An icalcomponent. |
Returns : |
TRUE if there are attendees, FALSE if not. |
e_cal_util_event_dates_match ()
gboolean e_cal_util_event_dates_match (icalcomponent *icalcomp1
,icalcomponent *icalcomp2
);
Compare the dates of two icalcomponent's to check if they match.
|
An icalcomponent. |
|
An icalcomponent. |
Returns : |
TRUE if the dates of both components match, FALSE otherwise. |
CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT
#define CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT "no-alarm-repeat"
CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS
#define CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS "no-audio-alarms"
CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS
#define CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS "no-display-alarms"
CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS
#define CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS "no-email-alarms"
CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS
#define CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS "no-procedure-alarms"
CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT
#define CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT "no-task-assignment"
CAL_STATIC_CAPABILITY_NO_THISANDFUTURE
#define CAL_STATIC_CAPABILITY_NO_THISANDFUTURE "no-thisandfuture"
CAL_STATIC_CAPABILITY_NO_THISANDPRIOR
#define CAL_STATIC_CAPABILITY_NO_THISANDPRIOR "no-thisandprior"
CAL_STATIC_CAPABILITY_NO_TRANSPARENCY
#define CAL_STATIC_CAPABILITY_NO_TRANSPARENCY "no-transparency"
CAL_STATIC_CAPABILITY_NO_ALARM_AFTER_START
#define CAL_STATIC_CAPABILITY_NO_ALARM_AFTER_START "no-alarm-after-start"
Flag indicating that the backend does not support alarm after start the event
Since 3.8
CAL_STATIC_CAPABILITY_ALARM_DESCRIPTION
#define CAL_STATIC_CAPABILITY_ALARM_DESCRIPTION "alarm-description"
Flag indicating that the backend supports alarm description
Since 3.8
CAL_STATIC_CAPABILITY_BULK_ADDS
#define CAL_STATIC_CAPABILITY_BULK_ADDS "bulk-adds"
Flag indicating that the backend supports bulk additions.
Since 3.6
CAL_STATIC_CAPABILITY_BULK_MODIFIES
#define CAL_STATIC_CAPABILITY_BULK_MODIFIES "bulk-modifies"
Flag indicating that the backend supports bulk modifications.
Since 3.6
CAL_STATIC_CAPABILITY_BULK_REMOVES
#define CAL_STATIC_CAPABILITY_BULK_REMOVES "bulk-removes"
Flag indicating that the backend supports bulk removals.
Since 3.6
CAL_STATIC_CAPABILITY_REMOVE_ONLY_THIS
#define CAL_STATIC_CAPABILITY_REMOVE_ONLY_THIS "remove-only-this"
FIXME: Document me.
Since 3.2
CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ATTEND
#define CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ATTEND "organizer-must-attend"
CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS
#define CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS "organizer-not-email-address"
CAL_STATIC_CAPABILITY_CREATE_MESSAGES
#define CAL_STATIC_CAPABILITY_CREATE_MESSAGES "create-messages"
Since 2.26
CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK
#define CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK "no-conv-to-assign-task"
CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR
#define CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR "no-conv-to-recur"
CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS
#define CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS "no-general-options"
CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS
#define CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS "require-send-options"
CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER
#define CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER "recurrences-no-master-object"
CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT
#define CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT "organizer-must-accept"
CAL_STATIC_CAPABILITY_DELEGATE_SUPPORTED
#define CAL_STATIC_CAPABILITY_DELEGATE_SUPPORTED "delegate-support"
CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY
#define CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY "delegate-to-many"
CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING
#define CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING "has-unaccepted-meeting"
CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED
#define CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED "refresh-supported"
Since 2.30
e_cal_util_construct_instance ()
icalcomponent * e_cal_util_construct_instance (icalcomponent *icalcomp
,struct icaltimetype rid
);
This checks that rid
indicates a valid recurrence of icalcomp
, and
if so, generates a copy of comp
containing a RECURRENCE-ID of rid
.
|
A recurring icalcomponent |
|
The RECURRENCE-ID to construct a component for |
Returns : |
the instance, or NULL . |
e_cal_util_remove_instances ()
void e_cal_util_remove_instances (icalcomponent *icalcomp
,struct icaltimetype rid
,ECalObjModType mod
);
Removes one or more instances from comp
according to rid
and mod
.
FIXME: should probably have a return value indicating whether icalcomp
still has any instances
|
A (recurring) icalcomponent |
|
The base RECURRENCE-ID to remove |
|
How to interpret rid
|
e_cal_util_get_system_timezone_location ()
gchar * e_cal_util_get_system_timezone_location
(void
);
Returns : |
system timezone location string, NULL on an error.
Returned pointer should be freed with g_free() . |
Since 2.28
e_cal_util_get_system_timezone ()
icaltimezone * e_cal_util_get_system_timezone (void
);
Returns : |
icaltimezone object of the system timezone. NULL on an error. Returned pointer is part of the built-in timezones, thus do not free it. |
Since 2.28
e_cal_util_get_component_occur_times ()
void e_cal_util_get_component_occur_times (ECalComponent *comp
,time_t *start
,time_t *end
,ECalRecurResolveTimezoneFn tz_cb
,gpointer tz_cb_data
,const icaltimezone *default_timezone
,icalcomponent_kind kind
);
Find out when the component starts and stops, being careful about recurrences.
|
an ECalComponent |
|
. [out] |
|
. [out] |
|
. [closure tz_cb_data][scope call] |
|
. [closure] |
Since 2.32
enum CalMode
typedef enum { CAL_MODE_INVALID = -1, CAL_MODE_LOCAL = 1 << 0, CAL_MODE_REMOTE = 1 << 1, CAL_MODE_ANY = 0x07 } CalMode;
Warning
CalMode
is deprecated and should not be used in newly-written code.
cal_mode_to_corba()
#define cal_mode_to_corba(mode)
Warning
cal_mode_to_corba
is deprecated and should not be used in newly-written code.
E_CALENDAR_ERROR
#define E_CALENDAR_ERROR e_calendar_error_quark()
Warning
E_CALENDAR_ERROR
is deprecated and should not be used in newly-written code.
e_calendar_error_quark ()
GQuark e_calendar_error_quark (void
);
Warning
e_calendar_error_quark
is deprecated and should not be used in newly-written code.
enum ECalChangeType
typedef enum { E_CAL_CHANGE_ADDED = 1 << 0, E_CAL_CHANGE_MODIFIED = 1 << 1, E_CAL_CHANGE_DELETED = 1 << 2 } ECalChangeType;
Warning
ECalChangeType
is deprecated and should not be used in newly-written code.
ECalChange
typedef struct { ECalComponent *comp; ECalChangeType type; } ECalChange;
Warning
ECalChange
is deprecated and should not be used in newly-written code.
FIXME Document me!
Since 3.6
enum ECalendarStatus
typedef enum { E_CALENDAR_STATUS_OK, E_CALENDAR_STATUS_INVALID_ARG, E_CALENDAR_STATUS_BUSY, E_CALENDAR_STATUS_REPOSITORY_OFFLINE, E_CALENDAR_STATUS_NO_SUCH_CALENDAR, E_CALENDAR_STATUS_OBJECT_NOT_FOUND, E_CALENDAR_STATUS_INVALID_OBJECT, E_CALENDAR_STATUS_URI_NOT_LOADED, E_CALENDAR_STATUS_URI_ALREADY_LOADED, E_CALENDAR_STATUS_PERMISSION_DENIED, E_CALENDAR_STATUS_UNKNOWN_USER, E_CALENDAR_STATUS_OBJECT_ID_ALREADY_EXISTS, E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED, E_CALENDAR_STATUS_CANCELLED, E_CALENDAR_STATUS_COULD_NOT_CANCEL, E_CALENDAR_STATUS_AUTHENTICATION_FAILED, E_CALENDAR_STATUS_AUTHENTICATION_REQUIRED, E_CALENDAR_STATUS_DBUS_EXCEPTION, E_CALENDAR_STATUS_OTHER_ERROR, E_CALENDAR_STATUS_INVALID_SERVER_VERSION, E_CALENDAR_STATUS_NOT_SUPPORTED } ECalendarStatus;
Warning
ECalendarStatus
is deprecated and should not be used in newly-written code.
E_CALENDAR_STATUS_CORBA_EXCEPTION
#define E_CALENDAR_STATUS_CORBA_EXCEPTION E_CALENDAR_STATUS_DBUS_EXCEPTION
Warning
E_CALENDAR_STATUS_CORBA_EXCEPTION
is deprecated and should not be used in newly-written code.
enum EDataCalObjType
typedef enum { Event = 1 << 0, Todo = 1 << 1, Journal = 1 << 2, AnyType = 0x07 } EDataCalObjType;
Warning
EDataCalObjType
is deprecated and should not be used in newly-written code.
FIXME Document me!
Since 3.6
enum EDataCalObjModType
typedef enum { This = 1 << 0, ThisAndPrior = 1 << 1, ThisAndFuture = 1 << 2, All = 0x07 } EDataCalObjModType;
Warning
EDataCalObjModType
is deprecated and should not be used in newly-written code.
FIXME Document me!
Since 3.6
CalObjModType
typedef ECalObjModType CalObjModType;
Warning
CalObjModType
is deprecated and should not be used in newly-written code.
CALOBJ_MOD_THIS
#define CALOBJ_MOD_THIS E_CAL_OBJ_MOD_THIS
Warning
CALOBJ_MOD_THIS
is deprecated and should not be used in newly-written code.
CALOBJ_MOD_THISANDPRIOR
#define CALOBJ_MOD_THISANDPRIOR E_CAL_OBJ_MOD_THIS_AND_PRIOR
Warning
CALOBJ_MOD_THISANDPRIOR
is deprecated and should not be used in newly-written code.
CALOBJ_MOD_THISANDFUTURE
#define CALOBJ_MOD_THISANDFUTURE E_CAL_OBJ_MOD_THIS_AND_FUTURE
Warning
CALOBJ_MOD_THISANDFUTURE
is deprecated and should not be used in newly-written code.
CALOBJ_MOD_ALL
#define CALOBJ_MOD_ALL E_CAL_OBJ_MOD_ALL
Warning
CALOBJ_MOD_ALL
is deprecated and should not be used in newly-written code.