ECal.Client

g ECal.Client ECal.Client ECal.TimezoneCache ECal.TimezoneCache ECal.TimezoneCache->ECal.Client EDataServer.Client EDataServer.Client EDataServer.Client->ECal.Client GObject.GInterface GObject.GInterface GObject.GInterface->ECal.TimezoneCache Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GObject.Object->EDataServer.Client Gio.AsyncInitable->ECal.Client Gio.Initable->ECal.Client

Subclasses:

None

Methods

Inherited:

EDataServer.Client (47), GObject.Object (37), ECal.TimezoneCache (3), Gio.AsyncInitable (4), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

class

check_timezones_sync (vcalendar, icalcomps, tzlookup, tzlookup_data, cancellable)

class

connect (source, source_type, wait_for_connected_seconds, cancellable, callback, *user_data)

class

connect_finish (result)

class

connect_sync (source, source_type, wait_for_connected_seconds, cancellable)

class

error_create (code, custom_msg)

class

error_quark ()

class

error_to_string (code)

class

tzlookup_cb (tzid, ecalclient, cancellable)

class

tzlookup_icalcomp_cb (tzid, lookup_data, cancellable)

add_timezone (zone, cancellable, callback, *user_data)

add_timezone_finish (result)

add_timezone_sync (zone, cancellable)

check_one_alarm_only ()

check_organizer_must_accept ()

check_organizer_must_attend ()

check_recurrences_no_master ()

check_save_schedules ()

create_object (icalcomp, opflags, cancellable, callback, *user_data)

create_object_finish (result)

create_object_sync (icalcomp, opflags, cancellable)

create_objects (icalcomps, opflags, cancellable, callback, *user_data)

create_objects_finish (result)

create_objects_sync (icalcomps, opflags, cancellable)

discard_alarm (uid, rid, auid, opflags, cancellable, callback, *user_data)

discard_alarm_finish (result)

discard_alarm_sync (uid, rid, auid, opflags, cancellable)

generate_instances (start, end, cancellable, cb, *cb_data)

generate_instances_for_object (icalcomp, start, end, cancellable, cb, *cb_data)

generate_instances_for_object_sync (icalcomp, start, end, cancellable, cb, *cb_data)

generate_instances_for_uid_sync (uid, start, end, cancellable, cb, *cb_data)

generate_instances_sync (start, end, cancellable, cb, *cb_data)

get_attachment_uris (uid, rid, cancellable, callback, *user_data)

get_attachment_uris_finish (result)

get_attachment_uris_sync (uid, rid, cancellable)

get_component_as_string (icalcomp)

get_default_object (cancellable, callback, *user_data)

get_default_object_finish (result)

get_default_object_sync (cancellable)

get_default_timezone ()

get_free_busy (start, end, users, cancellable, callback, *user_data)

get_free_busy_finish (result)

get_free_busy_sync (start, end, users, cancellable)

get_local_attachment_store ()

get_object (uid, rid, cancellable, callback, *user_data)

get_object_finish (result)

get_object_list (sexp, cancellable, callback, *user_data)

get_object_list_as_comps (sexp, cancellable, callback, *user_data)

get_object_list_as_comps_finish (result)

get_object_list_as_comps_sync (sexp, cancellable)

get_object_list_finish (result)

get_object_list_sync (sexp, cancellable)

get_object_sync (uid, rid, cancellable)

get_objects_for_uid (uid, cancellable, callback, *user_data)

get_objects_for_uid_finish (result)

get_objects_for_uid_sync (uid, cancellable)

get_source_type ()

get_timezone (tzid, cancellable, callback, *user_data)

get_timezone_finish (result)

get_timezone_sync (tzid, cancellable)

get_view (sexp, cancellable, callback, *user_data)

get_view_finish (result)

get_view_sync (sexp, cancellable)

modify_object (icalcomp, mod, opflags, cancellable, callback, *user_data)

modify_object_finish (result)

modify_object_sync (icalcomp, mod, opflags, cancellable)

modify_objects (icalcomps, mod, opflags, cancellable, callback, *user_data)

modify_objects_finish (result)

modify_objects_sync (icalcomps, mod, opflags, cancellable)

receive_objects (icalcomp, opflags, cancellable, callback, *user_data)

