ECalClient

## ECalClient ECalClient |

## Synopsis

    struct              ECalClient;
    #define             CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS
    #define             CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS
    #define             CAL_BACKEND_PROPERTY_DEFAULT_OBJECT
    enum                ECalClientSourceType;
    #define             E_CAL_CLIENT_ERROR
    enum                ECalClientError;
    const gchar *       e_cal_client_error_to_string        (ECalClientError code);
    EClient *           e_cal_client_connect_sync           (ESource *source,
                                                             ECalClientSourceType source_type,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_connect                (ESource *source,
                                                             ECalClientSourceType source_type,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    EClient *           e_cal_client_connect_finish         (GAsyncResult *result,
                                                             GError **error);
    ECalClientSourceType e_cal_client_get_source_type       (ECalClient *client);
    const gchar *       e_cal_client_get_local_attachment_store
                                                            (ECalClient *client);
    void                e_cal_client_set_default_timezone   (ECalClient *client,
                                                             icaltimezone *zone);
    icaltimezone *      e_cal_client_get_default_timezone   (ECalClient *client);
    gboolean            e_cal_client_check_one_alarm_only   (ECalClient *client);
    gboolean            e_cal_client_check_save_schedules   (ECalClient *client);
    gboolean            e_cal_client_check_organizer_must_attend
                                                            (ECalClient *client);
    gboolean            e_cal_client_check_organizer_must_accept
                                                            (ECalClient *client);
    gboolean            e_cal_client_check_recurrences_no_master
                                                            (ECalClient *client);
    void                e_cal_client_free_icalcomp_slist    (GSList *icalcomps);
    void                e_cal_client_free_ecalcomp_slist    (GSList *ecalcomps);
    icaltimezone *      e_cal_client_resolve_tzid_cb        (const gchar *tzid,
                                                             gpointer data);
    void                e_cal_client_generate_instances     (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             GCancellable *cancellable,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data,
                                                             GDestroyNotify destroy_cb_data);
    void                e_cal_client_generate_instances_sync
                                                            (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data);
    void                e_cal_client_generate_instances_for_object
                                                            (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             time_t start,
                                                             time_t end,
                                                             GCancellable *cancellable,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data,
                                                             GDestroyNotify destroy_cb_data);
    void                e_cal_client_generate_instances_for_object_sync
                                                            (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             time_t start,
                                                             time_t end,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data);
    gchar *             e_cal_client_get_component_as_string
                                                            (ECalClient *client,
                                                             icalcomponent *icalcomp);
    void                e_cal_client_get_default_object     (ECalClient *client,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_default_object_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             icalcomponent **out_icalcomp,
                                                             GError **error);
    gboolean            e_cal_client_get_default_object_sync
                                                            (ECalClient *client,
                                                             icalcomponent **out_icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_object             (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_object_finish      (ECalClient *client,
                                                             GAsyncResult *result,
                                                             icalcomponent **out_icalcomp,
                                                             GError **error);
    gboolean            e_cal_client_get_object_sync        (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             icalcomponent **out_icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_objects_for_uid    (ECalClient *client,
                                                             const gchar *uid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_objects_for_uid_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_ecalcomps,
                                                             GError **error);
    gboolean            e_cal_client_get_objects_for_uid_sync
                                                            (ECalClient *client,
                                                             const gchar *uid,
                                                             GSList **out_ecalcomps,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_object_list        (ECalClient *client,
                                                             const gchar *sexp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_object_list_finish (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_icalcomps,
                                                             GError **error);
    gboolean            e_cal_client_get_object_list_sync   (ECalClient *client,
                                                             const gchar *sexp,
                                                             GSList **out_icalcomps,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_object_list_as_comps
                                                            (ECalClient *client,
                                                             const gchar *sexp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_object_list_as_comps_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_ecalcomps,
                                                             GError **error);
    gboolean            e_cal_client_get_object_list_as_comps_sync
                                                            (ECalClient *client,
                                                             const gchar *sexp,
                                                             GSList **out_ecalcomps,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_free_busy          (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             const GSList *users,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_free_busy_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_get_free_busy_sync     (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             const GSList *users,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_create_object          (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_create_object_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             gchar **out_uid,
                                                             GError **error);
    gboolean            e_cal_client_create_object_sync     (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             gchar **out_uid,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_create_objects         (ECalClient *client,
                                                             GSList *icalcomps,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_create_objects_finish  (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_uids,
                                                             GError **error);
    gboolean            e_cal_client_create_objects_sync    (ECalClient *client,
                                                             GSList *icalcomps,
                                                             GSList **out_uids,
                                                             GCancellable *cancellable,
                                                             GError **error);
    enum                ECalObjModType;
    void                e_cal_client_modify_object          (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_modify_object_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_modify_object_sync     (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_modify_objects         (ECalClient *client,
                                                             GSList *comps,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_modify_objects_finish  (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_modify_objects_sync    (ECalClient *client,
                                                             GSList *comps,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_remove_object          (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_remove_object_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_remove_object_sync     (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_remove_objects         (ECalClient *client,
                                                             const GSList *ids,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_remove_objects_finish  (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_remove_objects_sync    (ECalClient *client,
                                                             const GSList *ids,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_receive_objects        (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_receive_objects_finish (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_receive_objects_sync   (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_send_objects           (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_send_objects_finish    (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_users,
                                                             icalcomponent **out_modified_icalcomp,
                                                             GError **error);
    gboolean            e_cal_client_send_objects_sync      (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GSList **out_users,
                                                             icalcomponent **out_modified_icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_attachment_uris    (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_attachment_uris_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_attachment_uris,
                                                             GError **error);
    gboolean            e_cal_client_get_attachment_uris_sync
                                                            (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             GSList **out_attachment_uris,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_discard_alarm          (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             const gchar *auid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_discard_alarm_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_discard_alarm_sync     (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             const gchar *auid,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_view               (ECalClient *client,
                                                             const gchar *sexp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_view_finish        (ECalClient *client,
                                                             GAsyncResult *result,
                                                             ECalClientView **out_view,
                                                             GError **error);
    gboolean            e_cal_client_get_view_sync          (ECalClient *client,
                                                             const gchar *sexp,
                                                             ECalClientView **out_view,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_get_timezone           (ECalClient *client,
                                                             const gchar *tzid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_get_timezone_finish    (ECalClient *client,
                                                             GAsyncResult *result,
                                                             icaltimezone **out_zone,
                                                             GError **error);
    gboolean            e_cal_client_get_timezone_sync      (ECalClient *client,
                                                             const gchar *tzid,
                                                             icaltimezone **out_zone,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                e_cal_client_add_timezone           (ECalClient *client,
                                                             icaltimezone *zone,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            e_cal_client_add_timezone_finish    (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);
    gboolean            e_cal_client_add_timezone_sync      (ECalClient *client,
                                                             icaltimezone *zone,
                                                             GCancellable *cancellable,
                                                             GError **error);

    ECalClient *        e_cal_client_new                    (ESource *source,
                                                             ECalClientSourceType source_type,
                                                             GError **error);
    GError *            e_cal_client_error_create           (ECalClientError code,
                                                             const gchar *custom_msg);

## Object Hierarchy

      GObject
       +----EClient
             +----ECalClient

## Implemented Interfaces

ECalClient implements GInitable, GAsyncInitable and ETimezoneCache.

## Properties

      "default-timezone"         gpointer              : Read / Write
      "source-type"              ECalClientSourceType  : Read / Write / Construct Only

## Signals

      "free-busy-data"                                 : Run First

## Description

## Details

### struct ECalClient

    struct ECalClient;

Contains only private data that should be read and manipulated using the functions below.

Since 3.2

### CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS

    #define CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS		"cal-email-address"

FIXME: Document me.

Since 3.2

### CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS

    #define CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS "alarm-email-address"

FIXME: Document me.

Since 3.2

### CAL_BACKEND_PROPERTY_DEFAULT_OBJECT

    #define CAL_BACKEND_PROPERTY_DEFAULT_OBJECT		"default-object"

FIXME: Document me.

Since 3.2

### enum ECalClientSourceType

    typedef enum {
    	E_CAL_CLIENT_SOURCE_TYPE_EVENTS,
    	E_CAL_CLIENT_SOURCE_TYPE_TASKS,
    	E_CAL_CLIENT_SOURCE_TYPE_MEMOS,
    	E_CAL_CLIENT_SOURCE_TYPE_LAST  /*< skip >*/
    } ECalClientSourceType;

FIXME: Document me!

`E_CAL_CLIENT_SOURCE_TYPE_EVENTS` |
`E_CAL_CLIENT_SOURCE_TYPE_TASKS` |
`E_CAL_CLIENT_SOURCE_TYPE_MEMOS` |
`E_CAL_CLIENT_SOURCE_TYPE_LAST` |

Since 3.2

### E_CAL_CLIENT_ERROR

    #define E_CAL_CLIENT_ERROR e_cal_client_error_quark ()

FIXME: Document me.

Since 3.2

### enum ECalClientError

    typedef enum {
    	E_CAL_CLIENT_ERROR_NO_SUCH_CALENDAR,
    	E_CAL_CLIENT_ERROR_OBJECT_NOT_FOUND,
    	E_CAL_CLIENT_ERROR_INVALID_OBJECT,
    	E_CAL_CLIENT_ERROR_UNKNOWN_USER,
    	E_CAL_CLIENT_ERROR_OBJECT_ID_ALREADY_EXISTS,
    	E_CAL_CLIENT_ERROR_INVALID_RANGE
    } ECalClientError;

FIXME: Document me.

`E_CAL_CLIENT_ERROR_NO_SUCH_CALENDAR` |
`E_CAL_CLIENT_ERROR_OBJECT_NOT_FOUND` |
`E_CAL_CLIENT_ERROR_INVALID_OBJECT` |
`E_CAL_CLIENT_ERROR_UNKNOWN_USER` |
`E_CAL_CLIENT_ERROR_OBJECT_ID_ALREADY_EXISTS` |
`E_CAL_CLIENT_ERROR_INVALID_RANGE` |

Since 3.2

### e_cal_client_error_to_string ()

    const gchar *       e_cal_client_error_to_string        (ECalClientError code);

FIXME: Document me.

Since 3.2

### e_cal_client_connect_sync ()

    EClient *           e_cal_client_connect_sync           (ESource *source,
                                                             ECalClientSourceType source_type,
                                                             GCancellable *cancellable,
                                                             GError **error);

Creates a new ECalClient for `source` and `source_type`. If an error occurs, the function will set `error` and return `FALSE`.

Unlike with `e_cal_client_new()`, there is no need to call `e_client_open_sync()` after obtaining the ECalClient.

For error handling convenience, any error message returned by this function will have a descriptive prefix that includes the display name of `source`.

`source` : | an ESource
`source_type` : | source type of the calendar
`cancellable` : | optional GCancellable object, or `NULL`. [allow-none]
`error` : | return location for a GError, or `NULL`
Returns : | a new ECalClient, or `NULL`

Since 3.8

### e_cal_client_connect ()

    void                e_cal_client_connect                (ESource *source,
                                                             ECalClientSourceType source_type,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously creates a new ECalClient for `source` and `source_type`.

Unlike with `e_cal_client_new()`, there is no need to call `e_client_open()` after obtaining the ECalClient.

When the operation is finished, `callback` will be called. You can then call `e_cal_client_connect_finish()` to get the result of the operation.

`source` : | an ESource
`source_type` : | source tpe of the calendar
`cancellable` : | optional GCancellable object, or `NULL`. [allow-none]
`callback` : | a GAsyncReadyCallback to call when the request is satisfied. [scope async]
`user_data` : | data to pass to the callback function. [closure]

Since 3.8

### e_cal_client_connect_finish ()

    EClient *           e_cal_client_connect_finish         (GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `e_cal_client_connect()`. If an error occurs in connecting to the D-Bus service, the function sets `error` and returns `NULL`.

For error handling convenience, any error message returned by this function will have a descriptive prefix that includes the display name of the ESource passed to `e_cal_client_connect()`.

`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | a new ECalClient, or `NULL`

Since 3.8

### e_cal_client_get_source_type ()

    ECalClientSourceType e_cal_client_get_source_type       (ECalClient *client);

Gets the source type of the calendar client.

`client` : | A calendar client.
Returns : | an ECalClientSourceType value corresponding to the source type of the calendar client.

Since 3.2

### e_cal_client_get_local_attachment_store ()

    const gchar *       e_cal_client_get_local_attachment_store
                                                            (ECalClient *client);

Queries the URL where the calendar attachments are serialized in the local filesystem. This enable clients to operate with the reference to attachments rather than the data itself unless it specifically uses the attachments for open/sending operations.

`client` : | A calendar client.
Returns : | The URL where the attachments are serialized in the local filesystem.

Since 3.2

### e_cal_client_set_default_timezone ()

    void                e_cal_client_set_default_timezone   (ECalClient *client,
                                                             icaltimezone *zone);

Sets the default timezone to use to resolve DATE and floating DATE-TIME values. This will typically be from the user's timezone setting. Call this before using any other object fetching functions.

`client` : | A calendar client.
`zone` : | A timezone object.

Since 3.2

### e_cal_client_get_default_timezone ()

    icaltimezone *      e_cal_client_get_default_timezone   (ECalClient *client);

Returns the default timezone previously set with `e_cal_client_set_default_timezone()`. The returned pointer is owned by the `client` and should not be freed.

`client` : | A calendar client.
Returns : | an icaltimezone

Since 3.2

### e_cal_client_check_one_alarm_only ()

    gboolean            e_cal_client_check_one_alarm_only   (ECalClient *client);

Checks if a calendar supports only one alarm per component.

`client` : | A calendar client.
Returns : | TRUE if the calendar allows only one alarm, FALSE otherwise.

Since 3.2

### e_cal_client_check_save_schedules ()

    gboolean            e_cal_client_check_save_schedules   (ECalClient *client);

Checks whether the calendar saves schedules.

`client` : | A calendar client.
Returns : | TRUE if it saves schedules, FALSE otherwise.

Since 3.2

### e_cal_client_check_organizer_must_attend ()

    gboolean            e_cal_client_check_organizer_must_attend
                                                            (ECalClient *client);

Checks if a calendar forces organizers of meetings to be also attendees.

`client` : | A calendar client.
Returns : | TRUE if the calendar forces organizers to attend meetings, FALSE otherwise.

Since 3.2

### e_cal_client_check_organizer_must_accept ()

    gboolean            e_cal_client_check_organizer_must_accept
                                                            (ECalClient *client);

Checks whether a calendar requires organizer to accept their attendance to meetings.

`client` : | A calendar client.
Returns : | TRUE if the calendar requires organizers to accept, FALSE otherwise.

Since 3.2

### e_cal_client_check_recurrences_no_master ()

    gboolean            e_cal_client_check_recurrences_no_master
                                                            (ECalClient *client);

Checks if the calendar has a master object for recurrences.

`client` : | A calendar client.
Returns : | TRUE if the calendar has a master object for recurrences, FALSE otherwise.

Since 3.2

### e_cal_client_free_icalcomp_slist ()

    void                e_cal_client_free_icalcomp_slist    (GSList *icalcomps);

Frees each element of the `icalcomps` list and the list itself. Each element is an object of type icalcomponent.

`icalcomps` : | list of icalcomponent objects. [element-type icalcomponent]

Since 3.2

### e_cal_client_free_ecalcomp_slist ()

    void                e_cal_client_free_ecalcomp_slist    (GSList *ecalcomps);

Frees each element of the `ecalcomps` list and the list itself. Each element is an object of type ECalComponent.

`ecalcomps` : | list of ECalComponent objects. [element-type ECalComponent]

Since 3.2

### e_cal_client_resolve_tzid_cb ()

    icaltimezone *      e_cal_client_resolve_tzid_cb        (const gchar *tzid,
                                                             gpointer data);

Resolves TZIDs for the recurrence generator.

`tzid` : | ID of the timezone to resolve.
`data` : | Closure data for the callback, in this case ECalClient.
Returns : | The timezone identified by the `tzid` argument, or `NULL` if it could not be found.

Since 3.2

### e_cal_client_generate_instances ()

    void                e_cal_client_generate_instances     (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             GCancellable *cancellable,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data,
                                                             GDestroyNotify destroy_cb_data);

Does a combination of `e_cal_client_get_object_list()` and `e_cal_client_recur_generate_instances()`. Unlike `e_cal_client_generate_instances_sync()`, this returns immediately and the `cb` callback is called asynchronously.

The callback function should do a `g_object_ref()` of the calendar component it gets passed if it intends to keep it around, since it will be unref'ed as soon as the callback returns.

`client` : | A calendar client.
`start` : | Start time for query.
`end` : | End time for query.
`cancellable` : | a GCancellable; can be `NULL`
`cb` : | Callback for each generated instance.
`cb_data` : | Closure data for the callback.
`destroy_cb_data` : | Function to call when the processing is done, to free `cb_data`; can be `NULL`.

Since 3.2

### e_cal_client_generate_instances_sync ()

    void                e_cal_client_generate_instances_sync
                                                            (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data);

Does a combination of `e_cal_client_get_object_list()` and `e_cal_client_recur_generate_instances()`.

The callback function should do a `g_object_ref()` of the calendar component it gets passed if it intends to keep it around, since it will be unreffed as soon as the callback returns.

`client` : | A calendar client
`start` : | Start time for query
`end` : | End time for query
`cb` : | Callback for each generated instance. [closure cb_data][scope call]
`cb_data` : | Closure data for the callback. [closure]

Since 3.2

### e_cal_client_generate_instances_for_object ()

    void                e_cal_client_generate_instances_for_object
                                                            (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             time_t start,
                                                             time_t end,
                                                             GCancellable *cancellable,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data,
                                                             GDestroyNotify destroy_cb_data);

Does a combination of `e_cal_client_get_object_list()` and `e_cal_client_recur_generate_instances()`, like `e_cal_client_generate_instances()`, but for a single object. Unlike `e_cal_client_generate_instances_for_object_sync()`, this returns immediately and the `cb` callback is called asynchronously.

The callback function should do a `g_object_ref()` of the calendar component it gets passed if it intends to keep it around, since it will be unref'ed as soon as the callback returns.

`client` : | A calendar client.
`icalcomp` : | Object to generate instances from.
`start` : | Start time for query.
`end` : | End time for query.
`cancellable` : | a GCancellable; can be `NULL`
`cb` : | Callback for each generated instance.
`cb_data` : | Closure data for the callback.
`destroy_cb_data` : | Function to call when the processing is done, to free `cb_data`; can be `NULL`.

Since 3.2

### e_cal_client_generate_instances_for_object_sync ()

    void                e_cal_client_generate_instances_for_object_sync
                                                            (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             time_t start,
                                                             time_t end,
                                                             ECalRecurInstanceFn cb,
                                                             gpointer cb_data);

Does a combination of `e_cal_client_get_object_list()` and `e_cal_client_recur_generate_instances()`, like `e_cal_client_generate_instances_sync()`, but for a single object.

The callback function should do a `g_object_ref()` of the calendar component it gets passed if it intends to keep it around, since it will be unref'ed as soon as the callback returns.

`client` : | A calendar client
`icalcomp` : | Object to generate instances from
`start` : | Start time for query
`end` : | End time for query
`cb` : | Callback for each generated instance. [closure cb_data][scope call]
`cb_data` : | Closure data for the callback. [closure]

Since 3.2

### e_cal_client_get_component_as_string ()

    gchar *             e_cal_client_get_component_as_string
                                                            (ECalClient *client,
                                                             icalcomponent *icalcomp);

Gets a calendar component as an iCalendar string, with a toplevel VCALENDAR component and all VTIMEZONEs needed for the component.

`client` : | A calendar client.
`icalcomp` : | A calendar component object.
Returns : | the component as a complete iCalendar string, or NULL on failure. The string should be freed with `g_free()`.

Since 3.2

### e_cal_client_get_default_object ()

    void                e_cal_client_get_default_object     (ECalClient *client,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Retrives an icalcomponent from the backend that contains the default values for properties needed. The call is finished by `e_cal_client_get_default_object_finish()` from the `callback`.

`client` : | an ECalClient
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_default_object_finish ()

    gboolean            e_cal_client_get_default_object_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             icalcomponent **out_icalcomp,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_default_object()` and sets `out_icalcomp` to an icalcomponent from the backend that contains the default values for properties needed. This `out_icalcomp` should be freed with `icalcomponent_free()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_icalcomp` : | Return value for the default calendar object. [out]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_default_object_sync ()

    gboolean            e_cal_client_get_default_object_sync
                                                            (ECalClient *client,
                                                             icalcomponent **out_icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);

Retrives an icalcomponent from the backend that contains the default values for properties needed. This `out_icalcomp` should be freed with `icalcomponent_free()`.

`client` : | an ECalClient
`out_icalcomp` : | Return value for the default calendar object. [out]
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_object ()

    void                e_cal_client_get_object             (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Queries a calendar for a calendar component object based on its unique identifier. The call is finished by `e_cal_client_get_object_finish()` from the `callback`.

Use `e_cal_client_get_objects_for_uid()` to get list of all objects for the given uid, which includes master object and all detached instances.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component.
`rid` : | Recurrence identifier.
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_object_finish ()

    gboolean            e_cal_client_get_object_finish      (ECalClient *client,
                                                             GAsyncResult *result,
                                                             icalcomponent **out_icalcomp,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_object()` and sets `out_icalcomp` to queried component. This function always returns master object for a case of `rid` being NULL or an empty string. This component should be freed with `icalcomponent_free()`.

Use `e_cal_client_get_objects_for_uid()` to get list of all objects for the given uid, which includes master object and all detached instances.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_icalcomp` : | Return value for the calendar component object. [out]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_object_sync ()

    gboolean            e_cal_client_get_object_sync        (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             icalcomponent **out_icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);

Queries a calendar for a calendar component object based on its unique identifier. This function always returns master object for a case of `rid` being NULL or an empty string. This component should be freed with `icalcomponent_free()`.

Use `e_cal_client_get_objects_for_uid_sync()` to get list of all objects for the given uid, which includes master object and all detached instances.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component.
`rid` : | Recurrence identifier.
`out_icalcomp` : | Return value for the calendar component object. [out]
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_objects_for_uid ()

    void                e_cal_client_get_objects_for_uid    (ECalClient *client,
                                                             const gchar *uid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Queries a calendar for all calendar components with the given unique ID. This will return any recurring event and all its detached recurrences. For non-recurring events, it will just return the object with that ID. The call is finished by `e_cal_client_get_objects_for_uid_finish()` from the `callback`.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_objects_for_uid_finish ()

    gboolean            e_cal_client_get_objects_for_uid_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_ecalcomps,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_objects_for_uid()` and sets `out_ecalcomps` to a list of ECalComponents corresponding to found components for a given uid of the same type as this client. This list should be freed with `e_cal_client_free_ecalcomp_slist()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_ecalcomps` : | Return location for the list of objects obtained from the backend. [out][transfer full][element-type ECalComponent]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_objects_for_uid_sync ()

    gboolean            e_cal_client_get_objects_for_uid_sync
                                                            (ECalClient *client,
                                                             const gchar *uid,
                                                             GSList **out_ecalcomps,
                                                             GCancellable *cancellable,
                                                             GError **error);

Queries a calendar for all calendar components with the given unique ID. This will return any recurring event and all its detached recurrences. For non-recurring events, it will just return the object with that ID. This list should be freed with `e_cal_client_free_ecalcomp_slist()`.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component
`out_ecalcomps` : | Return location for the list of objects obtained from the backend. [out][transfer full][element-type ECalComponent]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_object_list ()

    void                e_cal_client_get_object_list        (ECalClient *client,
                                                             const gchar *sexp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Gets a list of objects from the calendar that match the query specified by the `sexp` argument, returning matching objects as a list of icalcomponent-s. The call is finished by `e_cal_client_get_object_list_finish()` from the `callback`.

`client` : | an ECalClient
`sexp` : | an S-expression representing the query
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_object_list_finish ()

    gboolean            e_cal_client_get_object_list_finish (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_icalcomps,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_object_list()` and sets `out_icalcomps` to a matching list of icalcomponent-s. This list should be freed with `e_cal_client_free_icalcomp_slist()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_icalcomps` : | list of matching icalcomponents. [out][element-type icalcomponent]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_object_list_sync ()

    gboolean            e_cal_client_get_object_list_sync   (ECalClient *client,
                                                             const gchar *sexp,
                                                             GSList **out_icalcomps,
                                                             GCancellable *cancellable,
                                                             GError **error);

Gets a list of objects from the calendar that match the query specified by the `sexp` argument. The objects will be returned in the `out_icalcomps` argument, which is a list of icalcomponent. This list should be freed with `e_cal_client_free_icalcomp_slist()`.

`client` : | an ECalClient
`sexp` : | an S-expression representing the query
`out_icalcomps` : | list of matching icalcomponents. [out][element-type icalcomponent]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_object_list_as_comps ()

    void                e_cal_client_get_object_list_as_comps
                                                            (ECalClient *client,
                                                             const gchar *sexp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Gets a list of objects from the calendar that match the query specified by the `sexp` argument, returning matching objects as a list of ECalComponent-s. The call is finished by `e_cal_client_get_object_list_as_comps_finish()` from the `callback`.

`client` : | an ECalClient
`sexp` : | an S-expression representing the query
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_object_list_as_comps_finish ()

    gboolean            e_cal_client_get_object_list_as_comps_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_ecalcomps,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_object_list_as_comps()` and sets `out_ecalcomps` to a matching list of ECalComponent-s. This list should be freed with `e_cal_client_free_ecalcomp_slist()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_ecalcomps` : | list of matching ECalComponents. [out][element-type ECalComponent]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_object_list_as_comps_sync ()

    gboolean            e_cal_client_get_object_list_as_comps_sync
                                                            (ECalClient *client,
                                                             const gchar *sexp,
                                                             GSList **out_ecalcomps,
                                                             GCancellable *cancellable,
                                                             GError **error);

Gets a list of objects from the calendar that match the query specified by the `sexp` argument. The objects will be returned in the `out_ecalcomps` argument, which is a list of ECalComponent. This list should be freed with `e_cal_client_free_ecalcomp_slist()`.

`client` : | an ECalClient
`sexp` : | an S-expression representing the query
`out_ecalcomps` : | list of matching ECalComponents. [out][element-type ECalComponent]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_free_busy ()

    void                e_cal_client_get_free_busy          (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             const GSList *users,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Begins retrieval of free/busy information from the calendar server as a list of ECalComponent-s. Connect to "free-busy-data" signal to receive chunks of free/busy components. The call is finished by `e_cal_client_get_free_busy_finish()` from the `callback`.

`client` : | an ECalClient
`start` : | Start time for query
`end` : | End time for query
`users` : | List of users to retrieve free/busy information for. [element-type utf8]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_free_busy_finish ()

    gboolean            e_cal_client_get_free_busy_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_free_busy()`. All VFREEBUSY ECalComponent-s were received by "free-busy-data" signal.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_free_busy_sync ()

    gboolean            e_cal_client_get_free_busy_sync     (ECalClient *client,
                                                             time_t start,
                                                             time_t end,
                                                             const GSList *users,
                                                             GCancellable *cancellable,
                                                             GError **error);

Gets free/busy information from the calendar server. All VFREEBUSY ECalComponent-s were received by "free-busy-data" signal.

`client` : | an ECalClient
`start` : | Start time for query
`end` : | End time for query
`users` : | List of users to retrieve free/busy information for. [element-type utf8]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_create_object ()

    void                e_cal_client_create_object          (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Requests the calendar backend to create the object specified by the `icalcomp` argument. Some backends would assign a specific UID to the newly created object, but this function does not modify the original `icalcomp` if its UID changes. The call is finished by `e_cal_client_create_object_finish()` from the `callback`.

`client` : | an ECalClient
`icalcomp` : | The component to create
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_create_object_finish ()

    gboolean            e_cal_client_create_object_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             gchar **out_uid,
                                                             GError **error);

Finishes previous call of `e_cal_client_create_object()` and sets `out_uid` to newly assigned UID for the created object. This `out_uid` should be freed with `g_free()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_uid` : | Return value for the UID assigned to the new component by the calendar backend. [out]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_create_object_sync ()

    gboolean            e_cal_client_create_object_sync     (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             gchar **out_uid,
                                                             GCancellable *cancellable,
                                                             GError **error);

Requests the calendar backend to create the object specified by the `icalcomp` argument. Some backends would assign a specific UID to the newly created object, in those cases that UID would be returned in the `out_uid` argument. This function does not modify the original `icalcomp` if its UID changes. Returned `out_uid` should be freed with `g_free()`.

`client` : | an ECalClient
`icalcomp` : | The component to create
`out_uid` : | Return value for the UID assigned to the new component by the calendar backend. [out]
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_create_objects ()

    void                e_cal_client_create_objects         (ECalClient *client,
                                                             GSList *icalcomps,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Requests the calendar backend to create the objects specified by the `icalcomps` argument. Some backends would assign a specific UID to the newly created object, but this function does not modify the original `icalcomps` if their UID changes. The call is finished by `e_cal_client_create_objects_finish()` from the `callback`.

`client` : | an ECalClient
`icalcomps` : | The components to create. [element-type icalcomponent]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.6

### e_cal_client_create_objects_finish ()

    gboolean            e_cal_client_create_objects_finish  (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_uids,
                                                             GError **error);

Finishes previous call of `e_cal_client_create_objects()` and sets `out_uids` to newly assigned UIDs for the created objects. This `out_uids` should be freed with `e_client_util_free_string_slist()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_uids` : | Return value for the UIDs assigned to the new components by the calendar backend. [out][element-type utf8]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.6

### e_cal_client_create_objects_sync ()

    gboolean            e_cal_client_create_objects_sync    (ECalClient *client,
                                                             GSList *icalcomps,
                                                             GSList **out_uids,
                                                             GCancellable *cancellable,
                                                             GError **error);

Requests the calendar backend to create the objects specified by the `icalcomps` argument. Some backends would assign a specific UID to the newly created objects, in those cases these UIDs would be returned in the `out_uids` argument. This function does not modify the original `icalcomps` if their UID changes. Returned `out_uids` should be freed with `e_client_util_free_string_slist()`.

`client` : | an ECalClient
`icalcomps` : | The components to create. [element-type icalcomponent]
`out_uids` : | Return value for the UIDs assigned to the new components by the calendar backend. [out][element-type utf8]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.6

### enum ECalObjModType

    typedef enum {
    	E_CAL_OBJ_MOD_THIS = 1 << 0,
    	E_CAL_OBJ_MOD_THIS_AND_PRIOR = 1 << 1,
    	E_CAL_OBJ_MOD_THIS_AND_FUTURE = 1 << 2,
    	E_CAL_OBJ_MOD_ALL = 0x07,
    	E_CAL_OBJ_MOD_ONLY_THIS = 1 << 3
    } ECalObjModType;

FIXME Document me!

`E_CAL_OBJ_MOD_THIS` |
`E_CAL_OBJ_MOD_THIS_AND_PRIOR` |
`E_CAL_OBJ_MOD_THIS_AND_FUTURE` |
`E_CAL_OBJ_MOD_ALL` |
`E_CAL_OBJ_MOD_ONLY_THIS` |

Since 3.8

### e_cal_client_modify_object ()

    void                e_cal_client_modify_object          (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Requests the calendar backend to modify an existing object. If the object does not exist on the calendar, an error will be returned.

For recurrent appointments, the `mod` argument specifies what to modify, if all instances (E_CAL_OBJ_MOD_ALL), a single instance (E_CAL_OBJ_MOD_THIS), or a specific set of instances (E_CAL_OBJ_MOD_THIS_AND_PRIOR and E_CAL_OBJ_MOD_THIS_AND_FUTURE).

The call is finished by `e_cal_client_modify_object_finish()` from the `callback`.

`client` : | an ECalClient
`icalcomp` : | Component to modify
`mod` : | Type of modification
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_modify_object_finish ()

    gboolean            e_cal_client_modify_object_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_modify_object()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_modify_object_sync ()

    gboolean            e_cal_client_modify_object_sync     (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);

Requests the calendar backend to modify an existing object. If the object does not exist on the calendar, an error will be returned.

For recurrent appointments, the `mod` argument specifies what to modify, if all instances (E_CAL_OBJ_MOD_ALL), a single instance (E_CAL_OBJ_MOD_THIS), or a specific set of instances (E_CAL_OBJ_MOD_THISNADPRIOR and E_CAL_OBJ_MOD_THIS_AND_FUTURE).

`client` : | an ECalClient
`icalcomp` : | Component to modify
`mod` : | Type of modification
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_modify_objects ()

    void                e_cal_client_modify_objects         (ECalClient *client,
                                                             GSList *comps,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Requests the calendar backend to modify existing objects. If an object does not exist on the calendar, an error will be returned.

For recurrent appointments, the `mod` argument specifies what to modify, if all instances (E_CAL_OBJ_MOD_ALL), a single instance (E_CAL_OBJ_MOD_THIS), or a specific set of instances (E_CAL_OBJ_MOD_THISNADPRIOR and E_CAL_OBJ_MOD_THIS_AND_FUTURE).

The call is finished by `e_cal_client_modify_objects_finish()` from the `callback`.

`client` : | an ECalClient
`comps` : | Components to modify. [element-type icalcomponent]
`mod` : | Type of modification
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.6

### e_cal_client_modify_objects_finish ()

    gboolean            e_cal_client_modify_objects_finish  (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_modify_objects()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.6

### e_cal_client_modify_objects_sync ()

    gboolean            e_cal_client_modify_objects_sync    (ECalClient *client,
                                                             GSList *comps,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);

Requests the calendar backend to modify existing objects. If an object does not exist on the calendar, an error will be returned.

For recurrent appointments, the `mod` argument specifies what to modify, if all instances (E_CAL_OBJ_MOD_ALL), a single instance (E_CAL_OBJ_MOD_THIS), or a specific set of instances (E_CAL_OBJ_MOD_THISNADPRIOR and E_CAL_OBJ_MOD_THIS_AND_FUTURE).

`client` : | an ECalClient
`comps` : | Components to modify. [element-type icalcomponent]
`mod` : | Type of modification
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.6

### e_cal_client_remove_object ()

    void                e_cal_client_remove_object          (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

This function allows the removal of instances of a recurrent appointment. By using a combination of the `uid`, `rid` and `mod` arguments, you can remove specific instances. If what you want is to remove all instances, use `NULL` `rid` and E_CAL_OBJ_MOD_ALL for the `mod`.

The call is finished by `e_cal_client_remove_object_finish()` from the `callback`.

`client` : | an ECalClient
`uid` : | UID of the object to remove
`rid` : | Recurrence ID of the specific recurrence to remove
`mod` : | Type of the removal
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_remove_object_finish ()

    gboolean            e_cal_client_remove_object_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_remove_object()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_remove_object_sync ()

    gboolean            e_cal_client_remove_object_sync     (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);

This function allows the removal of instances of a recurrent appointment. By using a combination of the `uid`, `rid` and `mod` arguments, you can remove specific instances. If what you want is to remove all instances, use `NULL` `rid` and E_CAL_OBJ_MODE_THIS for the `mod`.

`client` : | an ECalClient
`uid` : | UID of the object to remove
`rid` : | Recurrence ID of the specific recurrence to remove
`mod` : | Type of the removal
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_remove_objects ()

    void                e_cal_client_remove_objects         (ECalClient *client,
                                                             const GSList *ids,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

This function allows the removal of instances of recurrent appointments. ECalComponentId objects can identify specific instances (if rid is not `NULL`). If what you want is to remove all instances, use a `NULL` rid in the ECalComponentId and E_CAL_OBJ_MOD_ALL for the `mod`.

The call is finished by `e_cal_client_remove_objects_finish()` from the `callback`.

`client` : | an ECalClient
`ids` : | A list of ECalComponentId objects identifying the objects to remove. [element-type ECalComponentId]
`mod` : | Type of the removal
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.6

### e_cal_client_remove_objects_finish ()

    gboolean            e_cal_client_remove_objects_finish  (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_remove_objects()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.6

### e_cal_client_remove_objects_sync ()

    gboolean            e_cal_client_remove_objects_sync    (ECalClient *client,
                                                             const GSList *ids,
                                                             ECalObjModType mod,
                                                             GCancellable *cancellable,
                                                             GError **error);

This function allows the removal of instances of recurrent appointments. ECalComponentId objects can identify specific instances (if rid is not `NULL`). If what you want is to remove all instances, use a `NULL` rid in the ECalComponentId and E_CAL_OBJ_MOD_ALL for the `mod`.

`client` : | an ECalClient
`ids` : | a list of ECalComponentId objects identifying the objects to remove. [element-type ECalComponentId]
`mod` : | Type of the removal
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.6

### e_cal_client_receive_objects ()

    void                e_cal_client_receive_objects        (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Makes the backend receive the set of iCalendar objects specified in the `icalcomp` argument. This is used for iTIP confirmation/cancellation messages for scheduled meetings.

The call is finished by `e_cal_client_receive_objects_finish()` from the `callback`.

`client` : | an ECalClient
`icalcomp` : | An icalcomponent
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_receive_objects_finish ()

    gboolean            e_cal_client_receive_objects_finish (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_receive_objects()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_receive_objects_sync ()

    gboolean            e_cal_client_receive_objects_sync   (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);

Makes the backend receive the set of iCalendar objects specified in the `icalcomp` argument. This is used for iTIP confirmation/cancellation messages for scheduled meetings.

`client` : | an ECalClient
`icalcomp` : | An icalcomponent
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_send_objects ()

    void                e_cal_client_send_objects           (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Requests a calendar backend to send meeting information stored in `icalcomp`. The backend can modify this component and request a send to particular users. The call is finished by `e_cal_client_send_objects_finish()` from the `callback`.

`client` : | an ECalClient
`icalcomp` : | An icalcomponent to be sent
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_send_objects_finish ()

    gboolean            e_cal_client_send_objects_finish    (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_users,
                                                             icalcomponent **out_modified_icalcomp,
                                                             GError **error);

Finishes previous call of `e_cal_client_send_objects()` and populates `out_users` with a list of users to send `out_modified_icalcomp` to.

The `out_users` list should be freed with `e_client_util_free_string_slist()` and the `out_modified_icalcomp` should be freed with `icalcomponent_free()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_users` : | List of users to send the `out_modified_icalcomp` to. [out][element-type utf8]
`out_modified_icalcomp` : | Return value for the icalcomponent to be sent. [out]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_send_objects_sync ()

    gboolean            e_cal_client_send_objects_sync      (ECalClient *client,
                                                             icalcomponent *icalcomp,
                                                             GSList **out_users,
                                                             icalcomponent **out_modified_icalcomp,
                                                             GCancellable *cancellable,
                                                             GError **error);

Requests a calendar backend to send meeting information stored in `icalcomp`. The backend can modify this component and request a send to users in the `out_users` list.

The `out_users` list should be freed with `e_client_util_free_string_slist()` and the `out_modified_icalcomp` should be freed with `icalcomponent_free()`.

`client` : | an ECalClient
`icalcomp` : | An icalcomponent to be sent
`out_users` : | List of users to send the `out_modified_icalcomp` to. [out][element-type utf8]
`out_modified_icalcomp` : | Return value for the icalcomponent to be sent. [out]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_attachment_uris ()

    void                e_cal_client_get_attachment_uris    (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Queries a calendar for a specified component's object attachment uris. The call is finished by `e_cal_client_get_attachment_uris_finish()` from the `callback`.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component
`rid` : | Recurrence identifier
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_attachment_uris_finish ()

    gboolean            e_cal_client_get_attachment_uris_finish
                                                            (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GSList **out_attachment_uris,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_attachment_uris()` and sets `out_attachment_uris` to uris for component's attachments. The list should be freed with `e_client_util_free_string_slist()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_attachment_uris` : | Return location for the list of attachment URIs. [out][element-type utf8]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_attachment_uris_sync ()

    gboolean            e_cal_client_get_attachment_uris_sync
                                                            (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             GSList **out_attachment_uris,
                                                             GCancellable *cancellable,
                                                             GError **error);

Queries a calendar for a specified component's object attachment URIs. The list should be freed with `e_client_util_free_string_slist()`.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component
`rid` : | Recurrence identifier
`out_attachment_uris` : | Return location for the list of attachment URIs. [out][element-type utf8]
`cancellable` : | a GCancellable; can be `NULL`. [allow-none]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_discard_alarm ()

    void                e_cal_client_discard_alarm          (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             const gchar *auid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Removes alarm `auid` from a given component identified by `uid` and `rid`. The call is finished by `e_cal_client_discard_alarm_finish()` from the `callback`.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component
`rid` : | Recurrence identifier
`auid` : | Alarm identifier to remove
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_discard_alarm_finish ()

    gboolean            e_cal_client_discard_alarm_finish   (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_discard_alarm()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_discard_alarm_sync ()

    gboolean            e_cal_client_discard_alarm_sync     (ECalClient *client,
                                                             const gchar *uid,
                                                             const gchar *rid,
                                                             const gchar *auid,
                                                             GCancellable *cancellable,
                                                             GError **error);

Removes alarm `auid` from a given component identified by `uid` and `rid`.

`client` : | an ECalClient
`uid` : | Unique identifier for a calendar component
`rid` : | Recurrence identifier
`auid` : | Alarm identifier to remove
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_view ()

    void                e_cal_client_get_view               (ECalClient *client,
                                                             const gchar *sexp,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Query `client` with `sexp`, creating an ECalClientView. The call is finished by `e_cal_client_get_view_finish()` from the `callback`.

`client` : | an ECalClient
`sexp` : | an S-expression representing the query.
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_view_finish ()

    gboolean            e_cal_client_get_view_finish        (ECalClient *client,
                                                             GAsyncResult *result,
                                                             ECalClientView **out_view,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_view()`. If successful, then the `out_view` is set to newly allocated ECalClientView, which should be freed with `g_object_unref()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_view` : | (out) an ECalClientView
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_view_sync ()

    gboolean            e_cal_client_get_view_sync          (ECalClient *client,
                                                             const gchar *sexp,
                                                             ECalClientView **out_view,
                                                             GCancellable *cancellable,
                                                             GError **error);

Query `client` with `sexp`, creating an ECalClientView. If successful, then the `out_view` is set to newly allocated ECalClientView, which should be freed with `g_object_unref()`.

`client` : | an ECalClient
`sexp` : | an S-expression representing the query.
`out_view` : | (out) an ECalClientView
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_timezone ()

    void                e_cal_client_get_timezone           (ECalClient *client,
                                                             const gchar *tzid,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Retrieves a timezone object from the calendar backend. The call is finished by `e_cal_client_get_timezone_finish()` from the `callback`.

`client` : | an ECalClient
`tzid` : | ID of the timezone to retrieve
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_get_timezone_finish ()

    gboolean            e_cal_client_get_timezone_finish    (ECalClient *client,
                                                             GAsyncResult *result,
                                                             icaltimezone **out_zone,
                                                             GError **error);

Finishes previous call of `e_cal_client_get_timezone()` and sets `out_zone` to a retrieved timezone object from the calendar backend. This object is owned by the `client`, thus do not free it.

`client` : | an ECalClient
`result` : | a GAsyncResult
`out_zone` : | Return value for the timezone. [out]
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_get_timezone_sync ()

    gboolean            e_cal_client_get_timezone_sync      (ECalClient *client,
                                                             const gchar *tzid,
                                                             icaltimezone **out_zone,
                                                             GCancellable *cancellable,
                                                             GError **error);

Retrieves a timezone object from the calendar backend. This object is owned by the `client`, thus do not free it.

`client` : | an ECalClient
`tzid` : | ID of the timezone to retrieve
`out_zone` : | Return value for the timezone. [out]
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_add_timezone ()

    void                e_cal_client_add_timezone           (ECalClient *client,
                                                             icaltimezone *zone,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Add a VTIMEZONE object to the given calendar client. The call is finished by `e_cal_client_add_timezone_finish()` from the `callback`.

`client` : | an ECalClient
`zone` : | The timezone to add
`cancellable` : | a GCancellable; can be `NULL`
`callback` : | callback to call when a result is ready
`user_data` : | user data for the `callback`

Since 3.2

### e_cal_client_add_timezone_finish ()

    gboolean            e_cal_client_add_timezone_finish    (ECalClient *client,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes previous call of `e_cal_client_add_timezone()`.

`client` : | an ECalClient
`result` : | a GAsyncResult
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_add_timezone_sync ()

    gboolean            e_cal_client_add_timezone_sync      (ECalClient *client,
                                                             icaltimezone *zone,
                                                             GCancellable *cancellable,
                                                             GError **error);

Add a VTIMEZONE object to the given calendar client.

`client` : | an ECalClient
`zone` : | The timezone to add
`cancellable` : | a GCancellable; can be `NULL`
`error` : | a GError to set an error, if any. [out]
Returns : | `TRUE` if successful, `FALSE` otherwise.

Since 3.2

### e_cal_client_new ()

    ECalClient *        e_cal_client_new                    (ESource *source,
                                                             ECalClientSourceType source_type,
                                                             GError **error);

### Warning

`e_cal_client_new` has been deprecated since version 3.8 and should not be used in newly-written code. It covertly makes synchronous D-Bus calls, with no way to cancel. Use `e_cal_client_connect()` instead, which combines `e_cal_client_new()` and `e_client_open()` into one step.

Creates a new ECalClient corresponding to the given source. There are only two operations that are valid on this calendar at this point: `e_client_open()`, and `e_client_remove()`.

`source` : | An ESource pointer
`source_type` : | source type of the calendar
`error` : | A GError pointer
Returns : | a new but unopened ECalClient.

Since 3.2

### e_cal_client_error_create ()

    GError *            e_cal_client_error_create           (ECalClientError code,
                                                             const gchar *custom_msg);

### Warning

`e_cal_client_error_create` has been deprecated since version 3.8 and should not be used in newly-written code. Just use the GError API directly.

`code` : | an ECalClientError code to create
`custom_msg` : | custom message to use for the error; can be `NULL`
Returns : | a new GError containing an E_CAL_CLIENT_ERROR of the given `code`. If the `custom_msg` is NULL, then the error message is the one returned from `e_cal_client_error_to_string()` for the `code`, otherwise the given message is used. Returned pointer should be freed with `g_error_free()`.

Since 3.2

## Property Details

### The `"default-timezone"` property

      "default-timezone"         gpointer              : Read / Write

Timezone used to resolve DATE and floating DATE-TIME values.

### The `"source-type"` property

      "source-type"              ECalClientSourceType  : Read / Write / Construct Only

The iCalendar data type.

Default value: E_CAL_CLIENT_SOURCE_TYPE_EVENTS

## Signal Details

### The `"free-busy-data"` signal

    void                user_function                      (ECalClient *ecalclient,
                                                            gpointer    arg1,
                                                            gpointer    user_data)       : Run First