## EDataCal EDataCal — Server side D-Bus layer to communicate with calendars |

## Functions

EDataCal * | e_data_cal_new ()
struct _ECalBackend * | e_data_cal_ref_backend ()
GDBusConnection * | e_data_cal_get_connection ()
const gchar * | e_data_cal_get_object_path ()
void | e_data_cal_respond_open ()
void | e_data_cal_respond_refresh ()
void | e_data_cal_respond_get_object ()
void | e_data_cal_respond_get_object_list ()
void | e_data_cal_respond_get_free_busy ()
void | e_data_cal_respond_create_objects ()
void | e_data_cal_respond_modify_objects ()
void | e_data_cal_respond_remove_objects ()
void | e_data_cal_respond_receive_objects ()
void | e_data_cal_respond_send_objects ()
void | e_data_cal_respond_get_attachment_uris ()
void | e_data_cal_respond_discard_alarm ()
void | e_data_cal_respond_get_timezone ()
void | e_data_cal_respond_add_timezone ()
void | e_data_cal_report_error ()
void | e_data_cal_report_free_busy_data ()
void | e_data_cal_report_backend_property_changed ()

## Object Hierarchy

        GObject
        ╰── EDataCal

## Includes

    #include <libedata-cal/libedata-cal.h>

## Description

This class communicates with ECalClients over the bus and accesses an ECalBackend to satisfy client requests.

## Functions

### e_data_cal_new ()

    EDataCal *
    e_data_cal_new (struct _ECalBackend *backend,
                    GDBusConnection *connection,
                    const gchar *object_path,
                    GError **error);

Creates a new EDataCal and exports the Calendar D-Bus interface on `connection` at `object_path` . The EDataCal handles incoming remote method invocations and forwards them to the `backend` . If the Calendar interface fails to export, the function sets `error` and returns `NULL`.

#### Parameters

backend | an ECalBackend. | [type ECalBackend]
connection | a GDBusConnection |
object_path | object path for the D-Bus interface |
error | return location for a GError, or `NULL` |

#### Returns

an EDataCal, or `NULL` on error.

[transfer full][nullable]

### e_data_cal_ref_backend ()

    struct _ECalBackend *
    e_data_cal_ref_backend (EDataCal *cal);

Returns the ECalBackend to which incoming remote method invocations are being forwarded.

The returned ECalBackend is referenced for thread-safety and should be unreferenced with `g_object_unref()` when finished with it.

#### Parameters

cal | an EDataCal |

#### Returns

an ECalBackend.

[type ECalBackend][transfer full][nullable]

Since: 3.10

### e_data_cal_get_connection ()

    GDBusConnection *
    e_data_cal_get_connection (EDataCal *cal);

Returns the GDBusConnection on which the Calendar D-Bus interface is exported.

#### Parameters

cal | an EDataCal |

#### Returns

the GDBusConnection.

[transfer none]

Since: 3.8

### e_data_cal_get_object_path ()

    const gchar *
    e_data_cal_get_object_path (EDataCal *cal);

Returns the object path at which the Calendar D-Bus interface is exported.

#### Parameters

cal | an EDataCal |

#### Returns

the object path

Since: 3.8

### e_data_cal_respond_open ()

    void
    e_data_cal_respond_open (EDataCal *cal,
                             guint32 opid,
                             GError *error);

Notifies listeners of the completion of the open method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]

Since: 3.2

### e_data_cal_respond_refresh ()

    void
    e_data_cal_respond_refresh (EDataCal *cal,
                                guint32 opid,
                                GError *error);

Notifies listeners of the completion of the refresh method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]

Since: 3.2

### e_data_cal_respond_get_object ()

    void
    e_data_cal_respond_get_object (EDataCal *cal,
                                   guint32 opid,
                                   GError *error,
                                   const gchar *object);

Notifies listeners of the completion of the get_object method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
object | The object retrieved as an iCalendar string. |

Since: 3.2

### e_data_cal_respond_get_object_list ()

    void
    e_data_cal_respond_get_object_list (EDataCal *cal,
                                        guint32 opid,
                                        GError *error,
                                        const GSList *objects);

Notifies listeners of the completion of the get_object_list method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
objects | List of retrieved objects. | [element-type utf8]

Since: 3.2

### e_data_cal_respond_get_free_busy ()

    void
    e_data_cal_respond_get_free_busy (EDataCal *cal,
                                      guint32 opid,
                                      GError *error,
                                      const GSList *freebusy);

Notifies listeners of the completion of the get_free_busy method call. To pass actual free/busy objects to the client asynchronously use `e_data_cal_report_free_busy_data()`, but the `freebusy` should contain all the objects being used in `e_data_cal_report_free_busy_data()`.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
freebusy | a GSList of iCalendar strings with all gathered free/busy components. | [element-type utf8]

