ECal.Client¶
- Subclasses:
None
Methods¶
- Inherited:
EDataServer.Client (47), GObject.Object (37), ECal.TimezoneCache (3), Gio.AsyncInitable (4), Gio.Initable (2)
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Timezone used to resolve DATE and floating DATE-TIME values |
||
r/w/co |
The iCalendar data type |
Signals¶
Name |
Short Description |
---|---|
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class ECal.Client(**kwargs)¶
- Bases:
EDataServer.Client
,ECal.TimezoneCache
,Gio.AsyncInitable
,Gio.Initable
- Abstract:
No
- Structure:
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 callicalcomps ([
ICalGLib.Component
] orNone
) – a list ofICalGLib.Component
instances which also have to be patched; may beNone
tzlookup (
ECal.RecurResolveTimezoneCb
orNone
) – 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 occurredtzlookup_data (
object
orNone
) – an arbitrary pointer which is passed through to the tzlookup functioncancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
to use in tzlookup function
- Raises:
- Returns:
- Return type:
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:
source (
EDataServer.Source
) – anEDataServer.Source
source_type (
ECal.ClientSourceType
) – source tpe of the calendarwait_for_connected_seconds (
int
) – timeout, in seconds, to wait for the backend to be fully connectedcancellable (
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 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 theECal.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
) – aGio.AsyncResult
- Raises:
- Returns:
a new
ECal.Client
, orNone
- Return type:
Finishes the operation started with
ECal.Client.connect
(). If an error occurs in connecting to the D-Bus service, the function sets error and returnsNone
.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 toECal.Client.connect
().New in version 3.8.
- classmethod connect_sync(source, source_type, wait_for_connected_seconds, cancellable)¶
- Parameters:
source (
EDataServer.Source
) – anEDataServer.Source
source_type (
ECal.ClientSourceType
) – source type of the calendarwait_for_connected_seconds (
int
) – timeout, in seconds, to wait for the backend to be fully connectedcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
a new
ECal.Client
, orNone
- Return type:
Creates a new
ECal.Client
for source and source_type. If an error occurs, the function will set error and returnFalse
.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 theECal.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:
code (
ECal.ClientError
) – anECal.ClientError
code to createcustom_msg (
str
orNone
) – custom message to use for the error; can beNone
- Returns:
a new
GLib.Error
containing an #E_CAL_CLIENT_ERROR of the given code. If the custom_msg isNone
, then the error message is the one returned fromECal.Client.error_to_string
() for the code, otherwise the given message is used. Returned pointer should be freed withGLib.Error.free
().- Return type:
New in version 3.2.
- classmethod error_to_string(code)¶
- Parameters:
code (
ECal.ClientError
) – anECal.ClientError
error code- Returns:
Localized human readable description of the given error code
- Return type:
Get localized human readable description of the given error code.
New in version 3.2.
- classmethod tzlookup_cb(tzid, ecalclient, cancellable)¶
- Parameters:
tzid (
str
) – ID of the timezone to lookupecalclient (
ECal.Client
) – a validECal.Client
pointercancellable (
Gio.Cancellable
orNone
) – an optionalGio.Cancellable
to use, orNone
- Raises:
- Returns:
A timezone object, or
None
on failure or when not found.- Return type:
An implementation of the
ECal.RecurResolveTimezoneCb
callback which clients can use. CallsECal.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:
tzid (
str
) – ID of the timezone to lookuplookup_data (
ECal.ClientTzlookupICalCompData
) – anECal.ClientTzlookupICalCompData
strcture, created withECal.ClientTzlookupICalCompData.new
()cancellable (
Gio.Cancellable
orNone
) – an optionalGio.Cancellable
to use, orNone
- Raises:
- Returns:
A timezone object, or
None
, if not found inside lookup_data ‘sICalGLib.Component
.- Return type:
An implementation of the
ECal.RecurResolveTimezoneCb
callback which backends can use. Searches for the timezone in anICalGLib.Component
associated with the lookup_dataECal.ClientTzlookupICalCompData
.The returned timezone object is owned by the lookup_data.
New in version 3.34.
- add_timezone(zone, cancellable, callback, *user_data)¶
- Parameters:
zone (
ICalGLib.Timezone
) – The timezone to addcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
ECal.Client.add_timezone
().New in version 3.2.
- add_timezone_sync(zone, cancellable)¶
- Parameters:
zone (
ICalGLib.Timezone
) – The timezone to addcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
Add a VTIMEZONE object to the given calendar client.
New in version 3.2.
- check_one_alarm_only()¶
-
Checks if a calendar supports only one alarm per component.
New in version 3.2.
- check_organizer_must_accept()¶
-
Checks whether a calendar requires organizer to accept their attendance to meetings.
New in version 3.2.
- check_organizer_must_attend()¶
-
Checks if a calendar forces organizers of meetings to be also attendees.
New in version 3.2.
- check_recurrences_no_master()¶
-
Checks if the calendar has a master object for recurrences.
New in version 3.2.
- check_save_schedules()¶
-
Checks whether the calendar saves schedules.
New in version 3.2.
- create_object(icalcomp, opflags, cancellable, callback, *user_data)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – The component to createopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
True
if successful,False
otherwise.- out_uid:
Return value for the UID assigned to the new component by the calendar backend
- Return type:
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 withGLib.free
().New in version 3.2.
- create_object_sync(icalcomp, opflags, cancellable)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – The component to createopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
True
if successful,False
otherwise.- out_uid:
Return value for the UID assigned to the new component by the calendar backend
- Return type:
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:
icalcomps ([
ICalGLib.Component
]) – The components to createopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
True
if successful,False
otherwise.- out_uids:
Return value for the UIDs assigned to the new components by the calendar backend
- Return type:
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 withEDataServer.Client.util_free_string_slist
().New in version 3.6.
- create_objects_sync(icalcomps, opflags, cancellable)¶
- Parameters:
icalcomps ([
ICalGLib.Component
]) – The components to createopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
True
if successful,False
otherwise.- out_uids:
Return value for the UIDs assigned to the new components by the calendar backend
- Return type:
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:
uid (
str
) – Unique identifier for a calendar componentauid (
str
) – Alarm identifier to discardopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
ECal.Client.discard_alarm
().New in version 3.2.
- discard_alarm_sync(uid, rid, auid, opflags, cancellable)¶
- Parameters:
uid (
str
) – Unique identifier for a calendar componentauid (
str
) – Alarm identifier to discardopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
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:
start (
int
) – Start time for query.end (
int
) – End time for query.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
cb (
ECal.RecurInstanceCb
) – Callback for each generated instance.
Does a combination of
ECal.Client.get_object_list
() andECal.recur_generate_instances_sync
(). UnlikeECal.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:
icalcomp (
ICalGLib.Component
) – Object to generate instances from.start (
int
) – Start time for query.end (
int
) – End time for query.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
cb (
ECal.RecurInstanceCb
) – Callback for each generated instance.
Does a combination of
ECal.Client.get_object_list
() andECal.recur_generate_instances_sync
(), likeECal.Client.generate_instances
(), but for a single object. UnlikeECal.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:
icalcomp (
ICalGLib.Component
) – Object to generate instances fromstart (
int
) – Start time for queryend (
int
) – End time for querycancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
cb (
ECal.RecurInstanceCb
) – Callback for each generated instance
Does a combination of
ECal.Client.get_object_list
() andECal.recur_generate_instances_sync
(), likeECal.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:
uid (
str
) – A component UID to generate instances forstart (
int
) – Start time for queryend (
int
) – End time for querycancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
cb (
ECal.RecurInstanceCb
) – Callback for each generated instance
Does a combination of
ECal.Client.get_object_list
() andECal.recur_generate_instances_sync
(), likeECal.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:
start (
int
) – Start time for queryend (
int
) – End time for querycancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
cb (
ECal.RecurInstanceCb
) – Callback for each generated instance
Does a combination of
ECal.Client.get_object_list
() andECal.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:
uid (
str
) – Unique identifier for a calendar componentcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
True
if successful,False
otherwise.- out_attachment_uris:
Return location for the list of attachment URIs
- Return type:
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 withEDataServer.Client.util_free_string_slist
().New in version 3.2.
- get_attachment_uris_sync(uid, rid, cancellable)¶
- Parameters:
uid (
str
) – Unique identifier for a calendar componentcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
True
if successful,False
otherwise.- out_attachment_uris:
Return location for the list of attachment URIs
- Return type:
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 withGLib.free
().- Return type:
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:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
Retrives an
ICalGLib.Component
from the backend that contains the default values for properties needed. The call is finished byECal.Client.get_default_object_finish
() from the callback.New in version 3.2.
- get_default_object_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- 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 anICalGLib.Component
from the backend that contains the default values for properties needed. This out_icalcomp should be freed withGObject.Object.unref
(), when no longer needed.New in version 3.2.
- get_default_object_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- 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 withGObject.Object.unref
(), when no longer needed.New in version 3.2.
- get_default_timezone()¶
- Returns:
- Return type:
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:
start (
int
) – Start time for queryend (
int
) – End time for queryusers ([
str
]) – List of users to retrieve free/busy information forcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 byECal.Client.get_free_busy_finish
() from the callback.New in version 3.2.
- get_free_busy_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
if successful,False
otherwise.- out_freebusy:
a
GLib.SList
ofECal.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 VFREEBUSYECal.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:
start (
int
) – Start time for queryend (
int
) – End time for queryusers ([
str
]) – List of users to retrieve free/busy information forcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
True
if successful,False
otherwise.- out_freebusy:
a
GLib.SList
ofECal.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:
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:
uid (
str
) – Unique identifier for a calendar component.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- 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 beingNone
or an empty string. This component should be freed withGObject.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:
sexp (
str
) – an S-expression representing the querycancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 byECal.Client.get_object_list_finish
() from the callback.New in version 3.2.
- get_object_list_as_comps(sexp, cancellable, callback, *user_data)¶
- Parameters:
sexp (
str
) – an S-expression representing the querycancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 byECal.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
) – aGio.AsyncResult
- Raises:
- 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 ofECal.Component
-s. This list should be freed withEDataServer.Client.util_free_object_slist
().New in version 3.2.
- get_object_list_as_comps_sync(sexp, cancellable)¶
- Parameters:
sexp (
str
) – an S-expression representing the querycancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- 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 withEDataServer.Client.util_free_object_slist
().New in version 3.2.
- get_object_list_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- 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 ofICalGLib.Component
-s. This list should be freed withEDataServer.Client.util_free_object_slist
().New in version 3.2.
- get_object_list_sync(sexp, cancellable)¶
- Parameters:
sexp (
str
) – an S-expression representing the querycancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- 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 withEDataServer.Client.util_free_object_slist
().New in version 3.2.
- get_object_sync(uid, rid, cancellable)¶
- Parameters:
uid (
str
) – Unique identifier for a calendar component.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- 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 withGObject.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:
uid (
str
) – Unique identifier for a calendar componentcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- 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 ofECal.Component
s corresponding to found components for a given uid of the same type as this client. This list should be freed withEDataServer.Client.util_free_object_slist
().New in version 3.2.
- get_objects_for_uid_sync(uid, cancellable)¶
- Parameters:
uid (
str
) – Unique identifier for a calendar componentcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- 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:
Gets the source type of the calendar client.
New in version 3.2.
- get_timezone(tzid, cancellable, callback, *user_data)¶
- Parameters:
tzid (
str
) – ID of the timezone to retrievecancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- 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:
tzid (
str
) – ID of the timezone to retrievecancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- 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:
sexp (
str
) – an S-expression representing the query.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
Query self with sexp, creating an
ECal.ClientView
. The call is finished byECal.Client.get_view_finish
() from the callback.New in version 3.2.
- get_view_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
if successful,False
otherwise.- out_view:
- 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 allocatedECal.ClientView
, which should be freed withGObject.Object.unref
().New in version 3.2.
- get_view_sync(sexp, cancellable)¶
- Parameters:
sexp (
str
) – an S-expression representing the query.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
True
if successful,False
otherwise.- out_view:
- 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 allocatedECal.ClientView
, which should be freed withGObject.Object.unref
().New in version 3.2.
- modify_object(icalcomp, mod, opflags, cancellable, callback, *user_data)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – Component to modifymod (
ECal.ObjModType
) – Type of modificationopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
andECal.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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
ECal.Client.modify_object
().New in version 3.2.
- modify_object_sync(icalcomp, mod, opflags, cancellable)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – Component to modifymod (
ECal.ObjModType
) – Type of modificationopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
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
andECal.ObjModType.THIS_AND_FUTURE
).New in version 3.2.
- modify_objects(icalcomps, mod, opflags, cancellable, callback, *user_data)¶
- Parameters:
icalcomps ([
ICalGLib.Component
]) – Components to modifymod (
ECal.ObjModType
) – Type of modificationopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
andECal.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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
ECal.Client.modify_objects
().New in version 3.6.
- modify_objects_sync(icalcomps, mod, opflags, cancellable)¶
- Parameters:
icalcomps ([
ICalGLib.Component
]) – Components to modifymod (
ECal.ObjModType
) – Type of modificationopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
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
andECal.ObjModType.THIS_AND_FUTURE
).New in version 3.6.
- receive_objects(icalcomp, opflags, cancellable, callback, *user_data)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – AnICalGLib.Component
opflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
ECal.Client.receive_objects
().New in version 3.2.
- receive_objects_sync(icalcomp, opflags, cancellable)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – AnICalGLib.Component
opflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
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:
uid (
str
) – UID of the object to removerid (
str
orNone
) – Recurrence ID of the specific recurrence to removemod (
ECal.ObjModType
) – Type of the removalopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 andECal.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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
ECal.Client.remove_object
().New in version 3.2.
- remove_object_sync(uid, rid, mod, opflags, cancellable)¶
- Parameters:
uid (
str
) – UID of the object to removerid (
str
orNone
) – Recurrence ID of the specific recurrence to removemod (
ECal.ObjModType
) – Type of the removalopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
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 andECal.ObjModType.ALL
for the mod.New in version 3.2.
- remove_objects(ids, mod, opflags, cancellable, callback, *user_data)¶
- Parameters:
ids ([
ECal.ComponentId
]) – A list ofECal.ComponentId
objects identifying the objects to removemod (
ECal.ObjModType
) – Type of the removalopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
This function allows the removal of instances of recurrent appointments.
ECal.ComponentId
objects can identify specific instances (if rid is notNone
). If what you want is to remove all instances, use aNone
rid in theECal.ComponentId
andECal.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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
ECal.Client.remove_objects
().New in version 3.6.
- remove_objects_sync(ids, mod, opflags, cancellable)¶
- Parameters:
ids ([
ECal.ComponentId
]) – a list ofECal.ComponentId
objects identifying the objects to removemod (
ECal.ObjModType
) – Type of the removalopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
This function allows the removal of instances of recurrent appointments.
ECal.ComponentId
objects can identify specific instances (if rid is notNone
). If what you want is to remove all instances, use aNone
rid in theECal.ComponentId
andECal.ObjModType.ALL
for the mod.New in version 3.6.
- send_objects(icalcomp, opflags, cancellable, callback, *user_data)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – AnICalGLib.Component
to be sentopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- 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 withGObject.Object.unref
().New in version 3.2.
- send_objects_sync(icalcomp, opflags, cancellable)¶
- Parameters:
icalcomp (
ICalGLib.Component
) – AnICalGLib.Component
to be sentopflags (
ECal.OperationFlags
) – bit-or ofECal.OperationFlags
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- 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 withGObject.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:
- Parameters:
client (
ECal.Client
) – The object which received the signalfree_busy_ecalcomps ([
ECal.Component
]) –
Property Details¶
- ECal.Client.props.default_timezone¶
- Name:
default-timezone
- Type:
- Default Value:
- Flags:
Timezone used to resolve DATE and floating DATE-TIME values
- ECal.Client.props.source_type¶
- Name:
source-type
- Type:
- Default Value:
- Flags:
The iCalendar data type