create a new cal component alarm (cal_component_add_alarm): add alarm to

2001-01-19  JP Rosevear  <jpr@ximian.com>

	* cal-util/cal-component.c (cal_component_alarm_new): create a new
	cal component alarm
	(cal_component_add_alarm): add alarm to the cal component
	(cal_component_remove_alarm): remove alarm from the cal component
	(remove_alarm): remove alarm from hash

	* cal-util/cal-component.h: new protos

	* conduits/calendar/calendar-conduit.c (comp_from_remote_record):
	add alarm information, still needs to be hacked to replace an already
	existing alarm.  questions abound about the heuristic for doing this.

2001-01-17  JP Rosevear  <jpr@ximian.com>

	* README: Update package requirements

svn path=/trunk/; revision=7647
This commit is contained in:
JP Rosevear
2001-01-19 14:57:09 +00:00
committed by JP Rosevear
parent 0b808ca4dc
commit 3532a74349
12 changed files with 880 additions and 696 deletions

View File

@ -1,3 +1,7 @@
2001-01-17 JP Rosevear <jpr@ximian.com>
* README: Update package requirements
2001-01-19 Jason Leach <jasonleach@usa.net>
* configure.in: Changed a leftover $with_x_mailer to

6
README
View File

@ -105,7 +105,7 @@ and -devel packages for each library.
- gdk-pixbuf - 0.8.0 or later (*)
- ORBit - 0.5.5 or later (*) (If you get this from GNOME CVS, use the
- ORBit - 0.5.6 or later (*) (If you get this from GNOME CVS, use the
tag "orbit-stable-0-5".)
- oaf - 0.6.0 or later (If you get this from GNOME CVS, use the tag
@ -115,7 +115,7 @@ and -devel packages for each library.
*** "--disable-more-warnings" when configure, or it may fail to
*** build.
- gnome-vfs - 0.3 or later
- gnome-vfs - 0.4.2 or later
*** If you are using gnome-vfs from CVS, you should use the flag
*** "--disable-more-warnings" when configuring, or it may fail to
@ -132,7 +132,7 @@ and -devel packages for each library.
- gconf - 0.6 or later
- gal (GNOME Application Library) - 0.4 or later
- gal (GNOME Application Library) - 0.4.99.4 or later
- gtkhtml - 0.8 or later

View File

@ -1,3 +1,22 @@
2001-01-19 JP Rosevear <jpr@ximian.com>
* cal-util/cal-component.c (cal_component_alarm_new): create a new
cal component alarm
(cal_component_add_alarm): add alarm to the cal component
(cal_component_remove_alarm): remove alarm from the cal component
(remove_alarm): remove alarm from hash
* cal-util/cal-component.h: new protos
* conduits/calendar/calendar-conduit.c (comp_from_remote_record):
add alarm information, still needs to be hacked to replace an already
existing alarm. questions abound about the heuristic for doing this.
2001-01-17 JP Rosevear <jpr@ximian.com>
* gui/event-editor.c (dialog_to_comp_object): Properly set categories
to NULL if there are none
2001-01-18 Federico Mena Quintero <federico@ximian.com>
* gui/tasks-migrate.[ch]: New files with a simple sequence to

View File

@ -688,6 +688,17 @@ add_alarm (CalComponent *comp, icalcomponent *alarm, const char *auid)
return auid;
}
static void
remove_alarm (CalComponent *comp, const char *auid)
{
CalComponentPrivate *priv;
priv = comp->priv;
g_hash_table_remove (priv->alarm_uid_hash, auid);
}
/* Scans an alarm subcomponent, adds an UID extension property to it (so that we
* can reference alarms by unique IDs), and adds its mapping to the component. */
static void
@ -3442,6 +3453,66 @@ cal_component_has_alarms (CalComponent *comp)
return g_hash_table_size (priv->alarm_uid_hash) != 0;
}
void
cal_component_add_alarm (CalComponent *comp, CalComponentAlarm *alarm)
{
CalComponentPrivate *priv;
g_return_if_fail (comp != NULL);
g_return_if_fail (IS_CAL_COMPONENT (comp));
g_return_if_fail (alarm != NULL);
priv = comp->priv;
alarm->parent = comp;
add_alarm (comp, alarm->icalcomp, icalproperty_get_x (alarm->uid));
icalcomponent_add_component (priv->icalcomp, alarm->icalcomp);
}
void
cal_component_remove_alarm (CalComponent *comp, const char *auid)
{
CalComponentPrivate *priv;
icalcompiter iter;
g_return_if_fail (comp != NULL);
g_return_if_fail (IS_CAL_COMPONENT (comp));
g_return_if_fail (auid != NULL);
priv = comp->priv;
for (iter = icalcomponent_begin_component (priv->icalcomp, ICAL_VALARM_COMPONENT);
icalcompiter_deref (&iter) != NULL;
icalcompiter_next (&iter)) {
icalproperty *prop;
icalcomponent *subcomp;
subcomp = icalcompiter_deref (&iter);
for (prop = icalcomponent_get_first_property (subcomp, ICAL_X_PROPERTY);
prop;
prop = icalcomponent_get_next_property (subcomp, ICAL_X_PROPERTY)) {
const char *xname;
const char *alarm_uid;
xname = icalproperty_get_x_name (prop);
g_assert (xname != NULL);
if (strcmp (xname, EVOLUTION_ALARM_UID_PROPERTY) == 0) {
alarm_uid = alarm_uid_from_prop (prop);
if (strcmp (alarm_uid, auid) == 0) {
remove_alarm (comp, auid);
icalcomponent_remove_component (priv->icalcomp, subcomp);
icalcomponent_free (subcomp);
break;
}
return;
}
}
}
}
/* Scans an icalproperty from a calendar component and adds its mapping to our
* own alarm structure.
*/
@ -3573,30 +3644,6 @@ cal_component_get_alarm (CalComponent *comp, const char *auid)
return NULL;
}
/**
* cal_component_alarm_free:
* @alarm: A calendar alarm.
*
* Frees an alarm structure.
**/
void
cal_component_alarm_free (CalComponentAlarm *alarm)
{
g_return_if_fail (alarm != NULL);
g_assert (alarm->icalcomp != NULL);
if (icalcomponent_get_parent (alarm->icalcomp) != NULL)
icalcomponent_free (alarm->icalcomp);
alarm->icalcomp = NULL;
alarm->parent = NULL;
alarm->action = NULL;
g_free (alarm);
}
/**
* cal_component_alarms_free:
* @alarms: Component alarms structure.
@ -3625,6 +3672,30 @@ cal_component_alarms_free (CalComponentAlarms *alarms)
g_free (alarms);
}
/**
* cal_component_alarm_new:
*
*
*
* Return value: a new alarm component
**/
CalComponentAlarm *
cal_component_alarm_new (void)
{
CalComponentAlarm *alarm = g_new0 (CalComponentAlarm, 1);
char *new_auid ;
alarm->icalcomp = icalcomponent_new (ICAL_VALARM_COMPONENT);
new_auid = cal_component_gen_uid ();
alarm->uid = icalproperty_new_x (new_auid);
icalproperty_set_x_name (alarm->uid, EVOLUTION_ALARM_UID_PROPERTY);
icalcomponent_add_property (alarm->icalcomp, alarm->uid);
g_free (new_auid);
return alarm;
}
/**
* cal_component_alarm_get_uid:
* @alarm: An alarm subcomponent.
@ -3844,12 +3915,14 @@ cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigg
switch (trigger.type) {
case CAL_ALARM_TRIGGER_RELATIVE_START:
t.duration = trigger.u.rel_duration;
t.time.is_date = -1;
value_type = ICAL_DURATION_VALUE;
related = ICAL_RELATED_START;
break;
case CAL_ALARM_TRIGGER_RELATIVE_END:
t.duration = trigger.u.rel_duration;
t.time.is_date = -1;
value_type = ICAL_DURATION_VALUE;
related = ICAL_RELATED_END;
break;
@ -3891,6 +3964,46 @@ cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigg
}
}
/**
* cal_component_alarm_free:
* @alarm: A calendar alarm.
*
* Frees an alarm structure.
**/
void
cal_component_alarm_free (CalComponentAlarm *alarm)
{
g_return_if_fail (alarm != NULL);
g_assert (alarm->icalcomp != NULL);
if (icalcomponent_get_parent (alarm->icalcomp) != NULL)
icalcomponent_free (alarm->icalcomp);
alarm->icalcomp = NULL;
alarm->parent = NULL;
alarm->action = NULL;
g_free (alarm);
}
/* Returns TRUE if both strings match, i.e. they are both NULL or the
strings are equal. */
static gboolean
cal_component_strings_match (const gchar *string1,
const gchar *string2)
{
if (string1 == NULL || string2 == NULL)
return (string1 == string2) ? TRUE : FALSE;
if (!strcmp (string1, string2))
return TRUE;
return FALSE;
}
/**
* cal_component_event_dates_match:
@ -3947,19 +4060,4 @@ cal_component_event_dates_match (CalComponent *comp1,
}
/* Returns TRUE if both strings match, i.e. they are both NULL or the
strings are equal. */
static gboolean
cal_component_strings_match (const gchar *string1,
const gchar *string2)
{
if (string1 == NULL || string2 == NULL)
return (string1 == string2) ? TRUE : FALSE;
if (!strcmp (string1, string2))
return TRUE;
return FALSE;
}

