EDataCal.CalBackend

g EBackend.Backend EBackend.Backend EDataCal.CalBackend EDataCal.CalBackend EBackend.Backend->EDataCal.CalBackend ECal.TimezoneCache ECal.TimezoneCache ECal.TimezoneCache->EDataCal.CalBackend GObject.GInterface GObject.GInterface GObject.GInterface->ECal.TimezoneCache GObject.Object GObject.Object GObject.Object->EBackend.Backend

Subclasses:

EDataCal.CalBackendSync

Methods

Inherited:

EBackend.Backend (21), GObject.Object (37), ECal.TimezoneCache (3)

Structs:

GObject.ObjectClass (5)

class

mail_account_get_default (registry, address, name)

class

mail_account_is_valid (registry, user, name)

class

user_declined (registry, icalcomp)

add_timezone (tzobject, cancellable, callback, *user_data)

add_timezone_finish (result)

add_timezone_sync (tzobject, cancellable)

add_view (view)

create_cache_filename (uid, filename, fileindex)

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

create_objects_finish (result, out_uids)

create_objects_sync (calobjs, opflags, out_uids, cancellable)

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

discard_alarm_finish (result)

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

dup_cache_dir ()

foreach_view (func, *user_data)

foreach_view_notify_progress (only_completed_views, percent, message)

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

get_attachment_uris_finish (result, out_attachment_uris)

get_attachment_uris_sync (uid, rid, out_attachment_uris, cancellable)

get_backend_property (prop_name)

get_cache_dir ()

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

get_free_busy_finish (result, out_freebusy)

get_free_busy_sync (start, end, users, out_freebusy, cancellable)

get_kind ()

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

get_object_finish (result)

get_object_list (query, cancellable, callback, *user_data)

get_object_list_finish (result, out_objects)

get_object_list_sync (query, out_objects, cancellable)

get_object_sync (uid, rid, cancellable)

get_registry ()

get_timezone (tzid, cancellable, callback, *user_data)

get_timezone_finish (result)

get_timezone_sync (tzid, cancellable)

get_writable ()

is_opened ()

is_readonly ()

list_views ()

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

modify_objects_finish (result)

modify_objects_sync (calobjs, mod, opflags, cancellable)

notify_component_created (component)

notify_component_modified (old_component, new_component)

notify_component_removed (id, old_component, new_component)

notify_error (message)

notify_property_changed (prop_name, prop_value)

open (cancellable, callback, *user_data)

open_finish (result)

open_sync (cancellable)

prepare_for_completion (opid, result_queue)

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

receive_objects_finish (result)

receive_objects_sync (calobj, opflags, cancellable)

ref_data_cal ()

ref_proxy_resolver ()

refresh (cancellable, callback, *user_data)

refresh_finish (result)

refresh_sync (cancellable)

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

remove_objects_finish (result)

remove_objects_sync (component_ids, mod, opflags, cancellable)

remove_view (view)

schedule_custom_operation (use_cancellable, func, *user_data)

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

send_objects_finish (result, out_users)

send_objects_sync (calobj, opflags, out_users, cancellable)

set_cache_dir (cache_dir)

set_data_cal (data_cal)

set_writable (writable)

start_view (view)

stop_view (view)

Virtual Methods

Inherited:

EBackend.Backend (3), GObject.Object (7), ECal.TimezoneCache (2)

do_closed (sender)

do_impl_add_timezone (cal, opid, cancellable, tzobject)

do_impl_discard_alarm (cal, opid, cancellable, uid, rid, auid, opflags)

do_impl_get_attachment_uris (cal, opid, cancellable, uid, rid)

do_impl_get_backend_property (prop_name)

do_impl_get_object (cal, opid, cancellable, uid, rid)

do_impl_get_object_list (cal, opid, cancellable, sexp)

do_impl_get_timezone (cal, opid, cancellable, tzid)

do_impl_open (cal, opid, cancellable)

do_impl_receive_objects (cal, opid, cancellable, calobj, opflags)

do_impl_refresh (cal, opid, cancellable)

do_impl_send_objects (cal, opid, cancellable, calobj, opflags)

do_impl_start_view (view)

do_impl_stop_view (view)

do_shutdown ()

Properties

Inherited:

