Function

ECalutil_generate_alarms_for_uid_sync

since: 3.48

Declaration [src]

ECalComponentAlarms*
e_cal_util_generate_alarms_for_uid_sync (
  _ECalClient* client,
  const gchar* uid,
  time_t start,
  time_t end,
  ECalComponentAlarmAction* omit,
  ECalRecurResolveTimezoneCb resolve_tzid,
  gpointer user_data,
  ICalTimezone* default_timezone,
  gint def_reminder_before_start_seconds,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Generates alarm instances for a calendar component with UID uid, which is stored within the client. In contrast to e_cal_util_generate_alarms_for_comp(), this function handles detached instances of recurring events properly.

The def_reminder_before_start_seconds, if not negative, causes addition of an alarm, which will trigger a “display” alarm these seconds before start of the event.

Returns the instances structure, or NULL if no alarm instances occurred in the specified time range. Free the returned structure with e_cal_component_alarms_free(), when no longer needed.

Available since: 3.48

Parameters

client

Type: _ECalClient*

An ECalClient.

The argument can be NULL.
The data is owned by the caller of the function.
uid

Type: const gchar*

A component UID to generate alarms for.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
start

Type: time_t

Start time.

end

Type: time_t

End time.

omit

Type: ECalComponentAlarmAction

Alarm types to omit.

The data is owned by the caller of the function.
resolve_tzid

Type: ECalRecurResolveTimezoneCb

Callback for resolving timezones.

user_data

Type: gpointer

Data to be passed to the resolve_tzid callback.

The argument can be NULL.
The data is owned by the caller of the function.
default_timezone

Type: None

The timezone used to resolve DATE and floating DATE-TIME values.

The data is owned by the caller of the function.
def_reminder_before_start_seconds

Type: gint

Add default reminder before start in seconds, when not negative value.

cancellable

Type: GCancellable

Optional GCancellable object, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the function if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: ECalComponentAlarms

A list of all the alarms found for the given component in the given time range.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.