View File

@ -327,13 +327,17 @@ typedef struct {
} CalAlarmTrigger;
gboolean cal_component_has_alarms (CalComponent *comp);
void cal_component_add_alarm (CalComponent *comp, CalComponentAlarm *alarm);
void cal_component_remove_alarm (CalComponent *comp, const char *auid);
GList *cal_component_get_alarm_uids (CalComponent *comp);
CalComponentAlarm *cal_component_get_alarm (CalComponent *comp, const char *auid);
void cal_component_alarm_free (CalComponentAlarm *alarm);
void cal_component_alarms_free (CalComponentAlarms *alarms);
/* CalComponentAlarms */
CalComponentAlarm *cal_component_alarm_new (void);
const char *cal_component_alarm_get_uid (CalComponentAlarm *alarm);
void cal_component_alarm_get_action (CalComponentAlarm *alarm, CalAlarmAction *action);
@ -342,6 +346,8 @@ void cal_component_alarm_set_action (CalComponentAlarm *alarm, CalAlarmAction ac
void cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trigger);
void cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigger);
void cal_component_alarm_free (CalComponentAlarm *alarm);

View File

@ -655,6 +655,33 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
} else {
cal_component_set_rrule_list (comp, NULL);
}
/* Alarm information */
if (appt.alarm) {
CalComponentAlarm *alarm;
CalAlarmTrigger trig;
alarm = cal_component_alarm_new ();
cal_component_add_alarm (comp, alarm);
memset (&trig, 0, sizeof (trig));
trig.type = CAL_ALARM_TRIGGER_RELATIVE_START;
trig.u.rel_duration.is_neg = 1;
switch (appt.advanceUnits) {
case advMinutes:
trig.u.rel_duration.minutes = appt.advance;
break;
case advHours:
trig.u.rel_duration.hours = appt.advance;
break;
case advDays:
trig.u.rel_duration.days = appt.advance;
break;
}
cal_component_alarm_set_trigger (alarm, trig);
cal_component_alarm_set_action (alarm, CAL_ALARM_AUDIO);
}
cal_component_set_transparency (comp, CAL_COMPONENT_TRANSP_NONE);