Since: 3.2

### e_data_cal_respond_create_objects ()

    void
    e_data_cal_respond_create_objects (EDataCal *cal,
                                       guint32 opid,
                                       GError *error,
                                       const GSList *uids,
                                       GSList *new_components);

Notifies listeners of the completion of the create_objects method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
uids | UIDs of the objects created. | [element-type utf8]
new_components | The newly created ECalComponent objects. | [element-type ECalComponent]

Since: 3.6

### e_data_cal_respond_modify_objects ()

    void
    e_data_cal_respond_modify_objects (EDataCal *cal,
                                       guint32 opid,
                                       GError *error,
                                       GSList *old_components,
                                       GSList *new_components);

Notifies listeners of the completion of the modify_objects method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
old_components | The old ECalComponent(s). | [element-type ECalComponent]
new_components | The new ECalComponent(s). | [element-type ECalComponent]

Since: 3.6

### e_data_cal_respond_remove_objects ()

    void
    e_data_cal_respond_remove_objects (EDataCal *cal,
                                       guint32 opid,
                                       GError *error,
                                       const GSList *ids,
                                       GSList *old_components,
                                       GSList *new_components);

Notifies listeners of the completion of the remove_objects method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
ids | IDs of the removed objects. | [element-type ECalComponentId]
old_components | The old ECalComponent(s). | [element-type ECalComponent]
new_components | The new ECalComponent(s). They will not be NULL only when removing instances of recurring appointments. | [element-type ECalComponent]

Since: 3.6

### e_data_cal_respond_receive_objects ()

    void
    e_data_cal_respond_receive_objects (EDataCal *cal,
                                        guint32 opid,
                                        GError *error);

Notifies listeners of the completion of the receive_objects method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]

Since: 3.2

### e_data_cal_respond_send_objects ()

    void
    e_data_cal_respond_send_objects (EDataCal *cal,
                                     guint32 opid,
                                     GError *error,
                                     const GSList *users,
                                     const gchar *calobj);

Notifies listeners of the completion of the send_objects method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
users | List of users. | [element-type utf8]
calobj | An iCalendar string representing the object sent. |

Since: 3.2

### e_data_cal_respond_get_attachment_uris ()

    void
    e_data_cal_respond_get_attachment_uris
                                   (EDataCal *cal,
                                    guint32 opid,
                                    GError *error,
                                    const GSList *attachment_uris);

Notifies listeners of the completion of the get_attachment_uris method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
attachment_uris | List of retrieved attachment uri's. | [element-type utf8]

Since: 3.2

### e_data_cal_respond_discard_alarm ()

    void
    e_data_cal_respond_discard_alarm (EDataCal *cal,
                                      guint32 opid,
                                      GError *error);

Notifies listeners of the completion of the discard_alarm method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]

Since: 3.2

### e_data_cal_respond_get_timezone ()

    void
    e_data_cal_respond_get_timezone (EDataCal *cal,
                                     guint32 opid,
                                     GError *error,
                                     const gchar *tzobject);

Notifies listeners of the completion of the get_timezone method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]
tzobject | The requested timezone as an iCalendar string. |

Since: 3.2

### e_data_cal_respond_add_timezone ()

    void
    e_data_cal_respond_add_timezone (EDataCal *cal,
                                     guint32 opid,
                                     GError *error);

Notifies listeners of the completion of the add_timezone method call.

#### Parameters

cal | A calendar client interface. |
opid | associated operation id |
error | Operation error, if any, automatically freed if passed it. | [transfer full][nullable]

Since: 3.2

### e_data_cal_report_error ()

    void
    e_data_cal_report_error (EDataCal *cal,
                             const gchar *message);

Emits an error message, thus the clients can be notified about it.

#### Parameters

cal | an EDataCal |
message | an error message to report |

Since: 3.2

### e_data_cal_report_free_busy_data ()

    void
    e_data_cal_report_free_busy_data (EDataCal *cal,
                                      const GSList *freebusy);

Reports result of a free/busy query on the `cal` .

#### Parameters

cal | an EDataCal |
freebusy | a GSList of free/busy components encoded as string. | [element-type utf8]

Since: 3.2

### e_data_cal_report_backend_property_changed ()

    void
    e_data_cal_report_backend_property_changed
                                   (EDataCal *cal,
                                    const gchar *prop_name,
                                    const gchar *prop_value);

Notifies client about certain property value change

#### Parameters

cal | an EDataCal |
prop_name | property name |
prop_value | new property value |

Since: 3.2