receive_objects_finish (result)

receive_objects_sync (icalcomp, opflags, cancellable)

remove_object (uid, rid, mod, opflags, cancellable, callback, *user_data)

remove_object_finish (result)

remove_object_sync (uid, rid, mod, opflags, cancellable)

remove_objects (ids, mod, opflags, cancellable, callback, *user_data)

remove_objects_finish (result)

remove_objects_sync (ids, mod, opflags, cancellable)

send_objects (icalcomp, opflags, cancellable, callback, *user_data)

send_objects_finish (result)

send_objects_sync (icalcomp, opflags, cancellable)

set_default_timezone (zone)

Virtual Methods

Inherited:

EDataServer.Client (24), GObject.Object (7), ECal.TimezoneCache (2), Gio.AsyncInitable (2), Gio.Initable (1)

Properties

Inherited:

EDataServer.Client (6)

Name

Type

Flags

Short Description

default-timezone

ICalGLib.Timezone

r/w/en

Timezone used to resolve DATE and floating DATE-TIME values

source-type

ECal.ClientSourceType

r/w/co

The iCalendar data type

Signals

Inherited:

EDataServer.Client (4), GObject.Object (1), ECal.TimezoneCache (1)

Name

Short Description

free-busy-data

Fields

Inherited:

EDataServer.Client (4), GObject.Object (1), ECal.TimezoneCache (1)

Name

Type

Access

Description

parent

EDataServer.Client

r

Class Details

class ECal.Client(**kwargs)
Bases:

EDataServer.Client, ECal.TimezoneCache, Gio.AsyncInitable, Gio.Initable

Abstract:

No

Structure:

ECal.ClientClass

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

New in version 3.2.

classmethod check_timezones_sync(vcalendar, icalcomps, tzlookup, tzlookup_data, cancellable)
Parameters:
  • vcalendar (ICalGLib.Component) – a VCALENDAR containing a list of VTIMEZONE and arbitrary other components, in arbitrary order: these other components are modified by this call

  • icalcomps ([ICalGLib.Component] or None) – a list of ICalGLib.Component instances which also have to be patched; may be None

  • tzlookup (ECal.RecurResolveTimezoneCb or None) – a callback function which is called to retrieve a calendar’s VTIMEZONE definition; the returned definition is *not* freed by e_cal_client_check_timezones() None indicates that no such timezone exists or an error occurred

  • tzlookup_data (object or None) – an arbitrary pointer which is passed through to the tzlookup function

  • cancellable (Gio.Cancellable or None) – a Gio.Cancellable to use in tzlookup function

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

This function cleans up VEVENT, VJOURNAL, VTODO and VTIMEZONE items which are to be imported into Evolution.

Using VTIMEZONE definitions is problematic because they cannot be updated properly when timezone definitions change. They are also incomplete (for compatibility reason only one set of rules for summer saving changes can be included, even if different rules apply in different years). This function looks for matches of the used TZIDs against system timezones and replaces such TZIDs with the corresponding system timezone. This works for TZIDs containing a location (found via a fuzzy string search) and for Outlook TZIDs (via a hard-coded lookup table).

Some programs generate broken meeting invitations with TZID, but without including the corresponding VTIMEZONE. Importing such invitations unchanged causes problems later on (meeting displayed incorrectly, ECal.Component.get_as_string() fails). The situation where this occurred in the past (found by a SyncEvolution user) is now handled via the location based mapping.

If this mapping fails, this function also deals with VTIMEZONE conflicts: such conflicts occur when the calendar already contains an old VTIMEZONE definition with the same TZID, but different summer saving rules. Replacing the VTIMEZONE potentially breaks displaying of old events, whereas not replacing it breaks the new events (the behavior in Evolution <= 2.22.1).

The way this problem is resolved by renaming the new VTIMEZONE definition until the TZID is unique. A running count is appended to the TZID. All items referencing the renamed TZID are adapted accordingly.

New in version 3.34.

classmethod connect(source, source_type, wait_for_connected_seconds, cancellable, callback, *user_data)
Parameters:

Asynchronously creates a new ECal.Client for source and source_type.