View File

@ -1,13 +1,3 @@
<!-- ##### FUNCTION cal_client_update_pilot_id ##### -->
<para>
</para>
@client:
@uid:
@pilot_id:
@pilot_status:
<!-- ##### FUNCTION cal_client_load_calendar ##### -->
<para>
@ -17,18 +7,14 @@
@str_uri:
@Returns:
<!-- ##### ENUM CalClientLoadStatus ##### -->
<para>
These values describe the status of a calendar load or create
request. After asking a calendar factory to load or create a
calendar, the provided listener will get notification about the
result in asynchronous fashion. Such notification is represented
by one of these enumeration values. For values other than
#CAL_CLIENT_LOAD_SUCCESS, the #CalClient object will not accept
any other operations on the calendar and it should just be
destroyed.
</para>
<!-- ##### FUNCTION cal_client_create_calendar ##### -->
<para>
</para>
@client:
@str_uri:
@Returns:
<!-- ##### FUNCTION cal_client_get_events_in_range ##### -->
<para>
@ -63,14 +49,28 @@
@client:
@Returns:
<!-- ##### FUNCTION cal_client_create_calendar ##### -->
<!-- ##### FUNCTION cal_client_update_pilot_id ##### -->
<para>
</para>
@client:
@str_uri:
@Returns:
@uid:
@pilot_id:
@pilot_status:
<!-- ##### ENUM CalClientLoadStatus ##### -->
<para>
These values describe the status of a calendar load or create
request. After asking a calendar factory to load or create a
calendar, the provided listener will get notification about the
result in asynchronous fashion. Such notification is represented
by one of these enumeration values. For values other than
#CAL_CLIENT_LOAD_SUCCESS, the #CalClient object will not accept
any other operations on the calendar and it should just be
destroyed.
</para>
<!-- ##### FUNCTION cal_client_get_uid_by_pilot_id ##### -->
<para>

View File

