![]() | ![]() | ![]() | Evolution API Reference: libecal, the Calendar Library | ![]() |
---|
e-cal-util —
struct CalObjInstance; void cal_obj_instance_list_free (GList *list); enum CalObjType; enum CalObjModType; enum CalMode; void cal_obj_uid_list_free (GList *list); icalcomponent* e_cal_util_new_top_level (void); icalcomponent* e_cal_util_parse_ics_file (const char *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); int 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); icaltimezone* e_cal_util_resolve_tzid (const char *tzid, gpointer data); char* e_cal_util_priority_to_string (int priority); int e_cal_util_priority_from_string (const char *string); char* e_cal_util_expand_uri (char *uri, gboolean tasks); 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_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_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_SAVE_SCHEDULES icalcomponent* e_cal_util_construct_instance (icalcomponent *icalcomp, struct icaltimetype rid); void e_cal_util_remove_instances (icalcomponent *icalcomp, struct icaltimetype rid, CalObjModType mod);
struct CalObjInstance { char *uid; /* UID of the object */ time_t start; /* Start time of instance */ time_t end; /* End time of instance */ };
void cal_obj_instance_list_free (GList *list);
Frees a list of CalObjInstance structures.
list: | List of CalObjInstance structures. |
typedef enum { CALOBJ_TYPE_EVENT = 1 << 0, CALOBJ_TYPE_TODO = 1 << 1, CALOBJ_TYPE_JOURNAL = 1 << 2, CALOBJ_TYPE_ANY = 0x07 } CalObjType;
typedef enum { CALOBJ_MOD_THIS = 1 << 0, CALOBJ_MOD_THISANDPRIOR = 1 << 1, CALOBJ_MOD_THISANDFUTURE = 1 << 2, CALOBJ_MOD_ALL = 0x07 } CalObjModType;
typedef enum { CAL_MODE_INVALID = -1, CAL_MODE_LOCAL = 1 << 0, CAL_MODE_REMOTE = 1 << 1, CAL_MODE_ANY = 0x07 } CalMode;
void cal_obj_uid_list_free (GList *list);
Frees a list of unique identifiers for calendar objects.
list: | List of strings with unique identifiers. |
icalcomponent* e_cal_util_parse_ics_file (const char *filename);
filename: | |
Returns : |
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.
comp: | the ECalComponent to generate alarms from |
start: | start time |
end: | end time |
omit: | |
resolve_tzid: | callback for resolving timezones |
user_data: | data to be passed to the resolve_tzid callback |
default_timezone: | the timezone used to resolve DATE and floating DATE-TIME values. |
Returns : |
int 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.
comps: | list of ECalComponent's |
start: | start time |
end: | end time |
omit: | |
comp_alarms: | list to be returned |
resolve_tzid: | callback for resolving timezones |
user_data: | data to be passed to the resolve_tzid callback |
default_timezone: | the timezone used to resolve DATE and floating DATE-TIME values. |
Returns : | the number of elements it added to that list. |
icaltimezone* e_cal_util_resolve_tzid (const char *tzid, gpointer data);
tzid: | |
data: | |
Returns : |
char* e_cal_util_priority_to_string (int priority);
priority: | |
Returns : |
int e_cal_util_priority_from_string (const char *string);
string: | |
Returns : |
char* e_cal_util_expand_uri (char *uri, gboolean tasks);
uri: | |
tasks: | |
Returns : |
void e_cal_util_add_timezones_from_component (icalcomponent *vcal_comp, icalcomponent *icalcomp);
vcal_comp: | |
icalcomp: |
gboolean e_cal_util_component_is_instance (icalcomponent *icalcomp);
icalcomp: | |
Returns : |
gboolean e_cal_util_component_has_alarms (icalcomponent *icalcomp);
icalcomp: | |
Returns : |
gboolean e_cal_util_component_has_organizer (icalcomponent *icalcomp);
icalcomp: | |
Returns : |
gboolean e_cal_util_component_has_recurrences (icalcomponent *icalcomp);
icalcomp: | |
Returns : |
gboolean e_cal_util_component_has_rdates (icalcomponent *icalcomp);
icalcomp: | |
Returns : |
gboolean e_cal_util_component_has_rrules (icalcomponent *icalcomp);
icalcomp: | |
Returns : |
gboolean e_cal_util_event_dates_match (icalcomponent *icalcomp1, icalcomponent *icalcomp2);
icalcomp1: | |
icalcomp2: | |
Returns : |
#define CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT "no-alarm-repeat"
#define CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS "no-audio-alarms"
#define CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS "no-display-alarms"
#define CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS "no-email-alarms"
#define CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS "no-procedure-alarms"
#define CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT "no-task-assignment"
#define CAL_STATIC_CAPABILITY_NO_THISANDFUTURE "no-thisandfuture"
#define CAL_STATIC_CAPABILITY_NO_THISANDPRIOR "no-thisandprior"
#define CAL_STATIC_CAPABILITY_NO_TRANSPARENCY "no-transparency"
#define CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ATTEND "organizer-must-attend"
#define CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS "organizer-not-email-address"
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.
icalcomp: | a recurring icalcomponent |
rid: | the RECURRENCE-ID to construct a component for |
Returns : | the instance, or NULL |
void e_cal_util_remove_instances (icalcomponent *icalcomp, struct icaltimetype rid, CalObjModType mod);
Removes one or more instances from comp according to rid and mod.
FIXME: should probably have a return value indicating whether or not icalcomp still has any instances
icalcomp: | a (recurring) icalcomponent |
rid: | the base RECURRENCE-ID to remove |
mod: | how to interpret rid |
<< e-cal-types | ECalView >> |