The wait_for_connected_seconds argument had been added since 3.16, to let the caller decide how long to wait for the backend to fully connect to its (possibly remote) data store. This is required due to a change in the authentication process, which is fully asynchronous and done on the client side, while not every client is supposed to response to authentication requests. In case the backend will not connect within the set interval, then it is opened in an offline mode. A special value -1 can be used to not wait for the connected state at all.

Unlike with e_cal_client_new(), there is no need to call EDataServer.Client.open() after obtaining the ECal.Client.

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

New in version 3.8.

classmethod connect_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

a new ECal.Client, or None

Return type:

EDataServer.Client or None

Finishes the operation started with ECal.Client.connect(). If an error occurs in connecting to the D-Bus service, the function sets error and returns None.

For error handling convenience, any error message returned by this function will have a descriptive prefix that includes the display name of the EDataServer.Source passed to ECal.Client.connect().

New in version 3.8.

classmethod connect_sync(source, source_type, wait_for_connected_seconds, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a new ECal.Client, or None

Return type:

EDataServer.Client or None

Creates a new ECal.Client for source and source_type. If an error occurs, the function will set error and return False.

The wait_for_connected_seconds argument had been added since 3.16, to let the caller decide how long to wait for the backend to fully connect to its (possibly remote) data store. This is required due to a change in the authentication process, which is fully asynchronous and done on the client side, while not every client is supposed to response to authentication requests. In case the backend will not connect within the set interval, then it is opened in an offline mode. A special value -1 can be used to not wait for the connected state at all.

Unlike with e_cal_client_new(), there is no need to call EDataServer.Client.open_sync() after obtaining the ECal.Client.

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

New in version 3.8.

classmethod error_create(code, custom_msg)
Parameters:
Returns:

a new GLib.Error containing an #E_CAL_CLIENT_ERROR of the given code. If the custom_msg is None, then the error message is the one returned from ECal.Client.error_to_string() for the code, otherwise the given message is used. Returned pointer should be freed with GLib.Error.free().

Return type:

GLib.Error

New in version 3.2.

classmethod error_quark()
Return type:

int

classmethod error_to_string(code)
Parameters:

code (ECal.ClientError) – an ECal.ClientError error code

Returns:

Localized human readable description of the given error code

Return type:

str

Get localized human readable description of the given error code.

New in version 3.2.

classmethod tzlookup_cb(tzid, ecalclient, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

A timezone object, or None on failure or when not found.

Return type:

ICalGLib.Timezone or None

An implementation of the ECal.RecurResolveTimezoneCb callback which clients can use. Calls ECal.Client.get_timezone_sync().

The returned timezone object, if not None, is owned by the ecalclient.

New in version 3.34.

classmethod tzlookup_icalcomp_cb(tzid, lookup_data, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

A timezone object, or None, if not found inside lookup_data ‘s ICalGLib.Component.

Return type:

ICalGLib.Timezone or None

An implementation of the ECal.RecurResolveTimezoneCb callback which backends can use. Searches for the timezone in an ICalGLib.Component associated with the lookup_data ECal.ClientTzlookupICalCompData.

The returned timezone object is owned by the lookup_data.

New in version 3.34.

add_timezone(zone, cancellable, callback, *user_data)
Parameters:

Add a VTIMEZONE object to the given calendar client. The call is finished by ECal.Client.add_timezone_finish() from the callback.

New in version 3.2.

add_timezone_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Finishes previous call of ECal.Client.add_timezone().

New in version 3.2.

add_timezone_sync(zone, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Add a VTIMEZONE object to the given calendar client.

New in version 3.2.

check_one_alarm_only()
Returns:

True if the calendar allows only one alarm, False otherwise.

Return type:

bool

Checks if a calendar supports only one alarm per component.

New in version 3.2.

check_organizer_must_accept()
Returns:

True if the calendar requires organizers to accept, False otherwise.

Return type:

bool

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

New in version 3.2.

check_organizer_must_attend()
Returns:

True if the calendar forces organizers to attend meetings, False otherwise.

Return type:

bool

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

New in version 3.2.

check_recurrences_no_master()
Returns:

True if the calendar has a master object for recurrences, False otherwise.

Return type:

bool

Checks if the calendar has a master object for recurrences.

New in version 3.2.

check_save_schedules()
Returns:

True if it saves schedules, False otherwise.

Return type:

bool

Checks whether the calendar saves schedules.

New in version 3.2.

create_object(icalcomp, opflags, cancellable, callback, *user_data)
Parameters:

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 ECal.Client.create_object_finish() from the callback.

New in version 3.2.

create_object_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_uid:

Return value for the UID assigned to the new component by the calendar backend

Return type:

(bool, out_uid: str or None)

Finishes previous call of ECal.Client.create_object() and sets out_uid to newly assigned UID for the created object. This out_uid should be freed with GLib.free().

New in version 3.2.

create_object_sync(icalcomp, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_uid:

Return value for the UID assigned to the new component by the calendar backend

Return type:

(bool, out_uid: str or None)

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 GLib.free().

New in version 3.2.

create_objects(icalcomps, opflags, cancellable, callback, *user_data)
Parameters:

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 ECal.Client.create_objects_finish() from the callback.

New in version 3.6.

create_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_uids:

Return value for the UIDs assigned to the new components by the calendar backend

Return type:

(bool, out_uids: [str])

Finishes previous call of ECal.Client.create_objects() and sets out_uids to newly assigned UIDs for the created objects. This out_uids should be freed with EDataServer.Client.util_free_string_slist().

New in version 3.6.

create_objects_sync(icalcomps, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_uids:

Return value for the UIDs assigned to the new components by the calendar backend

Return type:

(bool, out_uids: [str])

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 EDataServer.Client.util_free_string_slist().

New in version 3.6.

discard_alarm(uid, rid, auid, opflags, cancellable, callback, *user_data)
Parameters:

Discards alarm auid from a given component identified by uid and rid. The call is finished by ECal.Client.discard_alarm_finish() from the callback.

New in version 3.2.

discard_alarm_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Finishes previous call of ECal.Client.discard_alarm().

New in version 3.2.

discard_alarm_sync(uid, rid, auid, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

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

New in version 3.2.

generate_instances(start, end, cancellable, cb, *cb_data)
Parameters:

Does a combination of ECal.Client.get_object_list() and ECal.recur_generate_instances_sync(). Unlike ECal.Client.generate_instances_sync(), this returns immediately and the cb callback is called asynchronously.

The callback function should do a GObject.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.

New in version 3.2.

generate_instances_for_object(icalcomp, start, end, cancellable, cb, *cb_data)
Parameters:

Does a combination of ECal.Client.get_object_list() and ECal.recur_generate_instances_sync(), like ECal.Client.generate_instances(), but for a single object. Unlike ECal.Client.generate_instances_for_object_sync(), this returns immediately and the cb callback is called asynchronously.

The callback function should do a GObject.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.

New in version 3.2.

generate_instances_for_object_sync(icalcomp, start, end, cancellable, cb, *cb_data)
Parameters:

Does a combination of ECal.Client.get_object_list() and ECal.recur_generate_instances_sync(), like ECal.Client.generate_instances_sync(), but for a single object.

The callback function should do a GObject.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.

New in version 3.2.

generate_instances_for_uid_sync(uid, start, end, cancellable, cb, *cb_data)
Parameters:

Does a combination of ECal.Client.get_object_list() and ECal.recur_generate_instances_sync(), like ECal.Client.generate_instances_sync(), but for a single object.

The callback function should do a GObject.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.

New in version 3.48.

generate_instances_sync(start, end, cancellable, cb, *cb_data)
Parameters:

Does a combination of ECal.Client.get_object_list() and ECal.recur_generate_instances_sync().

The callback function should do a GObject.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.

New in version 3.2.

get_attachment_uris(uid, rid, cancellable, callback, *user_data)
Parameters:

Queries a calendar for a specified component’s object attachment uris. The call is finished by ECal.Client.get_attachment_uris_finish() from the callback.

New in version 3.2.

get_attachment_uris_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_attachment_uris:

Return location for the list of attachment URIs

Return type:

(bool, out_attachment_uris: [str])

Finishes previous call of ECal.Client.get_attachment_uris() and sets out_attachment_uris to uris for component’s attachments. The list should be freed with EDataServer.Client.util_free_string_slist().

New in version 3.2.

get_attachment_uris_sync(uid, rid, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_attachment_uris:

Return location for the list of attachment URIs

Return type:

(bool, out_attachment_uris: [str])

Queries a calendar for a specified component’s object attachment URIs. The list should be freed with EDataServer.Client.util_free_string_slist().

New in version 3.2.

get_component_as_string(icalcomp)
Parameters:

icalcomp (ICalGLib.Component) – A calendar component object.

Returns:

the component as a complete iCalendar string, or None on failure. The string should be freed with GLib.free().

Return type:

str or None

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

New in version 3.2.

get_default_object(cancellable, callback, *user_data)
Parameters:

Retrives an ICalGLib.Component from the backend that contains the default values for properties needed. The call is finished by ECal.Client.get_default_object_finish() from the callback.

New in version 3.2.

get_default_object_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_icalcomp:

Return value for the default calendar object.

Return type:

(bool, out_icalcomp: ICalGLib.Component)

Finishes previous call of ECal.Client.get_default_object() and sets out_icalcomp to an ICalGLib.Component from the backend that contains the default values for properties needed. This out_icalcomp should be freed with GObject.Object.unref(), when no longer needed.

New in version 3.2.

get_default_object_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable; can be None

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_icalcomp:

Return value for the default calendar object.

Return type:

(bool, out_icalcomp: ICalGLib.Component)

Retrives an ICalGLib.Component from the backend that contains the default values for properties needed. This out_icalcomp should be freed with GObject.Object.unref(), when no longer needed.

New in version 3.2.

get_default_timezone()
Returns:

an ICalGLib.Timezone

Return type:

ICalGLib.Timezone

Returns the default timezone previously set with ECal.Client.set_default_timezone(). The returned pointer is owned by the self and should not be freed.

New in version 3.2.

get_free_busy(start, end, users, cancellable, callback, *user_data)
Parameters:

Begins retrieval of free/busy information from the calendar server as a list of ECal.Component-s. Connect to “free-busy-data” signal to receive chunks of free/busy components. The call is finished by ECal.Client.get_free_busy_finish() from the callback.

New in version 3.2.

get_free_busy_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_freebusy:

a GLib.SList of ECal.Component-s with overall returned Free/Busy data

Return type:

(bool, out_freebusy: [ECal.Component])

Finishes previous call of ECal.Client.get_free_busy(). The out_freebusy contains all VFREEBUSY ECal.Component-s, which could be also received by “free-busy-data” signal. The client is responsible to do a merge of the components between this complete list and those received through the signal.

New in version 3.2.

get_free_busy_sync(start, end, users, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_freebusy:

a GLib.SList of ECal.Component-s with overall returned Free/Busy data

Return type:

(bool, out_freebusy: [ECal.Component])

Gets free/busy information from the calendar server. The out_freebusy contains all VFREEBUSY ECal.Component-s, which could be also received by “free-busy-data” signal. The client is responsible to do a merge of the components between this complete list and those received through the signal.

New in version 3.2.

get_local_attachment_store()
Returns:

The URL where the attachments are serialized in the local filesystem.

Return type:

str

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.

New in version 3.2.

get_object(uid, rid, cancellable, callback, *user_data)
Parameters:

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

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

New in version 3.2.

get_object_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_icalcomp:

Return value for the calendar component object.

Return type:

(bool, out_icalcomp: ICalGLib.Component)

Finishes previous call of ECal.Client.get_object() and sets out_icalcomp to queried component. This function always returns master object for a case of rid being None or an empty string. This component should be freed with GObject.Object.unref(), when no longer needed.

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

New in version 3.2.

get_object_list(sexp, cancellable, callback, *user_data)
Parameters:

Gets a list of objects from the calendar that match the query specified by the sexp argument, returning matching objects as a list of ICalGLib.Component-s. The call is finished by ECal.Client.get_object_list_finish() from the callback.

New in version 3.2.

get_object_list_as_comps(sexp, cancellable, callback, *user_data)
Parameters:

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

New in version 3.2.

get_object_list_as_comps_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_ecalcomps:

list of matching ECal.Component s

Return type:

(bool, out_ecalcomps: [ECal.Component])

Finishes previous call of ECal.Client.get_object_list_as_comps() and sets out_ecalcomps to a matching list of ECal.Component-s. This list should be freed with EDataServer.Client.util_free_object_slist().

New in version 3.2.

get_object_list_as_comps_sync(sexp, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_ecalcomps:

list of matching ECal.Component s

Return type:

(bool, out_ecalcomps: [ECal.Component])

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 ECal.Component. This list should be freed with EDataServer.Client.util_free_object_slist().

New in version 3.2.

get_object_list_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_icalcomps:

list of matching ICalGLib.Component s

Return type:

(bool, out_icalcomps: [ICalGLib.Component])

Finishes previous call of ECal.Client.get_object_list() and sets out_icalcomps to a matching list of ICalGLib.Component-s. This list should be freed with EDataServer.Client.util_free_object_slist().

New in version 3.2.

get_object_list_sync(sexp, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_icalcomps:

list of matching ICalGLib.Component s

Return type:

(bool, out_icalcomps: [ICalGLib.Component])

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 ICalGLib.Component. This list should be freed with EDataServer.Client.util_free_object_slist().

New in version 3.2.

get_object_sync(uid, rid, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_icalcomp:

Return value for the calendar component object.

Return type:

(bool, out_icalcomp: ICalGLib.Component)

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 None or an empty string. This component should be freed with GObject.Object.unref(), when no longer needed.

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

New in version 3.2.

get_objects_for_uid(uid, cancellable, callback, *user_data)
Parameters:

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 ECal.Client.get_objects_for_uid_finish() from the callback.

New in version 3.2.

get_objects_for_uid_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_ecalcomps:

Return location for the list of objects obtained from the backend

Return type:

(bool, out_ecalcomps: [ECal.Component])

Finishes previous call of ECal.Client.get_objects_for_uid() and sets out_ecalcomps to a list of ECal.Component s corresponding to found components for a given uid of the same type as this client. This list should be freed with EDataServer.Client.util_free_object_slist().

New in version 3.2.

get_objects_for_uid_sync(uid, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_ecalcomps:

Return location for the list of objects obtained from the backend

Return type:

(bool, out_ecalcomps: [ECal.Component])

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 EDataServer.Client.util_free_object_slist().

New in version 3.2.

get_source_type()
Returns:

an ECal.ClientSourceType value corresponding to the source type of the calendar client.

Return type:

ECal.ClientSourceType

Gets the source type of the calendar client.

New in version 3.2.

get_timezone(tzid, cancellable, callback, *user_data)
Parameters:

Retrieves a timezone object from the calendar backend. The call is finished by ECal.Client.get_timezone_finish() from the callback.

New in version 3.2.

get_timezone_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_zone:

Return value for the timezone

Return type:

(bool, out_zone: ICalGLib.Timezone)

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

New in version 3.2.

get_timezone_sync(tzid, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_zone:

Return value for the timezone

Return type:

(bool, out_zone: ICalGLib.Timezone)

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

New in version 3.2.

get_view(sexp, cancellable, callback, *user_data)
Parameters:

Query self with sexp, creating an ECal.ClientView. The call is finished by ECal.Client.get_view_finish() from the callback.

New in version 3.2.

get_view_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_view:

an ECal.ClientView

Return type:

(bool, out_view: ECal.ClientView)

Finishes previous call of ECal.Client.get_view(). If successful, then the out_view is set to newly allocated ECal.ClientView, which should be freed with GObject.Object.unref().

New in version 3.2.

get_view_sync(sexp, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_view:

an ECal.ClientView

Return type:

(bool, out_view: ECal.ClientView)

Query self with sexp, creating an ECal.ClientView. If successful, then the out_view is set to newly allocated ECal.ClientView, which should be freed with GObject.Object.unref().

New in version 3.2.

modify_object(icalcomp, mod, opflags, cancellable, callback, *user_data)
Parameters:

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 (ECal.ObjModType.ALL), a single instance (ECal.ObjModType.THIS), or a specific set of instances (ECal.ObjModType.THIS_AND_PRIOR and ECal.ObjModType.THIS_AND_FUTURE).

The call is finished by ECal.Client.modify_object_finish() from the callback.

New in version 3.2.

modify_object_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Finishes previous call of ECal.Client.modify_object().

New in version 3.2.

modify_object_sync(icalcomp, mod, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

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 (ECal.ObjModType.ALL), a single instance (ECal.ObjModType.THIS), or a specific set of instances (ECal.ObjModType.THIS_AND_PRIOR and ECal.ObjModType.THIS_AND_FUTURE).

New in version 3.2.

modify_objects(icalcomps, mod, opflags, cancellable, callback, *user_data)
Parameters:

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 (ECal.ObjModType.ALL), a single instance (ECal.ObjModType.THIS), or a specific set of instances (ECal.ObjModType.THIS_AND_PRIOR and ECal.ObjModType.THIS_AND_FUTURE).

The call is finished by ECal.Client.modify_objects_finish() from the callback.

New in version 3.6.

modify_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Finishes previous call of ECal.Client.modify_objects().

New in version 3.6.

modify_objects_sync(icalcomps, mod, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

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 (ECal.ObjModType.ALL), a single instance (ECal.ObjModType.THIS), or a specific set of instances (ECal.ObjModType.THIS_AND_PRIOR and ECal.ObjModType.THIS_AND_FUTURE).

New in version 3.6.

receive_objects(icalcomp, opflags, cancellable, callback, *user_data)
Parameters:

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 ECal.Client.receive_objects_finish() from the callback.

New in version 3.2.

receive_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Finishes previous call of ECal.Client.receive_objects().

New in version 3.2.

receive_objects_sync(icalcomp, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

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.

New in version 3.2.

remove_object(uid, rid, mod, opflags, cancellable, callback, *user_data)
Parameters:

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 None rid and ECal.ObjModType.ALL for the mod.

The call is finished by ECal.Client.remove_object_finish() from the callback.

New in version 3.2.

remove_object_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Finishes previous call of ECal.Client.remove_object().

New in version 3.2.

remove_object_sync(uid, rid, mod, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

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 None rid and ECal.ObjModType.ALL for the mod.

New in version 3.2.

remove_objects(ids, mod, opflags, cancellable, callback, *user_data)
Parameters:

This function allows the removal of instances of recurrent appointments. ECal.ComponentId objects can identify specific instances (if rid is not None). If what you want is to remove all instances, use a None rid in the ECal.ComponentId and ECal.ObjModType.ALL for the mod.

The call is finished by ECal.Client.remove_objects_finish() from the callback.

New in version 3.6.

remove_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Finishes previous call of ECal.Client.remove_objects().

New in version 3.6.

remove_objects_sync(ids, mod, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

This function allows the removal of instances of recurrent appointments. ECal.ComponentId objects can identify specific instances (if rid is not None). If what you want is to remove all instances, use a None rid in the ECal.ComponentId and ECal.ObjModType.ALL for the mod.

New in version 3.6.

send_objects(icalcomp, opflags, cancellable, callback, *user_data)
Parameters:

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 ECal.Client.send_objects_finish() from the callback.

New in version 3.2.

send_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_users:

List of users to send the out_modified_icalcomp to

out_modified_icalcomp:

Return value for the ICalGLib.Component to be sent

Return type:

(bool, out_users: [str], out_modified_icalcomp: ICalGLib.Component)

Finishes previous call of ECal.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 EDataServer.Client.util_free_string_slist() and the out_modified_icalcomp should be freed with GObject.Object.unref().

New in version 3.2.

send_objects_sync(icalcomp, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

out_users:

List of users to send the out_modified_icalcomp to

out_modified_icalcomp:

Return value for the ICalGLib.Component to be sent

Return type:

(bool, out_users: [str], out_modified_icalcomp: ICalGLib.Component)

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 EDataServer.Client.util_free_string_slist() and the out_modified_icalcomp should be freed with GObject.Object.unref().

New in version 3.2.

set_default_timezone(zone)
Parameters:

zone (ICalGLib.Timezone) – A timezone object.

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.

New in version 3.2.

Signal Details

ECal.Client.signals.free_busy_data(client, free_busy_ecalcomps)
Signal Name:

free-busy-data

Flags:

RUN_FIRST

Parameters:

Property Details

ECal.Client.props.default_timezone
Name:

default-timezone

Type:

ICalGLib.Timezone

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Timezone used to resolve DATE and floating DATE-TIME values

ECal.Client.props.source_type
Name:

source-type

Type:

ECal.ClientSourceType

Default Value:

ECal.ClientSourceType.EVENTS

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The iCalendar data type