EDataCal.CalBackend¶
- Subclasses:
Methods¶
- Inherited:
EBackend.Backend (21), GObject.Object (37), ECal.TimezoneCache (3)
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
EBackend.Backend (3), GObject.Object (7), ECal.TimezoneCache (2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
The backend’s cache directory |
||
r/w/co |
The kind of iCalendar components this backend manages |
||
r |
The proxy resolver for this backend |
||
r/w/co |
Data source registry |
||
r/w/en |
Whether the backend will accept changes |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a client destroys its |
|
Emitted when the last client destroys its |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class EDataCal.CalBackend(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Contains only private data that should be read and manipulated using the functions below.
- classmethod mail_account_get_default(registry, address, name)¶
- Parameters:
registry (
EDataServer.SourceRegistry
) – anEDataServer.SourceRegistry
address (
str
) – placeholder for default addressname (
str
) – placeholder for name
- Returns:
- Return type:
Retrieve the default mail account as stored in Evolution configuration.
- classmethod mail_account_is_valid(registry, user, name)¶
- Parameters:
registry (
EDataServer.SourceRegistry
) – anEDataServer.SourceRegistry
user (
str
) – user name for the account to checkname (
str
) – placeholder for the account name
- Returns:
- Return type:
Checks that a mail account is valid, and returns its name.
- classmethod user_declined(registry, icalcomp)¶
- Parameters:
registry (
EDataServer.SourceRegistry
) – anEDataServer.SourceRegistry
icalcomp (
ICalGLib.Component
) – component where to check
- Returns:
Whether icalcomp contains attendee with a mail same as any of configured enabled mail account and whether this user declined.
- Return type:
New in version 2.26.
- add_timezone(tzobject, cancellable, callback, *user_data)¶
- Parameters:
tzobject (
str
) – an iCalendar VTIMEZONE stringcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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:
tzobject (
str
) – an iCalendar VTIMEZONE stringcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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
) – AnEDataCal.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:
- Returns:
a filename for an attachment in a local cache dir. Free returned pointer with a
GLib.free
().- Return type:
New in version 3.4.
- create_objects(calobjs, opflags, cancellable, callback, *user_data)¶
- Parameters:
calobjs (
str
) – aNone
-terminated array of iCalendar stringsopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisifeduser_data (
object
orNone
) – data to pass to the callback function
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:
result (
Gio.AsyncResult
) – aGio.AsyncResult
out_uids (
GLib.Queue
) – aGLib.Queue
in which to deposit results
- Raises:
- Returns:
- Return type:
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:
calobjs (
str
) – aNone
-terminated array of iCalendar stringsopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
out_uids (
GLib.Queue
) – aGLib.Queue
in which to deposit resultscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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:
uid (
str
) – a unique ID for an iCalendar objectalarm_uid (
str
) – a unique ID for an iCalendar VALARM objectopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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:
uid (
str
) – a unique ID for an iCalendar objectalarm_uid (
str
) – a unique ID for an iCalendar VALARM objectopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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:
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:
func (
EDataCal.CalBackendForeachViewFunc
) – anEDataCal.CalBackendForeachViewFunc
function to call
- Returns:
whether the call had been stopped by func
- Return type:
Calls func for each existing view (as returned by
EDataCal.CalBackend.list_views
()). The func can returnFalse
to stop early.New in version 3.34.
- foreach_view_notify_progress(only_completed_views, percent, message)¶
- Parameters:
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:
uid (
str
) – a unique ID for an iCalendar objectcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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:
result (
Gio.AsyncResult
) – aGio.AsyncResult
out_attachment_uris (
GLib.Queue
) – aGLib.Queue
in which to deposit results
- Raises:
- Returns:
- Return type:
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:
uid (
str
) – a unique ID for an iCalendar objectout_attachment_uris (
GLib.Queue
) – aGLib.Queue
in which to deposit resultscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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:
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:
Returns the cache directory path used by self.
New in version 2.32.
- get_free_busy(start, end, users, cancellable, callback, *user_data)¶
- Parameters:
start (
int
) – start timeend (
int
) – end timecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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:
result (
Gio.AsyncResult
) – aGio.AsyncResult
out_freebusy ([
str
]) – iCalendar strings with overall returned Free/Busy data
- Raises:
- Returns:
- Return type:
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 timeend (
int
) – end timeout_freebusy ([
str
]) – iCalendar strings with overall returned Free/Busy datacancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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:
Gets the kind of components the given backend stores.
- get_object(uid, rid, cancellable, callback, *user_data)¶
- Parameters:
uid (
str
) – a unique ID for an iCalendar objectcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
an
ECal.Component
, orNone
on error- Return type:
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:
query (
str
) – a search query in S-expression formatcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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:
result (
Gio.AsyncResult
) – aGio.AsyncResult
out_objects (
GLib.Queue
) – aGLib.Queue
in which to deposit results
- Raises:
- Returns:
- Return type:
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:
query (
str
) – a search query in S-expression formatout_objects (
GLib.Queue
) – aGLib.Queue
in which to deposit resultscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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:
uid (
str
) – a unique ID for an iCalendar objectcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
an
ECal.Component
, orNone
on error- Return type:
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:
- Return type:
Returns the data source registry to which
EBackend.Backend
:source
belongs.New in version 3.6.
- get_timezone(tzid, cancellable, callback, *user_data)¶
- Parameters:
tzid (
str
) – a unique ID for an iCalendar VTIMEZONE objectcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
an iCalendar string, or
None
on error- Return type:
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:
tzid (
str
) – a unique ID for an iCalendar VTIMEZONE objectcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
an iCalendar string, or
None
on error- Return type:
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:
Returns whether self will accept changes to its data content.
New in version 3.8.
- is_opened()¶
-
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.
- list_views()¶
- Returns:
a list of cal views
- Return type:
Returns a list of
EDataCal.DataCalView
instances added withEDataCal.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:
calobjs (
str
) – aNone
-terminated array of iCalendar stringsmod (
ECal.ObjModType
) – modification type for recurrencesopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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:
calobjs (
str
) – aNone
-terminated array of iCalendar stringsmod (
ECal.ObjModType
) – modification type for recurrencesopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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 createdECal.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:
old_component (
ECal.Component
) – theECal.Component
before the modificationnew_component (
ECal.Component
) – theECal.Component
after the modification
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 objectold_component (
ECal.Component
) – the removed componentnew_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:
Notifies client about property value change.
New in version 3.2.
- open(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
“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)¶
- Parameters:
opid (
int
) – an operation ID given toEDataCal.DataCal
- Returns:
a
Gio.Task
- Return type:
Obtains the
Gio.Task
for opid.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:
calobj (
str
) – an iCalendar stringopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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:
calobj (
str
) – an iCalendar stringopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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
, orNone
- Return type:
Returns the
EDataCal.DataCal
for self. TheEDataCal.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 anEDataCal.DataCal
has not yet been set, the function returnsNone
.The returned
EDataCal.DataCal
is referenced for thread-safety and must be unreferenced withGObject.Object.unref
() when finished with it.New in version 3.10.
- ref_proxy_resolver()¶
- Returns:
a
Gio.ProxyResolver
, orNone
- Return type:
Returns the
Gio.ProxyResolver
for self (if applicable), as indicated by theEDataServer.SourceAuthentication
:proxy-uid
of self'sEBackend.Backend
:source
or one of its ancestors.The returned
Gio.ProxyResolver
is referenced for thread-safety and must be unreferenced withGObject.Object.unref
() when finished with it.New in version 3.12.
- refresh(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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 anEDataServer.ClientError.NOT_SUPPORTED
error and returnFalse
.New in version 3.10.
- refresh_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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 anEDataServer.ClientError.NOT_SUPPORTED
error and returnFalse
.New in version 3.10.
- remove_objects(component_ids, mod, opflags, cancellable, callback, *user_data)¶
- Parameters:
component_ids ([
ECal.ComponentId
]) – aGLib.List
ofECal.ComponentId
structsmod (
ECal.ObjModType
) – modification type for recurrencesopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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:
component_ids ([
ECal.ComponentId
]) – aGLib.List
ofECal.ComponentId
structsmod (
ECal.ObjModType
) – modification type for recurrencesopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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
) – AnEDataCal.DataCalView
object, previously added with refEDataCal.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:
use_cancellable (
Gio.Cancellable
orNone
) – an optionalGio.Cancellable
to use for funcfunc (
EDataCal.CalBackendCustomOpFunc
) – a function to call in a dedicated thread
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:
calobj (
str
) – an iCalendar stringopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
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:
result (
Gio.AsyncResult
) – aGio.AsyncResult
out_users (
GLib.Queue
) – aGLib.Queue
in which to deposit results
- Raises:
- Returns:
a newly allocated vCalendar string, or
None
on error- Return type:
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:
calobj (
str
) – an iCalendar stringopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
out_users (
GLib.Queue
) – aGLib.Queue
in which to deposit resultscancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
a vCalendar string, or
None
on error- Return type:
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
) – anEDataCal.DataCal
Sets the
EDataCal.DataCal
for self. TheEDataCal.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
) –
A signal notifying that the backend was closed
- do_impl_add_timezone(cal, opid, cancellable, tzobject) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –tzobject (
str
) –
FIXME: Document me
- do_impl_discard_alarm(cal, opid, cancellable, uid, rid, auid, opflags) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –uid (
str
) –rid (
str
) –auid (
str
) –opflags (
ECal.OperationFlags
) –
FIXME: Document me
- do_impl_get_attachment_uris(cal, opid, cancellable, uid, rid) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –uid (
str
) –rid (
str
) –
FIXME: Document me
- do_impl_get_backend_property(prop_name) virtual¶
-
Fetch a property value by name from the backend
- do_impl_get_object(cal, opid, cancellable, uid, rid) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –uid (
str
) –rid (
str
) –
Fetch a calendar object
- do_impl_get_object_list(cal, opid, cancellable, sexp) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –sexp (
str
) –
FIXME: Document me
- do_impl_get_timezone(cal, opid, cancellable, tzid) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –tzid (
str
) –
FIXME: Document me
- do_impl_open(cal, opid, cancellable) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –
Open the backend
- do_impl_receive_objects(cal, opid, cancellable, calobj, opflags) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –calobj (
str
) –opflags (
ECal.OperationFlags
) –
FIXME: Document me
- do_impl_refresh(cal, opid, cancellable) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –
Refresh the backend
- do_impl_send_objects(cal, opid, cancellable, calobj, opflags) virtual¶
- Parameters:
cal (
EDataCal.DataCal
) –opid (
int
) –cancellable (
Gio.Cancellable
orNone
) –calobj (
str
) –opflags (
ECal.OperationFlags
) –
FIXME: Document me
- do_impl_start_view(view) virtual¶
- Parameters:
view (
EDataCal.DataCalView
) –
Start up the specified view
- do_impl_stop_view(view) virtual¶
- Parameters:
view (
EDataCal.DataCalView
) –
Stop the specified view
- do_shutdown() virtual¶
A signal notifying that the backend is being shut down
Signal Details¶
- EDataCal.CalBackend.signals.closed(cal_backend, sender)¶
- Signal Name:
closed
- Flags:
- Parameters:
cal_backend (
EDataCal.CalBackend
) – The object which received the signalsender (
str
) – the bus name that invoked the “close” method
Emitted when a client destroys its
ECal.Client
for backendNew in version 3.10.
- EDataCal.CalBackend.signals.shutdown(cal_backend)¶
- Signal Name:
shutdown
- Flags:
- 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:
- Default Value:
- Flags:
The backend’s cache directory
- EDataCal.CalBackend.props.kind¶
- Name:
kind
- Type:
- Default Value:
0
- Flags:
The kind of iCalendar components this backend manages
- EDataCal.CalBackend.props.proxy_resolver¶
- Name:
proxy-resolver
- Type:
- Default Value:
- Flags:
The proxy resolver for this backend
- EDataCal.CalBackend.props.registry¶
- Name:
registry
- Type:
- Default Value:
- Flags:
Data source registry