EBackend.Backend (5)

Name

Type

Flags

Short Description

cache-dir

str

r/w/en

The backend’s cache directory

kind

int

r/w/co

The kind of iCalendar components this backend manages

proxy-resolver

Gio.ProxyResolver

r

The proxy resolver for this backend

registry

EDataServer.SourceRegistry

r/w/co

Data source registry

writable

bool

r/w/en

Whether the backend will accept changes

Signals

Inherited:

GObject.Object (1), ECal.TimezoneCache (1)

Name

Short Description

closed

Emitted when a client destroys its ECal.Client for backend

shutdown

Emitted when the last client destroys its ECal.Client for backend.

Fields

Inherited:

GObject.Object (1), ECal.TimezoneCache (1)

Name

Type

Access

Description

parent

EBackend.Backend

r

Class Details

class EDataCal.CalBackend(**kwargs)
Bases:

EBackend.Backend, ECal.TimezoneCache

Abstract:

No

Structure:

EDataCal.CalBackendClass

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

classmethod mail_account_get_default(registry, address, name)
Parameters:
Returns:

True if there is a default account, False otherwise.

Return type:

bool

Retrieve the default mail account as stored in Evolution configuration.

classmethod mail_account_is_valid(registry, user, name)
Parameters:
Returns:

True if the account is valid, False if not.

Return type:

bool

Checks that a mail account is valid, and returns its name.

classmethod user_declined(registry, icalcomp)
Parameters:
Returns:

Whether icalcomp contains attendee with a mail same as any of configured enabled mail account and whether this user declined.

Return type:

bool

New in version 2.26.

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

Asynchronously adds the timezone described by tzobject to self.

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

New in version 3.10.

add_timezone_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.add_timezone().

If an error occurred, the function will set error and return False.

New in version 3.10.