@ -1,3 +1,128 @@
<USER_FUNCTION>
<NAME>CalRecurInstanceFn</NAME>
<RETURNS>gboolean </RETURNS>
CalComponent *comp,
time_t instance_start,
time_t instance_end,
gpointer data
</USER_FUNCTION>
<FUNCTION>
<NAME>cal_recur_generate_instances</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp,time_t start,time_t end,CalRecurInstanceFn cb,gpointer cb_data
</FUNCTION>
<TYPEDEF>
<NAME>CalObjInstance</NAME>
typedef struct {
char *uid; /* UID of the object */
time_t start; /* Start time of instance */
time_t end; /* End time of instance */
} CalObjInstance;
</TYPEDEF>
<FUNCTION>
<NAME>cal_obj_instance_list_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<ENUM>
<NAME>CalObjType</NAME>
typedef enum {
CALOBJ_TYPE_EVENT = 1 << 0,
CALOBJ_TYPE_TODO = 1 << 1,
CALOBJ_TYPE_JOURNAL = 1 << 2,
CALOBJ_TYPE_ANY = 0x07
} CalObjType;
</ENUM>
<FUNCTION>
<NAME>cal_obj_uid_list_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<FUNCTION>
<NAME>isodate_from_time_t</NAME>
<RETURNS>char *</RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_add_minutes</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int minutes
</FUNCTION>
<FUNCTION>
<NAME>time_add_day</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int days
</FUNCTION>
<FUNCTION>
<NAME>time_add_week</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int weeks
</FUNCTION>
<FUNCTION>
<NAME>time_add_month</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int months
</FUNCTION>
<FUNCTION>
<NAME>time_add_year</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int years
</FUNCTION>
<FUNCTION>
<NAME>time_days_in_month</NAME>
<RETURNS>int </RETURNS>
int year, int month
</FUNCTION>
<FUNCTION>
<NAME>time_from_day</NAME>
<RETURNS>time_t </RETURNS>
int year, int month, int day
</FUNCTION>
<FUNCTION>
<NAME>time_year_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_year_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>print_time_t</NAME>
<RETURNS>void </RETURNS>
time_t t
</FUNCTION>
<MACRO>
<NAME>CAL_COMPONENT_TYPE</NAME>
#define CAL_COMPONENT_TYPE (cal_component_get_type ())
@ -594,6 +719,16 @@ typedef struct {
CalComponent *comp
</FUNCTION>
<FUNCTION>
<NAME>cal_component_add_alarm</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp, CalComponentAlarm *alarm
</FUNCTION>
<FUNCTION>
<NAME>cal_component_remove_alarm</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp, const char *auid
</FUNCTION>
<FUNCTION>
<NAME>cal_component_get_alarm_uids</NAME>
<RETURNS>GList *</RETURNS>
CalComponent *comp
@ -604,16 +739,16 @@ CalComponent *comp
CalComponent *comp, const char *auid
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarm_free</NAME>
<RETURNS>void </RETURNS>
CalComponentAlarm *alarm
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarms_free</NAME>
<RETURNS>void </RETURNS>
CalComponentAlarms *alarms
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarm_new</NAME>
<RETURNS>CalComponentAlarm *</RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarm_get_uid</NAME>
<RETURNS>const char *</RETURNS>
CalComponentAlarm *alarm
@ -638,128 +773,8 @@ CalComponentAlarm *alarm, CalAlarmTrigger *trigger
<RETURNS>void </RETURNS>
CalComponentAlarm *alarm, CalAlarmTrigger trigger
</FUNCTION>
<USER_FUNCTION>
<NAME>CalRecurInstanceFn</NAME>
<RETURNS>gboolean </RETURNS>
CalComponent *comp,
time_t instance_start,
time_t instance_end,
gpointer data
</USER_FUNCTION>
<FUNCTION>
<NAME>cal_recur_generate_instances</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp,time_t start,time_t end,CalRecurInstanceFn cb,gpointer cb_data
</FUNCTION>
<TYPEDEF>
<NAME>CalObjInstance</NAME>
typedef struct {
char *uid; /* UID of the object */
time_t start; /* Start time of instance */
time_t end; /* End time of instance */
} CalObjInstance;
</TYPEDEF>
<FUNCTION>
<NAME>cal_obj_instance_list_free</NAME>
<NAME>cal_component_alarm_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<ENUM>
<NAME>CalObjType</NAME>
typedef enum {
CALOBJ_TYPE_EVENT = 1 << 0,
CALOBJ_TYPE_TODO = 1 << 1,
CALOBJ_TYPE_JOURNAL = 1 << 2,
CALOBJ_TYPE_ANY = 0x07
} CalObjType;
</ENUM>
<FUNCTION>
<NAME>cal_obj_uid_list_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<FUNCTION>
<NAME>isodate_from_time_t</NAME>
<RETURNS>char *</RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_add_minutes</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int minutes
</FUNCTION>
<FUNCTION>
<NAME>time_add_day</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int days
</FUNCTION>
<FUNCTION>
<NAME>time_add_week</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int weeks
</FUNCTION>
<FUNCTION>
<NAME>time_add_month</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int months
</FUNCTION>
<FUNCTION>
<NAME>time_add_year</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int years
</FUNCTION>
<FUNCTION>
<NAME>time_days_in_month</NAME>
<RETURNS>int </RETURNS>
int year, int month
</FUNCTION>
<FUNCTION>
<NAME>time_from_day</NAME>
<RETURNS>time_t </RETURNS>
int year, int month, int day
</FUNCTION>
<FUNCTION>
<NAME>time_year_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_year_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>print_time_t</NAME>
<RETURNS>void </RETURNS>
time_t t
CalComponentAlarm *alarm
</FUNCTION>

View File

@ -1,73 +1,14 @@
<!-- ##### ENUM CalComponentAlarmTriggerRelated ##### -->
<!-- ##### ENUM CalComponentAlarmAction ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_START:
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_END:
<!-- ##### FUNCTION cal_recur_free ##### -->
<para>
</para>
@r:
<!-- ##### ENUM CalRecurType ##### -->
<para>
</para>
@CAL_RECUR_YEARLY:
@CAL_RECUR_MONTHLY:
@CAL_RECUR_WEEKLY:
@CAL_RECUR_DAILY:
@CAL_RECUR_HOURLY:
@CAL_RECUR_MINUTELY:
@CAL_RECUR_SECONDLY:
<!-- ##### TYPEDEF CalComponentAlarmTrigger ##### -->
<para>
</para>
<!-- ##### FUNCTION cal_component_get_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### FUNCTION get_time_t_hour ##### -->
<para>
</para>
@t:
@Returns:
<!-- ##### FUNCTION cal_component_alarm_free_trigger ##### -->
<para>
</para>
@trigger: <!--
Local variables:
mode: sgml
sgml-parent-document: ("../../../evolution-devel-guide.sgml" "book" "refsect2" "")
End:
-->
<!-- ##### FUNCTION time_day_hour ##### -->
<para>
</para>
@t:
@hour:
@Returns:
@CAL_COMPONENT_ALARM_NONE:
@CAL_COMPONENT_ALARM_AUDIO:
@CAL_COMPONENT_ALARM_DISPLAY:
@CAL_COMPONENT_ALARM_EMAIL:
@CAL_COMPONENT_ALARM_PROCEDURE:
@CAL_COMPONENT_ALARM_UNKNOWN:
<!-- ##### FUNCTION time_from_isodate ##### -->
<para>
@ -85,6 +26,163 @@ End:
@comp:
@pilot_status:
<!-- ##### FUNCTION cal_recur_from_icalrecurrencetype ##### -->
<para>
</para>
@ir:
@Returns:
<!-- ##### FUNCTION get_time_t_hour ##### -->
<para>
</para>
@t:
@Returns:
<!-- ##### FUNCTION time_from_start_duration ##### -->
<para>
</para>
@start:
@duration:
@Returns:
<!-- ##### ENUM CalRecurType ##### -->
<para>
</para>
@CAL_RECUR_YEARLY:
@CAL_RECUR_MONTHLY:
@CAL_RECUR_WEEKLY:
@CAL_RECUR_DAILY:
@CAL_RECUR_HOURLY:
@CAL_RECUR_MINUTELY:
@CAL_RECUR_SECONDLY:
<!-- ##### FUNCTION parse_date ##### -->
<para>
</para>
@str:
@Returns:
<!-- ##### FUNCTION cal_component_get_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### ENUM CalComponentAlarmTriggerRelated ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_START:
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_END:
<!-- ##### FUNCTION isodiff_to_secs ##### -->
<para>
</para>
@str:
@Returns:
<!-- ##### FUNCTION cal_recur_free ##### -->
<para>
</para>
@r:
<!-- ##### FUNCTION time_from_icaltimetype ##### -->
<para>
</para>
@itt:
@Returns:
<!-- ##### FUNCTION time_day_hour ##### -->
<para>
</para>
@t:
@hour:
@Returns:
<!-- ##### FUNCTION cal_component_get_first_alarm ##### -->
<para>
</para>
@comp:
@Returns:
<!-- ##### STRUCT CalComponentPrivate ##### -->
<para>
</para>
<!-- ##### FUNCTION isodiff_from_secs ##### -->
<para>
</para>
@secs:
@Returns:
<!-- ##### FUNCTION cal_component_alarm_free_trigger ##### -->
<para>
</para>
@trigger: <!--
Local variables:
mode: sgml
sgml-parent-document: ("../../../evolution-devel-guide.sgml" "book" "refsect2" "")
End:
-->
<!-- ##### TYPEDEF CalRecurrence ##### -->
<para>
</para>
<!-- ##### FUNCTION cal_alarm_instance_list_free ##### -->
<para>
</para>
@list:
<!-- ##### FUNCTION cal_component_set_pilot_status ##### -->
<para>
</para>
@comp:
@pilot_status:
<!-- ##### FUNCTION cal_component_set_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### STRUCT CalObjTime ##### -->
<para>
@ -97,110 +195,6 @@ End:
@minute:
@second:
<!-- ##### STRUCT CalComponentPrivate ##### -->
<para>
</para>
<!-- ##### ENUM CalComponentAlarmTriggerType ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATIVE:
@CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE:
<!-- ##### FUNCTION cal_recur_from_icalrecurrencetype ##### -->
<para>
</para>
@ir:
@Returns:
<!-- ##### FUNCTION cal_alarm_instance_list_free ##### -->
<para>
</para>
@list:
<!-- ##### FUNCTION isodiff_to_secs ##### -->
<para>
</para>
@str:
@Returns:
<!-- ##### FUNCTION cal_component_get_first_alarm ##### -->
<para>
</para>
@comp:
@Returns:
<!-- ##### TYPEDEF CalRecurrence ##### -->
<para>
</para>
<!-- ##### FUNCTION cal_component_get_next_alarm ##### -->
<para>
</para>
@comp:
@Returns:
<!-- ##### FUNCTION time_from_icaltimetype ##### -->
<para>
</para>
@itt:
@Returns:
<!-- ##### ENUM CalComponentAlarmAction ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_NONE:
@CAL_COMPONENT_ALARM_AUDIO:
@CAL_COMPONENT_ALARM_DISPLAY:
@CAL_COMPONENT_ALARM_EMAIL:
@CAL_COMPONENT_ALARM_PROCEDURE:
@CAL_COMPONENT_ALARM_UNKNOWN:
<!-- ##### FUNCTION time_from_start_duration ##### -->
<para>
</para>
@start:
@duration:
@Returns:
<!-- ##### FUNCTION cal_component_set_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### FUNCTION isodiff_from_secs ##### -->
<para>
</para>
@secs:
@Returns:
<!-- ##### FUNCTION format_simple_hour ##### -->
<para>
@ -210,19 +204,25 @@ End:
@use_am_pm:
@Returns:
<!-- ##### FUNCTION cal_component_set_pilot_status ##### -->
<!-- ##### FUNCTION cal_component_get_next_alarm ##### -->
<para>
</para>
@comp:
@pilot_status:
@Returns:
<!-- ##### FUNCTION parse_date ##### -->
<!-- ##### ENUM CalComponentAlarmTriggerType ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATIVE:
@CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE:
<!-- ##### TYPEDEF CalComponentAlarmTrigger ##### -->
<para>
</para>
@str:
@Returns:

View File

@ -1,13 +1,3 @@
<!-- ##### FUNCTION cal_client_update_pilot_id ##### -->
<para>
</para>
@client:
@uid:
@pilot_id:
@pilot_status:
<!-- ##### FUNCTION cal_client_load_calendar ##### -->
<para>
@ -17,18 +7,14 @@
@str_uri:
@Returns:
<!-- ##### ENUM CalClientLoadStatus ##### -->
<para>
These values describe the status of a calendar load or create
request. After asking a calendar factory to load or create a
calendar, the provided listener will get notification about the
result in asynchronous fashion. Such notification is represented
by one of these enumeration values. For values other than
#CAL_CLIENT_LOAD_SUCCESS, the #CalClient object will not accept
any other operations on the calendar and it should just be
destroyed.
</para>
<!-- ##### FUNCTION cal_client_create_calendar ##### -->
<para>
</para>
@client:
@str_uri:
@Returns:
<!-- ##### FUNCTION cal_client_get_events_in_range ##### -->
<para>
@ -63,14 +49,28 @@
@client:
@Returns:
<!-- ##### FUNCTION cal_client_create_calendar ##### -->
<!-- ##### FUNCTION cal_client_update_pilot_id ##### -->
<para>
</para>
@client:
@str_uri:
@Returns:
@uid:
@pilot_id:
@pilot_status:
<!-- ##### ENUM CalClientLoadStatus ##### -->
<para>
These values describe the status of a calendar load or create
request. After asking a calendar factory to load or create a
calendar, the provided listener will get notification about the
result in asynchronous fashion. Such notification is represented
by one of these enumeration values. For values other than
#CAL_CLIENT_LOAD_SUCCESS, the #CalClient object will not accept
any other operations on the calendar and it should just be
destroyed.
</para>
<!-- ##### FUNCTION cal_client_get_uid_by_pilot_id ##### -->
<para>

View File

@ -1,3 +1,128 @@
<USER_FUNCTION>
<NAME>CalRecurInstanceFn</NAME>
<RETURNS>gboolean </RETURNS>
CalComponent *comp,
time_t instance_start,
time_t instance_end,
gpointer data
</USER_FUNCTION>
<FUNCTION>
<NAME>cal_recur_generate_instances</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp,time_t start,time_t end,CalRecurInstanceFn cb,gpointer cb_data
</FUNCTION>
<TYPEDEF>
<NAME>CalObjInstance</NAME>
typedef struct {
char *uid; /* UID of the object */
time_t start; /* Start time of instance */
time_t end; /* End time of instance */
} CalObjInstance;
</TYPEDEF>
<FUNCTION>
<NAME>cal_obj_instance_list_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<ENUM>
<NAME>CalObjType</NAME>
typedef enum {
CALOBJ_TYPE_EVENT = 1 << 0,
CALOBJ_TYPE_TODO = 1 << 1,
CALOBJ_TYPE_JOURNAL = 1 << 2,
CALOBJ_TYPE_ANY = 0x07
} CalObjType;
</ENUM>
<FUNCTION>
<NAME>cal_obj_uid_list_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<FUNCTION>
<NAME>isodate_from_time_t</NAME>
<RETURNS>char *</RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_add_minutes</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int minutes
</FUNCTION>
<FUNCTION>
<NAME>time_add_day</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int days
</FUNCTION>
<FUNCTION>
<NAME>time_add_week</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int weeks
</FUNCTION>
<FUNCTION>
<NAME>time_add_month</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int months
</FUNCTION>
<FUNCTION>
<NAME>time_add_year</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int years
</FUNCTION>
<FUNCTION>
<NAME>time_days_in_month</NAME>
<RETURNS>int </RETURNS>
int year, int month
</FUNCTION>
<FUNCTION>
<NAME>time_from_day</NAME>
<RETURNS>time_t </RETURNS>
int year, int month, int day
</FUNCTION>
<FUNCTION>
<NAME>time_year_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_year_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>print_time_t</NAME>
<RETURNS>void </RETURNS>
time_t t
</FUNCTION>
<MACRO>
<NAME>CAL_COMPONENT_TYPE</NAME>
#define CAL_COMPONENT_TYPE (cal_component_get_type ())
@ -594,6 +719,16 @@ typedef struct {
CalComponent *comp
</FUNCTION>
<FUNCTION>
<NAME>cal_component_add_alarm</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp, CalComponentAlarm *alarm
</FUNCTION>
<FUNCTION>
<NAME>cal_component_remove_alarm</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp, const char *auid
</FUNCTION>
<FUNCTION>
<NAME>cal_component_get_alarm_uids</NAME>
<RETURNS>GList *</RETURNS>
CalComponent *comp
@ -604,16 +739,16 @@ CalComponent *comp
CalComponent *comp, const char *auid
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarm_free</NAME>
<RETURNS>void </RETURNS>
CalComponentAlarm *alarm
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarms_free</NAME>
<RETURNS>void </RETURNS>
CalComponentAlarms *alarms
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarm_new</NAME>
<RETURNS>CalComponentAlarm *</RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>cal_component_alarm_get_uid</NAME>
<RETURNS>const char *</RETURNS>
CalComponentAlarm *alarm
@ -638,128 +773,8 @@ CalComponentAlarm *alarm, CalAlarmTrigger *trigger
<RETURNS>void </RETURNS>
CalComponentAlarm *alarm, CalAlarmTrigger trigger
</FUNCTION>
<USER_FUNCTION>
<NAME>CalRecurInstanceFn</NAME>
<RETURNS>gboolean </RETURNS>
CalComponent *comp,
time_t instance_start,
time_t instance_end,
gpointer data
</USER_FUNCTION>
<FUNCTION>
<NAME>cal_recur_generate_instances</NAME>
<RETURNS>void </RETURNS>
CalComponent *comp,time_t start,time_t end,CalRecurInstanceFn cb,gpointer cb_data
</FUNCTION>
<TYPEDEF>
<NAME>CalObjInstance</NAME>
typedef struct {
char *uid; /* UID of the object */
time_t start; /* Start time of instance */
time_t end; /* End time of instance */
} CalObjInstance;
</TYPEDEF>
<FUNCTION>
<NAME>cal_obj_instance_list_free</NAME>
<NAME>cal_component_alarm_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<ENUM>
<NAME>CalObjType</NAME>
typedef enum {
CALOBJ_TYPE_EVENT = 1 << 0,
CALOBJ_TYPE_TODO = 1 << 1,
CALOBJ_TYPE_JOURNAL = 1 << 2,
CALOBJ_TYPE_ANY = 0x07
} CalObjType;
</ENUM>
<FUNCTION>
<NAME>cal_obj_uid_list_free</NAME>
<RETURNS>void </RETURNS>
GList *list
</FUNCTION>
<FUNCTION>
<NAME>isodate_from_time_t</NAME>
<RETURNS>char *</RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_add_minutes</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int minutes
</FUNCTION>
<FUNCTION>
<NAME>time_add_day</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int days
</FUNCTION>
<FUNCTION>
<NAME>time_add_week</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int weeks
</FUNCTION>
<FUNCTION>
<NAME>time_add_month</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int months
</FUNCTION>
<FUNCTION>
<NAME>time_add_year</NAME>
<RETURNS>time_t </RETURNS>
time_t time, int years
</FUNCTION>
<FUNCTION>
<NAME>time_days_in_month</NAME>
<RETURNS>int </RETURNS>
int year, int month
</FUNCTION>
<FUNCTION>
<NAME>time_from_day</NAME>
<RETURNS>time_t </RETURNS>
int year, int month, int day
</FUNCTION>
<FUNCTION>
<NAME>time_year_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_year_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_month_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_week_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_begin</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>time_day_end</NAME>
<RETURNS>time_t </RETURNS>
time_t t
</FUNCTION>
<FUNCTION>
<NAME>print_time_t</NAME>
<RETURNS>void </RETURNS>
time_t t
CalComponentAlarm *alarm
</FUNCTION>

View File

@ -1,73 +1,14 @@
<!-- ##### ENUM CalComponentAlarmTriggerRelated ##### -->
<!-- ##### ENUM CalComponentAlarmAction ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_START:
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_END:
<!-- ##### FUNCTION cal_recur_free ##### -->
<para>
</para>
@r:
<!-- ##### ENUM CalRecurType ##### -->
<para>
</para>
@CAL_RECUR_YEARLY:
@CAL_RECUR_MONTHLY:
@CAL_RECUR_WEEKLY:
@CAL_RECUR_DAILY:
@CAL_RECUR_HOURLY:
@CAL_RECUR_MINUTELY:
@CAL_RECUR_SECONDLY:
<!-- ##### TYPEDEF CalComponentAlarmTrigger ##### -->
<para>
</para>
<!-- ##### FUNCTION cal_component_get_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### FUNCTION get_time_t_hour ##### -->
<para>
</para>
@t:
@Returns:
<!-- ##### FUNCTION cal_component_alarm_free_trigger ##### -->
<para>
</para>
@trigger: <!--
Local variables:
mode: sgml
sgml-parent-document: ("../../../evolution-devel-guide.sgml" "book" "refsect2" "")
End:
-->
<!-- ##### FUNCTION time_day_hour ##### -->
<para>
</para>
@t:
@hour:
@Returns:
@CAL_COMPONENT_ALARM_NONE:
@CAL_COMPONENT_ALARM_AUDIO:
@CAL_COMPONENT_ALARM_DISPLAY:
@CAL_COMPONENT_ALARM_EMAIL:
@CAL_COMPONENT_ALARM_PROCEDURE:
@CAL_COMPONENT_ALARM_UNKNOWN:
<!-- ##### FUNCTION time_from_isodate ##### -->
<para>
@ -85,6 +26,163 @@ End:
@comp:
@pilot_status:
<!-- ##### FUNCTION cal_recur_from_icalrecurrencetype ##### -->
<para>
</para>
@ir:
@Returns:
<!-- ##### FUNCTION get_time_t_hour ##### -->
<para>
</para>
@t:
@Returns:
<!-- ##### FUNCTION time_from_start_duration ##### -->
<para>
</para>
@start:
@duration:
@Returns:
<!-- ##### ENUM CalRecurType ##### -->
<para>
</para>
@CAL_RECUR_YEARLY:
@CAL_RECUR_MONTHLY:
@CAL_RECUR_WEEKLY:
@CAL_RECUR_DAILY:
@CAL_RECUR_HOURLY:
@CAL_RECUR_MINUTELY:
@CAL_RECUR_SECONDLY:
<!-- ##### FUNCTION parse_date ##### -->
<para>
</para>
@str:
@Returns:
<!-- ##### FUNCTION cal_component_get_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### ENUM CalComponentAlarmTriggerRelated ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_START:
@CAL_COMPONENT_ALARM_TRIGGER_RELATED_END:
<!-- ##### FUNCTION isodiff_to_secs ##### -->
<para>
</para>
@str:
@Returns:
<!-- ##### FUNCTION cal_recur_free ##### -->
<para>
</para>
@r:
<!-- ##### FUNCTION time_from_icaltimetype ##### -->
<para>
</para>
@itt:
@Returns:
<!-- ##### FUNCTION time_day_hour ##### -->
<para>
</para>
@t:
@hour:
@Returns:
<!-- ##### FUNCTION cal_component_get_first_alarm ##### -->
<para>
</para>
@comp:
@Returns:
<!-- ##### STRUCT CalComponentPrivate ##### -->
<para>
</para>
<!-- ##### FUNCTION isodiff_from_secs ##### -->
<para>
</para>
@secs:
@Returns:
<!-- ##### FUNCTION cal_component_alarm_free_trigger ##### -->
<para>
</para>
@trigger: <!--
Local variables:
mode: sgml
sgml-parent-document: ("../../../evolution-devel-guide.sgml" "book" "refsect2" "")
End:
-->
<!-- ##### TYPEDEF CalRecurrence ##### -->
<para>
</para>
<!-- ##### FUNCTION cal_alarm_instance_list_free ##### -->
<para>
</para>
@list:
<!-- ##### FUNCTION cal_component_set_pilot_status ##### -->
<para>
</para>
@comp:
@pilot_status:
<!-- ##### FUNCTION cal_component_set_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### STRUCT CalObjTime ##### -->
<para>
@ -97,110 +195,6 @@ End:
@minute:
@second:
<!-- ##### STRUCT CalComponentPrivate ##### -->
<para>
</para>
<!-- ##### ENUM CalComponentAlarmTriggerType ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATIVE:
@CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE:
<!-- ##### FUNCTION cal_recur_from_icalrecurrencetype ##### -->
<para>
</para>
@ir:
@Returns:
<!-- ##### FUNCTION cal_alarm_instance_list_free ##### -->
<para>
</para>
@list:
<!-- ##### FUNCTION isodiff_to_secs ##### -->
<para>
</para>
@str:
@Returns:
<!-- ##### FUNCTION cal_component_get_first_alarm ##### -->
<para>
</para>
@comp:
@Returns:
<!-- ##### TYPEDEF CalRecurrence ##### -->
<para>
</para>
<!-- ##### FUNCTION cal_component_get_next_alarm ##### -->
<para>
</para>
@comp:
@Returns:
<!-- ##### FUNCTION time_from_icaltimetype ##### -->
<para>
</para>
@itt:
@Returns:
<!-- ##### ENUM CalComponentAlarmAction ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_NONE:
@CAL_COMPONENT_ALARM_AUDIO:
@CAL_COMPONENT_ALARM_DISPLAY:
@CAL_COMPONENT_ALARM_EMAIL:
@CAL_COMPONENT_ALARM_PROCEDURE:
@CAL_COMPONENT_ALARM_UNKNOWN:
<!-- ##### FUNCTION time_from_start_duration ##### -->
<para>
</para>
@start:
@duration:
@Returns:
<!-- ##### FUNCTION cal_component_set_pilot_id ##### -->
<para>
</para>
@comp:
@pilot_id:
<!-- ##### FUNCTION isodiff_from_secs ##### -->
<para>
</para>
@secs:
@Returns:
<!-- ##### FUNCTION format_simple_hour ##### -->
<para>
@ -210,19 +204,25 @@ End:
@use_am_pm:
@Returns:
<!-- ##### FUNCTION cal_component_set_pilot_status ##### -->
<!-- ##### FUNCTION cal_component_get_next_alarm ##### -->
<para>
</para>
@comp:
@pilot_status:
@Returns:
<!-- ##### FUNCTION parse_date ##### -->
<!-- ##### ENUM CalComponentAlarmTriggerType ##### -->
<para>
</para>
@CAL_COMPONENT_ALARM_TRIGGER_RELATIVE:
@CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE:
<!-- ##### TYPEDEF CalComponentAlarmTrigger ##### -->
<para>
</para>
@str:
@Returns: