## ECalBackend

ECalBackend — Base class for calendar/tasks backend implementations.

## Synopsis

                ECalBackendPrivate;
    ESource*    e_cal_backend_get_source        (ECalBackend *backend);
    const char* e_cal_backend_get_uri           (ECalBackend *backend);
    icalcomponent_kind e_cal_backend_get_kind   (ECalBackend *backend);
    void        e_cal_backend_add_client        (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_remove_client     (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_add_query         (ECalBackend *backend,
                                                 EDataCalView *query);
    EList*      e_cal_backend_get_queries       (ECalBackend *backend);
    void        e_cal_backend_is_read_only      (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_get_cal_address   (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_get_alarm_email_address
                                                (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_get_ldap_attribute
                                                (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_get_static_capabilities
                                                (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_open              (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 gboolean only_if_exists,
                                                 const char *username,
                                                 const char *password);
    void        e_cal_backend_remove            (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_create_object     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj);
    void        e_cal_backend_modify_object     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj,
                                                 CalObjModType mod);
    void        e_cal_backend_remove_object     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *uid,
                                                 const char *rid,
                                                 CalObjModType mod);
    void        e_cal_backend_discard_alarm     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *uid,
                                                 const char *auid);
    void        e_cal_backend_receive_objects   (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj);
    void        e_cal_backend_send_objects      (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj);
    void        e_cal_backend_get_default_object
                                                (ECalBackend *backend,
                                                 EDataCal *cal);
    void        e_cal_backend_get_object        (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *uid,
                                                 const char *rid);
    void        e_cal_backend_get_object_list   (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *sexp);
    gboolean    e_cal_backend_is_loaded         (ECalBackend *backend);
    void        e_cal_backend_start_query       (ECalBackend *backend,
                                                 EDataCalView *query);
    CalMode     e_cal_backend_get_mode          (ECalBackend *backend);
    void        e_cal_backend_set_mode          (ECalBackend *backend,
                                                 CalMode mode);
    void        e_cal_backend_get_timezone      (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *tzid);
    void        e_cal_backend_add_timezone      (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *object);
    void        e_cal_backend_set_default_timezone
                                                (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *tzid);
    void        e_cal_backend_get_changes       (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *change_id);
    void        e_cal_backend_get_free_busy     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 GList *users,
                                                 time_t start,
                                                 time_t end);
    icaltimezone* e_cal_backend_internal_get_default_timezone
                                                (ECalBackend *backend);
    icaltimezone* e_cal_backend_internal_get_timezone
                                                (ECalBackend *backend,
                                                 const char *tzid);
    void        e_cal_backend_last_client_gone  (ECalBackend *backend);
    void        e_cal_backend_set_notification_proxy
                                                (ECalBackend *backend,
                                                 ECalBackend *proxy);
    void        e_cal_backend_notify_object_created
                                                (ECalBackend *backend,
                                                 const char *calobj);
    void        e_cal_backend_notify_object_modified
                                                (ECalBackend *backend,
                                                 const char *old_object,
                                                 const char *object);
    void        e_cal_backend_notify_object_removed
                                                (ECalBackend *backend,
                                                 const char *uid,
                                                 const char *old_object,
                                                 const char *object);
    void        e_cal_backend_notify_mode       (ECalBackend *backend,
                                                 GNOME_Evolution_Calendar_CalListener_SetModeStatus status,
                                                 GNOME_Evolution_Calendar_CalMode mode);
    void        e_cal_backend_notify_auth_required
                                                (ECalBackend *backend);
    void        e_cal_backend_notify_error      (ECalBackend *backend,
                                                 const char *message);

## Description

## Details

### ECalBackendPrivate

    typedef struct _ECalBackendPrivate ECalBackendPrivate;

### e_cal_backend_get_source ()

    ESource*    e_cal_backend_get_source        (ECalBackend *backend);

Gets the ESource associated with the given backend.

`backend` : | An ECalBackend object.
Returns : | The ESource for the backend.

### e_cal_backend_get_uri ()

    const char* e_cal_backend_get_uri           (ECalBackend *backend);

Queries the URI of a calendar backend, which must already have an open calendar.

`backend` : | A calendar backend.
Returns : | The URI where the calendar is stored.

### e_cal_backend_get_kind ()

    icalcomponent_kind e_cal_backend_get_kind   (ECalBackend *backend);

Gets the kind of components the given backend stores.

`backend` : | An ECalBackend object.
Returns : | The kind of components for this backend.

### e_cal_backend_add_client ()

    void        e_cal_backend_add_client        (ECalBackend *backend,
                                                 EDataCal *cal);

Adds a new client to the given backend. For any event, the backend will notify all clients added via this function.

`backend` : | An ECalBackend object.
`cal` : | An EDataCal object.

### e_cal_backend_remove_client ()

    void        e_cal_backend_remove_client     (ECalBackend *backend,
                                                 EDataCal *cal);

Removes a client from the list of connected clients to the given backend.

`backend` : | An ECalBackend object.
`cal` : | An EDataCal object.

### e_cal_backend_add_query ()

    void        e_cal_backend_add_query         (ECalBackend *backend,
                                                 EDataCalView *query);

Adds a query to the list of live queries being run by the given backend. Doing so means that any listener on the query will get notified of any change that affect the live query.

`backend` : | An ECalBackend object.
`query` : | An EDataCalView object.

### e_cal_backend_get_queries ()

    EList*      e_cal_backend_get_queries       (ECalBackend *backend);

Gets the list of live queries being run on the given backend.

`backend` : | An ECalBackend object.
Returns : | The list of live queries.

### e_cal_backend_is_read_only ()

    void        e_cal_backend_is_read_only      (ECalBackend *backend,
                                                 EDataCal *cal);

Queries whether a calendar backend is read only or not.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.

### e_cal_backend_get_cal_address ()

    void        e_cal_backend_get_cal_address   (ECalBackend *backend,
                                                 EDataCal *cal);

Queries the cal address associated with a calendar backend, which must already have an open calendar.

`backend` : | A calendar backend.
`cal` : |

### e_cal_backend_get_alarm_email_address ()

    void        e_cal_backend_get_alarm_email_address
                                                (ECalBackend *backend,
                                                 EDataCal *cal);

Calls the get_static_capabilities method on the given backend.

`backend` : | An ECalBackend object.
`cal` : | An EDataCal object.

### e_cal_backend_get_ldap_attribute ()

    void        e_cal_backend_get_ldap_attribute
                                                (ECalBackend *backend,
                                                 EDataCal *cal);

`backend` : |
`cal` : |

### e_cal_backend_get_static_capabilities ()

    void        e_cal_backend_get_static_capabilities
                                                (ECalBackend *backend,
                                                 EDataCal *cal);

`backend` : |
`cal` : |

### e_cal_backend_open ()

    void        e_cal_backend_open              (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 gboolean only_if_exists,
                                                 const char *username,
                                                 const char *password);

Opens a calendar backend with data from a calendar stored at the specified URI.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`only_if_exists` : | Whether the calendar should be opened only if it already exists. If FALSE, a new calendar will be created when the specified `uri` does not exist.
`username` : | User name to use for authentication (if needed).
`password` : | Password for `username`.

### e_cal_backend_remove ()

    void        e_cal_backend_remove            (ECalBackend *backend,
                                                 EDataCal *cal);

Removes the calendar being accessed by the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.

### e_cal_backend_create_object ()

    void        e_cal_backend_create_object     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj);

Calls the create_object method on the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`calobj` : | The object to create.

### e_cal_backend_modify_object ()

    void        e_cal_backend_modify_object     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj,
                                                 CalObjModType mod);

Calls the modify_object method on the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`calobj` : | Object to be modified.
`mod` : | Type of modification.

### e_cal_backend_remove_object ()

    void        e_cal_backend_remove_object     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *uid,
                                                 const char *rid,
                                                 CalObjModType mod);

Removes an object in a calendar backend. The backend will notify all of its clients about the change.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`uid` : | Unique identifier of the object to remove.
`rid` : | A recurrence ID.
`mod` : | Type of removal.

### e_cal_backend_discard_alarm ()

    void        e_cal_backend_discard_alarm     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *uid,
                                                 const char *auid);

Discards an alarm from the given component. This allows the specific backend to do whatever is needed to really discard the alarm.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`uid` : | UID of the component to discard the alarm from.
`auid` : | Alarm ID.

### e_cal_backend_receive_objects ()

    void        e_cal_backend_receive_objects   (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj);

Calls the receive_objects method on the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`calobj` : | iCalendar object.

### e_cal_backend_send_objects ()

    void        e_cal_backend_send_objects      (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *calobj);

Calls the send_objects method on the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`calobj` : | iCalendar object to be sent.

### e_cal_backend_get_default_object ()

    void        e_cal_backend_get_default_object
                                                (ECalBackend *backend,
                                                 EDataCal *cal);

Calls the get_default_object method on the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.

### e_cal_backend_get_object ()

    void        e_cal_backend_get_object        (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *uid,
                                                 const char *rid);

Queries a calendar backend for a calendar object based on its unique identifier and its recurrence ID (if a recurrent appointment).

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`uid` : | Unique identifier for a calendar object.
`rid` : | ID for the object's recurrence to get.

### e_cal_backend_get_object_list ()

    void        e_cal_backend_get_object_list   (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *sexp);

Calls the get_object_list method on the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`sexp` : | Expression to search for.

### e_cal_backend_is_loaded ()

    gboolean    e_cal_backend_is_loaded         (ECalBackend *backend);

Queries whether a calendar backend has been loaded yet.

`backend` : | A calendar backend.
Returns : | TRUE if the backend has been loaded with data, FALSE otherwise.

### e_cal_backend_start_query ()

    void        e_cal_backend_start_query       (ECalBackend *backend,
                                                 EDataCalView *query);

Starts a new live query on the given backend.

`backend` : | A calendar backend.
`query` : | The query to be started.

### e_cal_backend_get_mode ()

    CalMode     e_cal_backend_get_mode          (ECalBackend *backend);

Queries whether a calendar backend is connected remotely.

`backend` : | A calendar backend.
Returns : | The current mode the calendar is in

### e_cal_backend_set_mode ()

    void        e_cal_backend_set_mode          (ECalBackend *backend,
                                                 CalMode mode);

Sets the mode of the calendar

`backend` : | A calendar backend
`mode` : | Mode to change to

### e_cal_backend_get_timezone ()

    void        e_cal_backend_get_timezone      (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *tzid);

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`tzid` : | Unique identifier of a VTIMEZONE object. Note that this must not be NULL.

### e_cal_backend_add_timezone ()

    void        e_cal_backend_add_timezone      (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *object);

Add a timezone object to the given backend.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`object` : |

### e_cal_backend_set_default_timezone ()

    void        e_cal_backend_set_default_timezone
                                                (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *tzid);

Sets the default timezone for the calendar, which is used to resolve DATE and floating DATE-TIME values.

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`tzid` : | The TZID identifying the timezone.

### e_cal_backend_get_changes ()

    void        e_cal_backend_get_changes       (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 const char *change_id);

Builds a sequence of objects and the type of change that occurred on them since the last time the give change_id was seen

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`change_id` : | A unique uid for the callers change list

### e_cal_backend_get_free_busy ()

    void        e_cal_backend_get_free_busy     (ECalBackend *backend,
                                                 EDataCal *cal,
                                                 GList *users,
                                                 time_t start,
                                                 time_t end);

Gets a free/busy object for the given time interval

`backend` : | A calendar backend.
`cal` : | An EDataCal object.
`users` : | List of users to get free/busy information for.
`start` : | Start time for query.
`end` : | End time for query.

### e_cal_backend_internal_get_default_timezone ()

    icaltimezone* e_cal_backend_internal_get_default_timezone
                                                (ECalBackend *backend);

Calls the internal_get_default_timezone method on the given backend.

`backend` : | A calendar backend.
Returns : |

### e_cal_backend_internal_get_timezone ()

    icaltimezone* e_cal_backend_internal_get_timezone
                                                (ECalBackend *backend,
                                                 const char *tzid);

Calls the internal_get_timezone method on the given backend.

`backend` : | A calendar backend.
`tzid` : | ID of the timezone to get.
Returns : |

### e_cal_backend_last_client_gone ()

    void        e_cal_backend_last_client_gone  (ECalBackend *backend);

`backend` : |

### e_cal_backend_set_notification_proxy ()

    void        e_cal_backend_set_notification_proxy
                                                (ECalBackend *backend,
                                                 ECalBackend *proxy);

Sets the backend that will act as notification proxy for the given backend.

`backend` : | A calendar backend.
`proxy` : | The calendar backend to act as notification proxy.

### e_cal_backend_notify_object_created ()

    void        e_cal_backend_notify_object_created
                                                (ECalBackend *backend,
                                                 const char *calobj);

Notifies each of the backend's listeners about a new object.

#`e_data_cal_notify_object_created()` calls this for you. You only need to call `e_cal_backend_notify_object_created()` yourself to report objects created by non-EDS clients.

`backend` : | A calendar backend.
`calobj` : | iCalendar representation of new object

### e_cal_backend_notify_object_modified ()

    void        e_cal_backend_notify_object_modified
                                                (ECalBackend *backend,
                                                 const char *old_object,
                                                 const char *object);

Notifies each of the backend's listeners about a modified object.

#`e_data_cal_notify_object_modified()` calls this for you. You only need to call `e_cal_backend_notify_object_modified()` yourself to report objects modified by non-EDS clients.

`backend` : | A calendar backend.
`old_object` : | iCalendar representation of the original form of the object
`object` : | iCalendar representation of the new form of the object

### e_cal_backend_notify_object_removed ()

    void        e_cal_backend_notify_object_removed
                                                (ECalBackend *backend,
                                                 const char *uid,
                                                 const char *old_object,
                                                 const char *object);

Notifies each of the backend's listeners about a removed object.

`e_data_cal_notify_object_removed()` calls this for you. You only need to call `e_cal_backend_notify_object_removed()` yourself to report objects removed by non-EDS clients.

`backend` : | A calendar backend.
`uid` : | the UID of the removed object
`old_object` : | iCalendar representation of the removed object
`object` : |

### e_cal_backend_notify_mode ()

    void        e_cal_backend_notify_mode       (ECalBackend *backend,
                                                 GNOME_Evolution_Calendar_CalListener_SetModeStatus status,
                                                 GNOME_Evolution_Calendar_CalMode mode);

Notifies each of the backend's listeners about the results of a setMode call.

`backend` : | A calendar backend.
`status` : | Status of the mode set
`mode` : | the current mode

### e_cal_backend_notify_auth_required ()

    void        e_cal_backend_notify_auth_required
                                                (ECalBackend *backend);

Notifies each of the backend's listeners that authentication is required to open the calendar.

`backend` : | A calendar backend.

### e_cal_backend_notify_error ()

    void        e_cal_backend_notify_error      (ECalBackend *backend,
                                                 const char *message);

Notifies each of the backend's listeners about an error

`backend` : | A calendar backend.
`message` : | Error message