add_timezone_sync(tzobject, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Adds the timezone described by tzobject to self.

If an error occurs, the function will set error and return False.

New in version 3.10.

add_view(view)
Parameters:

view (EDataCal.DataCalView) – An EDataCal.DataCalView object.

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

New in version 3.2.

create_cache_filename(uid, filename, fileindex)
Parameters:
  • uid (str) – a component UID

  • filename (str or None) – a filename to use; can be None

  • fileindex (int) – index of a file; used only when filename is None

Returns:

a filename for an attachment in a local cache dir. Free returned pointer with a GLib.free().

Return type:

str

New in version 3.4.

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

Asynchronously creates one or more new iCalendar objects from calobjs.

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

New in version 3.10.

create_objects_finish(result, out_uids)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.create_objects().

A unique ID string for each newly-created object is deposited in out_uids. Free the returned ID strings with GLib.free() when finished with them.

If an error occurred, the function will set error and return False.

New in version 3.10.

create_objects_sync(calobjs, opflags, out_uids, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Creates one or more new iCalendar objects from calobjs, and deposits the unique ID string for each newly-created object in out_uids.

Free the returned ID strings with GLib.free() when finished with them.

If an error occurs, the function will set error and return False.

New in version 3.10.

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

Asynchronously discards the VALARM object with a unique ID of alarm_uid from the iCalendar object identified by uid and, optionally, rid.

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

New in version 3.10.

discard_alarm_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.discard_alarm().

If an error occurred, the function will set error and return False.

New in version 3.10.

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

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Discards the VALARM object with a unique ID of alarm_uid from the iCalendar object identified by uid and, optionally, rid.

If an error occurs, the function will set error and return False.

New in version 3.10.

dup_cache_dir()
Returns:

a newly-allocated copy of EDataCal.CalBackend :cache-dir

Return type:

str

Thread-safe variation of EDataCal.CalBackend.get_cache_dir(). Use this function when accessing self from multiple threads.

The returned string should be freed with GLib.free() when no longer needed.

New in version 3.10.

foreach_view(func, *user_data)
Parameters:
Returns:

whether the call had been stopped by func

Return type:

bool

Calls func for each existing view (as returned by EDataCal.CalBackend.list_views()). The func can return False to stop early.

New in version 3.34.

foreach_view_notify_progress(only_completed_views, percent, message)
Parameters:
  • only_completed_views (bool) – whether notify in completed views only

  • percent (int) – percent complete

  • message (str or None) – message describing the operation in progress, or None

Notifies each view of the self about progress. When only_completed_views is True, notifies only completed views.

New in version 3.34.

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

Asynchronously inspects the iCalendar object specified by uid and, optionally, rid for attachments.

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

New in version 3.10.

get_attachment_uris_finish(result, out_attachment_uris)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.get_attachment_uris().

The requested attachment URI strings are deposited in out_attachment_uris. Free the returned strings with GLib.free() when finished with them.

If an error occurred, the function will set error and return False. Note that an empty result set does not necessarily imply an error.

New in version 3.10.

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

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Inspects the iCalendar object specified by uid and, optionally, rid for attachments and deposits a URI string for each attachment in out_attachment_uris. Free the returned strings with GLib.free() when finished with them.

If an error occurs, the function will set error and return False. Note that an empty result set does not necessarily imply an error.

New in version 3.10.

get_backend_property(prop_name)
Parameters:

prop_name (str) – a backend property name

Returns:

the value for prop_name

Return type:

str

Obtains the value of the backend property named prop_name. Freed the returned string with GLib.free() when finished with it.

New in version 3.10.

get_cache_dir()
Returns:

the cache directory path

Return type:

str

Returns the cache directory path used by self.

New in version 2.32.

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

Asynchronously obtains a free/busy object for the list of users in the time interval between start and end.

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

New in version 3.10.

get_free_busy_finish(result, out_freebusy)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.get_free_busy().

The free/busy results can be returned through the EDataCal.DataCal.report_free_busy_data() function asynchronously. The out_freebusy will contain all the returned data, possibly again, thus the client is responsible for the data merge, if needed.

If an error occurred, the function will set error and return False.

New in version 3.10.

get_free_busy_sync(start, end, users, out_freebusy, cancellable)
Parameters:
  • start (int) – start time

  • end (int) – end time

  • users ([str]) – a None-terminated array of user strings

  • out_freebusy ([str]) – iCalendar strings with overall returned Free/Busy data

  • cancellable (Gio.Cancellable or None) – optional Gio.Cancellable object, or None

Raises:

GLib.Error

Returns:

True on success, False on failure.

Return type:

bool

Obtains a free/busy object for the list of users in the time interval between start and end.

The free/busy results can be returned through the EDataCal.DataCal.report_free_busy_data() function asynchronously. The out_freebusy will contain all the returned data, possibly again, thus the client is responsible for the data merge, if needed.

If an error occurs, the function will set error and return False.

New in version 3.10.

get_kind()
Returns:

The kind of components for this backend.

Return type:

ICalGLib.ComponentKind

Gets the kind of components the given backend stores.

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

Asynchronously obtains an ECal.Component by its uid and, optionally, rid.

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

New in version 3.10.

get_object_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

an ECal.Component, or None on error

Return type:

str

Finishes the operation started with EDataCal.CalBackend.get_object().

The returned string is an iCalendar object describing either single component or a vCalendar object, which includes also detached instances. It should be freed when no longer needed.

If an error occurs, the function will set error and return None.

New in version 3.10.

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

Asynchronously obtains a set of iCalendar instances which satisfy the criteria specified in query.

When the operation in finished, callback will be called. You can then call EDataCal.CalBackend.get_object_list_finish() to get the result of the operation.

New in version 3.10.

get_object_list_finish(result, out_objects)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.get_object_list().

The matching iCalendar instances are deposited in out_objects. The returned instances should be freed with GLib.free() when finished with them.

If an error occurred, the function will set error and return False. Note that an empty result set does not necessarily imply an error.

New in version 3.10.

get_object_list_sync(query, out_objects, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Obtains a set of iCalendar string instances which satisfy the criteria specified in query, and deposits them in out_objects.

The returned instances should be freed with GLib.free() when finished with them.

If an error occurs, the function will set error and return False. Note that an empty result set does not necessarily imply an error.

New in version 3.10.

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

GLib.Error

Returns:

an ECal.Component, or None on error

Return type:

str

Obtains an iCalendar string for an object identified by its uid and, optionally, rid.

The returned string should be freed with GLib.free() when finished with it.

If an error occurs, the function will set error and return None.

New in version 3.10.

get_registry()
Returns:

an EDataServer.SourceRegistry

Return type:

EDataServer.SourceRegistry

Returns the data source registry to which EBackend.Backend :source belongs.

New in version 3.6.

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

Asynchronously obtains the VTIMEZONE object identified by tzid.

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

New in version 3.10.

get_timezone_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

an iCalendar string, or None on error

Return type:

str

Finishes the operation started with EDataCal.CalBackend.get_timezone().

Free the returned string with GLib.free() when finished with it.

If an error occurred, the function will set error and return None.

New in version 3.10.

get_timezone_sync(tzid, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

an iCalendar string, or None on error

Return type:

str

Obtains the VTIMEZONE object identified by tzid. Free the returned string with GLib.free() when finished with it.

If an error occurs, the function will set error and return None.

New in version 3.10.

get_writable()
Returns:

whether self is writable

Return type:

bool

Returns whether self will accept changes to its data content.

New in version 3.8.

is_opened()
Returns:

True if fully opened, False otherwise.

Return type:

bool

Checks if self's storage has been opened (and authenticated, if necessary) and the backend itself is ready for accessing. This property is changed automatically after the self is successfully opened.

New in version 3.2.

is_readonly()
Returns:

Whether is backend read-only.

Return type:

bool

New in version 3.2.

list_views()
Returns:

a list of cal views

Return type:

[EDataCal.DataCalView]

Returns a list of EDataCal.DataCalView instances added with EDataCal.CalBackend.add_view().

The views returned in the list are referenced for thread-safety. They must each be unreferenced with GObject.Object.unref() when finished with them. Free the returned list itself with g_list_free().

An easy way to free the list properly in one step is as follows:

g_list_free_full (list, g_object_unref);

New in version 3.8.

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

Asynchronously modifies one or more iCalendar objects according to calobjs and mod.

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

New in version 3.10.

modify_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.modify_objects().

If an error occurred, the function will set error and return False.

New in version 3.10.

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

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Modifies one or more iCalendar objects according to calobjs and mod.

If an error occurs, the function will set error and return False.

New in version 3.10.

notify_component_created(component)
Parameters:

component (ECal.Component) – the newly created ECal.Component

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

Uses the EDataCal.DataCalView's fields-of-interest to filter out unwanted information from ical strings sent over the bus.

New in version 3.4.

notify_component_modified(old_component, new_component)
Parameters:

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

Uses the EDataCal.DataCalView's fields-of-interest to filter out unwanted information from ical strings sent over the bus.

New in version 3.4.

notify_component_removed(id, old_component, new_component)
Parameters:
  • id (ECal.ComponentId) – the Id of the removed object

  • old_component (ECal.Component) – the removed component

  • new_component (ECal.Component) – the component after the removal. This only applies to recurrent appointments that had an instance removed. In that case, this function notifies a modification instead of a removal.

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

Uses the EDataCal.DataCalView's fields-of-interest to filter out unwanted information from ical strings sent over the bus.

New in version 3.4.

notify_error(message)
Parameters:

message (str) – Error message

Notifies each of the backend’s listeners about an error

notify_property_changed(prop_name, prop_value)
Parameters:
  • prop_name (str) – property name, which changed

  • prop_value (str or None) – new property value

Notifies client about property value change.

New in version 3.2.

open(cancellable, callback, *user_data)
Parameters:

Asynchronously “opens” the self. Opening a backend is something of an outdated concept, but the operation is hanging around for a little while longer. This usually involves some custom initialization logic, and testing of remote authentication if applicable.

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

New in version 3.10.

open_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.open().

If an error occurred, the function will set error and return False.

New in version 3.10.

open_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – optional Gio.Cancellable object, or None

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

“Opens” the self. Opening a backend is something of an outdated concept, but the operation is hanging around for a little while longer. This usually involves some custom initialization logic, and testing of remote authentication if applicable.

If an error occurs, the function will set error and return False.

New in version 3.10.

prepare_for_completion(opid, result_queue)
Parameters:
Returns:

a Gio.SimpleAsyncResult

Return type:

Gio.SimpleAsyncResult

Obtains the Gio.SimpleAsyncResult for opid and sets result_queue as a place to deposit results prior to completing the Gio.SimpleAsyncResult.

This is a temporary function to serve EDataCal.DataCal's “respond” functions until they can be removed. Nothing else should be calling this function.

New in version 3.10.

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

Asynchronously receives the set of iCalendar objects specified by calobj. This is used for iTIP confirmation and cancellation messages for scheduled meetings.

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

New in version 3.10.

receive_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.receive_objects().

If an error occurred, the function will set error and erturn False.

New in version 3.10.

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

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Receives the set of iCalendar objects specified by calobj. This is used for iTIP confirmation and cancellation messages for scheduled meetings.

If an error occurs, the function will set error and return False.

New in version 3.10.

ref_data_cal()
Returns:

an EDataCal.DataCal, or None

Return type:

EDataCal.DataCal or None

Returns the EDataCal.DataCal for self. The EDataCal.DataCal is essentially the glue between incoming D-Bus requests and self's native API.

An EDataCal.DataCal should be set only once after self is first created. If an EDataCal.DataCal has not yet been set, the function returns None.

The returned EDataCal.DataCal is referenced for thread-safety and must be unreferenced with GObject.Object.unref() when finished with it.

New in version 3.10.

ref_proxy_resolver()
Returns:

a Gio.ProxyResolver, or None

Return type:

Gio.ProxyResolver or None

Returns the Gio.ProxyResolver for self (if applicable), as indicated by the EDataServer.SourceAuthentication :proxy-uid of self's EBackend.Backend :source or one of its ancestors.

The returned Gio.ProxyResolver is referenced for thread-safety and must be unreferenced with GObject.Object.unref() when finished with it.

New in version 3.12.

refresh(cancellable, callback, *user_data)
Parameters:

Asynchronously initiates a refresh for self, if the self supports refreshing. The actual refresh operation completes on its own time. This function, along with EDataCal.CalBackend.refresh_finish(), merely initiates the operation.

Once the refresh is initiated, callback will be called. You can then call EDataCal.CalBackend.refresh_finish() to get the result of the initiation.

New in version 3.10.

refresh_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the refresh initiation started with EDataCal.CalBackend.refresh().

If an error occurred while initiating the refresh, the function will set error and return False. If the self does not support refreshing, the function will set an EDataServer.ClientError.NOT_SUPPORTED error and return False.

New in version 3.10.

refresh_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – optional Gio.Cancellable object, or None

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Initiates a refresh for self, if the self supports refreshing. The actual refresh operation completes on its own time. This function merely initiates the operation.

If an error occrs while initiating the refresh, the function will set error and return False. If the self does not support refreshing, the function will set an EDataServer.ClientError.NOT_SUPPORTED error and return False.

New in version 3.10.

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

Asynchronously removes one or more iCalendar objects according to component_ids and mod.

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

New in version 3.10.

remove_objects_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Finishes the operation started with EDataCal.CalBackend.remove_objects().

If an error occurred, the function will set error and return False.

New in version 3.10.

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

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Removes one or more iCalendar objects according to component_ids and mod.

If an error occurs, the function will set error and return False.

New in version 3.10.

remove_view(view)
Parameters:

view (EDataCal.DataCalView) – An EDataCal.DataCalView object, previously added with ref EDataCal.CalBackend.add_view.

Removes view from the list of live views for the backend.

New in version 3.2.

schedule_custom_operation(use_cancellable, func, *user_data)
Parameters:

Schedules user function func to be run in a dedicated thread as a blocking operation.

The function adds its own reference to use_cancellable, if not None.

The error returned from func is propagated to client using EDataCal.CalBackend.notify_error() function. If it’s not desired, then left the error unchanged and notify about errors manually.

New in version 3.26.

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

Asynchronously sends meeting information in calobj. The self may modify calobj and send meeting information only to particular users.

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

New in version 3.10.

send_objects_finish(result, out_users)
Parameters:
Raises:

GLib.Error

Returns:

a newly allocated vCalendar string, or None on error

Return type:

str

Finishes the operation started with EDataCal.CalBackend.send_objects().

The function returns a string representation of a sent, or to be send, vCalendar and deposits the list of users the meeting information was sent to, or to be send to, in out_users.

Free the returned pointer with GLib.free(), when no longer needed.

If an error occurs, the function will set error and return None.

New in version 3.10.

send_objects_sync(calobj, opflags, out_users, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a vCalendar string, or None on error

Return type:

str

Sends meeting information in calobj. The self may modify calobj and send meeting information only to particular users. The function returns the (maybe) modified calobj and deposits the list of users the meeting information was sent (to be send) to in out_users.

The returned pointer should be freed with GLib.free(), when no londer needed.

If an error occurs, the function will set error and return None.

New in version 3.10.

set_cache_dir(cache_dir)
Parameters:

cache_dir (str) – a local cache directory path

Sets the cache directory path for use by self.

Note that EDataCal.CalBackend is initialized with a default cache directory path which should suffice for most cases. Backends should not override the default path without good reason.

New in version 2.32.

set_data_cal(data_cal)
Parameters:

data_cal (EDataCal.DataCal) – an EDataCal.DataCal

Sets the EDataCal.DataCal for self. The EDataCal.DataCal is essentially the glue between incoming D-Bus requests and self's native API.

An EDataCal.DataCal should be set only once after self is first created.

The self adds its own reference on the data_cal.

New in version 3.10.

set_writable(writable)
Parameters:

writable (bool) – whether self is writable

Sets whether self will accept changes to its data content.

New in version 3.8.

start_view(view)
Parameters:

view (EDataCal.DataCalView) – The view to be started.

Starts a new live view on the given backend.

New in version 3.2.

stop_view(view)
Parameters:

view (EDataCal.DataCalView) – The view to be stopped.

Stops a previously started live view on the given backend.

New in version 3.2.

do_closed(sender) virtual
Parameters:

sender (str) –

do_impl_add_timezone(cal, opid, cancellable, tzobject) virtual
Parameters:
do_impl_discard_alarm(cal, opid, cancellable, uid, rid, auid, opflags) virtual
Parameters:
do_impl_get_attachment_uris(cal, opid, cancellable, uid, rid) virtual
Parameters:
do_impl_get_backend_property(prop_name) virtual
Parameters:

prop_name (str) –

Return type:

str

do_impl_get_object(cal, opid, cancellable, uid, rid) virtual
Parameters:
do_impl_get_object_list(cal, opid, cancellable, sexp) virtual
Parameters:
do_impl_get_timezone(cal, opid, cancellable, tzid) virtual
Parameters:
do_impl_open(cal, opid, cancellable) virtual
Parameters:
do_impl_receive_objects(cal, opid, cancellable, calobj, opflags) virtual
Parameters:
do_impl_refresh(cal, opid, cancellable) virtual
Parameters:
do_impl_send_objects(cal, opid, cancellable, calobj, opflags) virtual
Parameters:
do_impl_start_view(view) virtual
Parameters:

view (EDataCal.DataCalView) –

do_impl_stop_view(view) virtual
Parameters:

view (EDataCal.DataCalView) –

do_shutdown() virtual

Signal Details

EDataCal.CalBackend.signals.closed(cal_backend, sender)
Signal Name:

closed

Flags:

RUN_LAST

Parameters:
  • cal_backend (EDataCal.CalBackend) – The object which received the signal

  • sender (str) – the bus name that invoked the “close” method

Emitted when a client destroys its ECal.Client for backend

New in version 3.10.

EDataCal.CalBackend.signals.shutdown(cal_backend)
Signal Name:

shutdown

Flags:

RUN_LAST

Parameters:

cal_backend (EDataCal.CalBackend) – The object which received the signal

Emitted when the last client destroys its ECal.Client for backend. This signals the backend to begin final cleanup tasks such as synchronizing data to permanent storage.

New in version 3.10.

Property Details

EDataCal.CalBackend.props.cache_dir
Name:

cache-dir

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The backend’s cache directory

EDataCal.CalBackend.props.kind
Name:

kind

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The kind of iCalendar components this backend manages

EDataCal.CalBackend.props.proxy_resolver
Name:

proxy-resolver

Type:

Gio.ProxyResolver

Default Value:

None

Flags:

READABLE

The proxy resolver for this backend

EDataCal.CalBackend.props.registry
Name:

registry

Type:

EDataServer.SourceRegistry

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Data source registry

EDataCal.CalBackend.props.writable
Name:

writable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the backend will accept changes