EDataServer.WebDAVSession¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | EDataServer.SoupSession (15), Soup.Session (33), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(source) | 
| class | util_free_privileges(privileges) | 
| class | util_item_href_equal(href1, href2) | 
| acl_sync(uri, xml, cancellable) | |
| copy_sync(source_uri, destination_uri, depth, can_overwrite, cancellable) | |
| delete_sync(uri, depth, etag, cancellable) | |
| ensure_full_uri(request_uri, href) | |
| get_acl_restrictions_sync(uri, cancellable) | |
| get_acl_sync(uri, cancellable) | |
| get_current_user_privilege_set_sync(uri, cancellable) | |
| get_data_sync(uri, cancellable) | |
| get_last_dav_error_code() | |
| get_last_dav_error_is_permission() | |
| get_principal_collection_set_sync(uri, cancellable) | |
| get_supported_privilege_set_sync(uri, cancellable) | |
| get_sync(uri, cancellable) | |
| getctag_sync(uri, cancellable) | |
| list_sync(uri, depth, flags, cancellable) | |
| lock_resource_sync(uri, lock_scope, lock_timeout, owner, cancellable) | |
| lock_sync(uri, depth, lock_timeout, xml, cancellable) | |
| mkcalendar_sync(uri, display_name, description, color, supports, cancellable) | |
| mkcol_addressbook_sync(uri, display_name, description, cancellable) | |
| mkcol_sync(uri, cancellable) | |
| move_sync(source_uri, destination_uri, can_overwrite, cancellable) | |
| new_request(method, uri) | |
| options_sync(uri, cancellable) | |
| post_sync(uri, data, data_length, out_content_type, out_content, cancellable) | |
| post_with_content_type_sync(uri, data, data_length, in_content_type, out_content_type, out_content, cancellable) | |
| principal_property_search_sync(uri, apply_to_principal_collection_set, match_ns_uri, match_property, match_value, cancellable) | |
| propfind_sync(uri, depth, xml, func, func_user_data, cancellable) | |
| proppatch_sync(uri, xml, cancellable) | |
| put_data_sync(uri, etag, content_type, bytes, length, cancellable) | |
| put_sync(uri, etag, content_type, stream, cancellable) | |
| refresh_lock_sync(uri, lock_token, lock_timeout, cancellable) | |
| replace_with_detailed_error(request, response_data, ignore_multistatus, prefix) | |
| report_sync(uri, depth, xml, func, func_user_data, out_content_type, out_content, cancellable) | |
| set_acl_sync(uri, entries, cancellable) | |
| traverse_mkcalendar_response(message, xml_data, func, *func_user_data) | |
| traverse_mkcol_response(message, xml_data, func, *func_user_data) | |
| traverse_multistatus_response(message, xml_data, func, *func_user_data) | |
| unlock_sync(uri, lock_token, cancellable) | |
| update_properties_sync(uri, changes, cancellable) | 
Virtual Methods¶
| Inherited: | Soup.Session (9), GObject.Object (7) | 
|---|
Properties¶
| Inherited: | EDataServer.SoupSession (2), Soup.Session (20) | 
|---|
Signals¶
| Inherited: | Soup.Session (6), GObject.Object (1) | 
|---|
Fields¶
| Inherited: | Soup.Session (6), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | EDataServer.SoupSession | r | 
Class Details¶
- 
class EDataServer.WebDAVSession(**kwargs)¶
- Bases: - EDataServer.SoupSession- Abstract: - No - Structure: - EDataServer.WebDAVSessionClass- Contains only private data that should be read and manipulated using the functions below. - New in version 3.26. - 
classmethod new(source)¶
- Parameters: - source ( - EDataServer.Source) – an- EDataServer.Source- Returns: - a new - EDataServer.WebDAVSession; free it with- GObject.Object.unref(), when no longer needed.- Return type: - EDataServer.WebDAVSession- Creates a new - EDataServer.WebDAVSessionassociated with given source. The- EDataServer.WebDAVSessionuses an- EDataServer.SourceWebdavextension on certain places when it’s defined for the source.- New in version 3.26. 
 - 
classmethod util_free_privileges(privileges)¶
- Parameters: - privileges ( - GLib.Nodeor- None) – a tree of- EDataServer.WebDAVPrivilegestructures- Frees privileges returned by - EDataServer.WebDAVSession.get_supported_privilege_set_sync(). The function does nothing, if privileges is- None.- New in version 3.26. 
 - 
classmethod util_item_href_equal(href1, href2)¶
- Parameters: - Returns: - whether the two href-s reference the same item - Return type: - Compares two hrefs and return whether they reference the same item on the server. The comparison is done in a relaxed way, not considering scheme - Camel.partand comparing the host name case insensitively, while the path case sensitively. It also ignores the username/password information in the hostname- Camel.part, if it’s included. The function doesn’t decode any URI-encoded characters.- New in version 3.38.2. 
 - 
acl_sync(uri, xml, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- xml (EDataServer.XmlDocument) – the request itself, as anEDataServer.XmlDocument, the root element should be DAV:acl
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Issues ACL request on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source.- New in version 3.26. 
- uri (
 - 
copy_sync(source_uri, destination_uri, depth, can_overwrite, cancellable)¶
- Parameters: - source_uri (str) – URI of the resource or collection to copy
- destination_uri (str) – URI of the destination
- depth (str) – requested depth, can be one ofEDataServer.WEBDAV_DEPTH_THISorEDataServer.WEBDAV_DEPTH_INFINITY
- can_overwrite (bool) – whether can overwrite destination_uri, when it exists
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Copies a resource identified by source_uri to destination_uri on the server. The source_uri can reference also collections, in which case the depth influences whether only the collection itself is copied ( - EDataServer.WEBDAV_DEPTH_THIS) or whether the collection with all its children is copied (- EDataServer.WEBDAV_DEPTH_INFINITY).- New in version 3.26. 
- source_uri (
 - 
delete_sync(uri, depth, etag, cancellable)¶
- Parameters: - uri (str) – URI of the resource to delete
- depth (strorNone) – optional requested depth, can be one ofEDataServer.WEBDAV_DEPTH_THISorEDataServer.WEBDAV_DEPTH_INFINITY, orNone
- etag (strorNone) – an optional ETag of the resource, orNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Deletes a resource identified by uri on the server. The URI can reference a collection, in which case depth should be - EDataServer.WEBDAV_DEPTH_INFINITY. Use depth- EDataServer.WEBDAV_DEPTH_THISwhen deleting a regular resource, or- None, to let the server use default Depth.- The etag argument is used to avoid clashes when overwriting existing resources. Use - Noneetag when deleting collection resources or to force the deletion, otherwise provide a valid ETag of a non-collection resource to verify that the version requested to delete is the same as on the server.- Note that the actual usage of etag is also influenced by - EDataServer.SourceWebdav- :avoid-ifmatchproperty of the associated- EDataServer.Source.- New in version 3.26. 
- uri (
 - 
ensure_full_uri(request_uri, href)¶
- Parameters: - Returns: - The href as a full URI - Return type: - Converts possibly path-only href into a full URI under the request_uri. When the request_uri is - None, the URI defined in associated- EDataServer.Sourceis used instead, taken from the- EDataServer.SourceWebdavextension, if defined.- Free the returned pointer with - GLib.free(), when no longer needed.- New in version 3.24. 
 - 
get_acl_restrictions_sync(uri, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_restrictions: - return location for bit-or of - EDataServer.WebDAVACLRestrictions- out_principal_kind: - return location for principal kind - out_principal_hrefs: - return location for a - GLib.SListof principal href-s- Return type: - ( - bool, out_restrictions:- int, out_principal_kind:- EDataServer.WebDAVACEPrincipalKind, out_principal_hrefs: [- str])- Gets Access Control List (ACL) restrictions for the uri, or, in case it’s - None, for the URI defined in associated- EDataServer.Source. The out_principal_kind is valid only if the out_restrictions contains- EDataServer.WebDAVACLRestrictions.REQUIRED_PRINCIPAL. The out_principal_hrefs is valid only if the out_principal_kind is valid and when it is- EDataServer.WebDAVACEPrincipalKind.HREF.- Free the returned out_principal_hrefs with g_slist_free_full (entries, - GLib.free); when no longer needed.- New in version 3.26. 
- uri (
 - 
get_acl_sync(uri, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_entries: - return location for a - GLib.SListof- EDataServer.WebDAVAccessControlEntry- Return type: - ( - bool, out_entries: [- EDataServer.WebDAVAccessControlEntry])- Gets Access Control List (ACL) for the uri, or, in case it’s - None, for the URI defined in associated- EDataServer.Source.- This function doesn’t read general - EDataServer.WebDAVACEPrincipalKind.PROPERTY.- Free the returned out_entries with g_slist_free_full (entries, - EDataServer.WebDAVAccessControlEntry.free); when no longer needed.- New in version 3.26. 
- uri (
 - 
get_current_user_privilege_set_sync(uri, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_privileges: - return location for a - GLib.SListof- EDataServer.WebDAVPrivilege- Return type: - ( - bool, out_privileges: [- EDataServer.WebDAVPrivilege])- Gets current user privileges for the uri, or, in case it’s - None, for the URI defined in associated- EDataServer.Source.- Free the returned out_privileges with g_slist_free_full (privileges, - EDataServer.WebDAVPrivilege.free); when no longer needed.- New in version 3.26. 
- uri (
 - 
get_data_sync(uri, cancellable)¶
- Parameters: - uri (str) – URI of the resource to read
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_href: - optional return location for href of the resource, or - None- out_etag: - optional return location for etag of the resource, or - None- out_bytes: - return location for bytes being read - out_length: - option return location for length of bytes being read, or - None- Return type: - ( - bool, out_href:- stror- None, out_etag:- stror- None, out_bytes:- str, out_length:- int)- Reads a resource identified by uri from the server. The URI cannot reference a collection. - The out_bytes is filled by actual data being read. If not - None, out_length is populated with how many bytes had been read. The out_bytes is always NUL-terminated, while this termination byte is not- Camel.partof out_length. Free the out_bytes with- GLib.free(), when no longer needed.- Free returned pointer of out_href and out_etag, if not - None, with- GLib.free(), when no longer needed.- To read large data use - EDataServer.WebDAVSession.get_sync() instead.- New in version 3.26. 
- uri (
 - 
get_last_dav_error_code()¶
- Returns: - a DAV error from the last request, or - None, when no error had been recognized.- Return type: - str- Returns last DAV error code as returned by the server. Each recognized code is enclosed in “[]” in the returned string, to be able to distinguish between them, in case the server returned multiple codes. - The string is valid until the next request is executed. - New in version 3.36. 
 - 
get_last_dav_error_is_permission()¶
- Returns: - whether the last recognized DAV error code contains an error which means that user doesn’t have permission for the operation. If there is no DAV error stored, then returns - False.- Return type: - bool- New in version 3.36. 
 - 
get_principal_collection_set_sync(uri, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_principal_hrefs: - return location for a - GLib.SListof principal href-s- Return type: - Gets list of principal collection href for the uri, or, in case it’s - None, for the URI defined in associated- EDataServer.Source. The out_principal_hrefs are root collections that contain the principals that are available on the server that implements this resource.- Free the returned out_principal_hrefs with g_slist_free_full (entries, - GLib.free); when no longer needed.- New in version 3.26. 
- uri (
 - 
get_supported_privilege_set_sync(uri, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_privileges: - return location for the tree of supported privileges - Return type: - Gets supported privileges for the uri, or, in case it’s - None, for the URI defined in associated- EDataServer.Source.- The root node of out_privileges has always - Nonedata.- Free the returned out_privileges with - EDataServer.WebDAVSession.util_free_privileges() when no longer needed.- New in version 3.26. 
- uri (
 - 
get_sync(uri, cancellable)¶
- Parameters: - uri (str) – URI of the resource to read
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_href: - optional return location for href of the resource, or - None- out_etag: - optional return location for etag of the resource, or - None- out_stream: - a - Gio.OutputStreamto write data to- Return type: - ( - bool, out_href:- stror- None, out_etag:- stror- None, out_stream:- Gio.OutputStream)- Reads a resource identified by uri from the server and writes it to the stream. The URI cannot reference a collection. - Free returned pointer of out_href and out_etag, if not - None, with- GLib.free(), when no longer needed.- The - EDataServer.WebDAVSession.get_data_sync() can be used to read the resource data directly to memory.- New in version 3.26. 
- uri (
 - 
getctag_sync(uri, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_ctag: - return location for the ctag - Return type: - Issues a getctag property request for a collection identified by uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source. The ctag is a collection tag, which changes whenever the collection changes (similar to etag). The getctag is an extension, thus the function can fail when the server doesn’t support it.- Free the returned out_ctag with - GLib.free(), when no longer needed.- New in version 3.26. 
- uri (
 - 
list_sync(uri, depth, flags, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- depth (str) – requested depth, can be one ofEDataServer.WEBDAV_DEPTH_THIS,EDataServer.WEBDAV_DEPTH_THIS_AND_CHILDRENorEDataServer.WEBDAV_DEPTH_INFINITY
- flags (int) – a bit-or ofEDataServer.WebDAVListFlags, claiming what properties to read
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_resources: - return location for the resources - Return type: - ( - bool, out_resources: [- EDataServer.WebDAVResource])- Lists content of the uri, or, in case it’s - None, of the URI defined in associated- EDataServer.Source, which should point to a collection. The flags influences which properties are read for the resources.- The out_resources is in no particular order. - Free the returned out_resources with g_slist_free_full (resources, - EDataServer.WebDAVResource.free); when no longer needed.- New in version 3.26. 
- uri (
 - 
lock_resource_sync(uri, lock_scope, lock_timeout, owner, cancellable)¶
- Parameters: - uri (strorNone) – URI to lock, orNoneto read fromEDataServer.Source
- lock_scope (EDataServer.WebDAVLockScope) – anEDataServer.WebDAVLockScopeto define the scope of the lock
- lock_timeout (int) – timeout for the lock, in seconds, on 0 to infinity
- owner (strorNone) – optional identificator of the owner of the lock, orNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_lock_token: - return location of the obtained or refreshed lock token - Return type: - Locks a resource identified by uri, or, in case it’s - None, by the URI defined in associated- EDataServer.Source. It obtains a write lock with the given lock_scope.- The owner is used to identify the lock owner. When it’s an http:// or https://, then it’s referenced as DAV:href, otherwise the value is treated as plain text. If it’s - None, then the user name from the associated- EDataServer.Sourceis used.- The out_lock_token can be refreshed with - EDataServer.WebDAVSession.refresh_lock_sync(). Release the lock with- EDataServer.WebDAVSession.unlock_sync(). Free the returned out_lock_token with- GLib.free(), when no longer needed.- New in version 3.26. 
- uri (
 - 
lock_sync(uri, depth, lock_timeout, xml, cancellable)¶
- Parameters: - uri (strorNone) – URI to lock, orNoneto read fromEDataServer.Source
- depth (str) – requested depth, can be one ofEDataServer.WEBDAV_DEPTH_THISorEDataServer.WEBDAV_DEPTH_INFINITY
- lock_timeout (int) – timeout for the lock, in seconds, on 0 to infinity
- xml (EDataServer.XmlDocument) – an XML describing the lock request, with DAV:lockinfo root element
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_lock_token: - return location of the obtained or refreshed lock token - out_xml_response: - optional return location for the server response as - libxml2.DocPtr- Return type: - ( - bool, out_lock_token:- str, out_xml_response:- libxml2.Docor- None)- Locks a resource identified by uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source.- The out_lock_token can be refreshed with - EDataServer.WebDAVSession.refresh_lock_sync(). Release the lock with- EDataServer.WebDAVSession.unlock_sync(). Free the returned out_lock_token with- GLib.free(), when no longer needed.- If provided, free the returned out_xml_response with xmlFreeDoc(), when no longer needed. - New in version 3.26. 
- uri (
 - 
mkcalendar_sync(uri, display_name, description, color, supports, cancellable)¶
- Parameters: - uri (str) – URI of the collection to create
- display_name (strorNone) – a human-readable display name to set, orNone
- description (strorNone) – a human-readable description of the calendar, orNone
- color (strorNone) – a color to set, in format “#RRGGBB”, orNone
- supports (int) – a bit-or ofEDataServer.WebDAVResourceSupportsvalues
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Creates a new calendar collection identified by uri on the server. The supports defines what component types can be stored into the created calendar collection. Only - EDataServer.WebDAVResourceSupports.NONEand values related to iCalendar content can be used here. Using- EDataServer.WebDAVResourceSupports.NONEmeans that everything is supported.- Note that CalDAV RFC 4791 Section 4.2 forbids to create calendar resources under other calendar resources (no nested calendars are allowed). - New in version 3.26. 
- uri (
 - 
mkcol_addressbook_sync(uri, display_name, description, cancellable)¶
- Parameters: - Raises: - Returns: - Whether succeeded. - Return type: - Creates a new address book collection identified by uri on the server. - Note that CardDAV RFC 6352 Section 5.2 forbids to create address book resources under other address book resources (no nested address books are allowed). - New in version 3.26. 
 - 
mkcol_sync(uri, cancellable)¶
- Parameters: - uri (str) – URI of the collection to create
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Creates a new generic collection identified by uri on the server. To create specific collections use - EDataServer.WebDAVSession.mkcalendar_sync() or- EDataServer.WebDAVSession.mkcol_addressbook_sync().- New in version 3.26. 
- uri (
 - 
move_sync(source_uri, destination_uri, can_overwrite, cancellable)¶
- Parameters: - source_uri (str) – URI of the resource or collection to copy
- destination_uri (str) – URI of the destination
- can_overwrite (bool) – whether can overwrite destination_uri, when it exists
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Moves a resource identified by source_uri to destination_uri on the server. The source_uri can reference also collections. - New in version 3.26. 
- source_uri (
 - 
new_request(method, uri)¶
- Parameters: - method (str) – an HTTP method
- uri (strorNone) – URI to create the request for, orNoneto read fromEDataServer.Source
 - Raises: - Returns: - A new - Soup.RequestHTTPfor the given uri, or, when- None, for the URI stored in the associated- EDataServer.Source. Free the returned structure with- GObject.Object.unref(), when no longer needed.- Return type: - New in version 3.26. 
- method (
 - 
options_sync(uri, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_capabilities: - return location for DAV capabilities - out_allows: - return location for allowed operations - Return type: - ( - bool, out_capabilities: {- object:- object}, out_allows: {- object:- object})- Issues OPTIONS request on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source.- The out_capabilities contains a set of returned capabilities. Some known are defined as - EDataServer.WEBDAV_CAPABILITY_CLASS_1, and so on. The ‘value’ of the- GLib.HashTabledoesn’t have any particular meaning and the strings are compared case insensitively. Free the hash table with- GLib.HashTable.destroy(), when no longer needed. The returned value can be- Noneon success, it’s when the server doesn’t provide the information.- The out_allows contains a set of allowed methods returned by the server. Some known are defined as %SOUP_METHOD_OPTIONS, and so on. The ‘value’ of the - GLib.HashTabledoesn’t have any particular meaning and the strings are compared case insensitively. Free the hash table with- GLib.HashTable.destroy(), when no longer needed. The returned value can be- Noneon success, it’s when the server doesn’t provide the information.- New in version 3.26. 
- uri (
 - 
post_sync(uri, data, data_length, out_content_type, out_content, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- data (str) – data to post to the server
- data_length (int) – length of data, or -1, when data is NUL-terminated
- out_content_type (strorNone) – return location for response Content-Type, orNone
- out_content (bytesorNone) – return location for response content, orNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Issues POST request on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source. The Content-Type of the data is set to application/xml. To POST the data with a different Content-Type use- EDataServer.WebDAVSession.post_with_content_type_sync().- The optional out_content_type can be used to get content type of the response. Free it with - GLib.free(), when no longer needed.- The optional out_content can be used to get actual result content. Free it with - GLib.ByteArray.free(), when no longer needed.- New in version 3.26. 
- uri (
 - 
post_with_content_type_sync(uri, data, data_length, in_content_type, out_content_type, out_content, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- data (str) – data to post to the server
- data_length (int) – length of data, or -1, when data is NUL-terminated
- in_content_type (strorNone) – a Content-Type of the data, orNone, to use application/xml
- out_content_type (strorNone) – return location for response Content-Type, orNone
- out_content (bytesorNone) – return location for response content, orNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Issues POST request on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source.- The optional out_content_type can be used to get content type of the response. Free it with - GLib.free(), when no longer needed.- The optional out_content can be used to get actual result content. Free it with - GLib.ByteArray.free(), when no longer needed.- New in version 3.32. 
- uri (
 - 
principal_property_search_sync(uri, apply_to_principal_collection_set, match_ns_uri, match_property, match_value, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- apply_to_principal_collection_set (bool) – whether to apply to principal-collection-set
- match_ns_uri (strorNone) – namespace URI of the property to search in, orNoneforEDataServer.WEBDAV_NS_DAV
- match_property (str) – name of the property to search in
- match_value (str) – a string value to search for
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. Note it can report success also when no matching principal had been found. - out_principals: - return location for matching principals - Return type: - ( - bool, out_principals: [- EDataServer.WebDAVResource])- Issues a DAV:principal-property-search for the uri, or, in case it’s - None, for the URI defined in associated- EDataServer.Source. The DAV:principal-property-search performs a search for all principals whose properties contain character data that matches the search criteria match_value in match_property property of namespace match_ns_uri.- By default, the function searches all members (at any depth) of the collection identified by the uri. If apply_to_principal_collection_set is set to - True, the search is applied instead to each collection returned by- EDataServer.WebDAVSession.get_principal_collection_set_sync() for the uri.- The out_principals is a - GLib.SListof- EDataServer.WebDAVResource, where the kind is set to- EDataServer.WebDAVResourceKind.PRINCIPALand only href with displayname are filled. All other members of- EDataServer.WebDAVResourceare not set.- Free the returned out_principals with g_slist_free_full (principals, - EDataServer.WebDAVResource.free); when no longer needed.- New in version 3.26. 
- uri (
 - 
propfind_sync(uri, depth, xml, func, func_user_data, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- depth (str) – requested depth, can be one ofEDataServer.WEBDAV_DEPTH_THIS,EDataServer.WEBDAV_DEPTH_THIS_AND_CHILDRENorEDataServer.WEBDAV_DEPTH_INFINITY
- xml (EDataServer.XmlDocumentorNone) – the request itself, as anEDataServer.XmlDocument, the root element should be DAV:propfind, orNone
- func (EDataServer.WebDAVPropstatTraverseFuncorNone) – anEDataServer.WebDAVPropstatTraverseFuncfunction to call for each DAV:propstat in the multistatus response
- func_user_data (objectorNone) – user data passed to func
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Issues PROPFIND request on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source. On success, calls func for each returned DAV:propstat.- The xml can be - None, in which case the server should behave like DAV:allprop request.- New in version 3.26. 
- uri (
 - 
proppatch_sync(uri, xml, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- xml (EDataServer.XmlDocument) – anEDataServer.XmlDocumentwith request changes, its root element should be DAV:propertyupdate
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Issues PROPPATCH request on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source, with the changes. The order of requested changes inside xml is significant, unlike on other places.- New in version 3.26. 
- uri (
 - 
put_data_sync(uri, etag, content_type, bytes, length, cancellable)¶
- Parameters: - uri (str) – URI of the resource to write
- etag (strorNone) – an ETag of the resource, if it’s an existing resource, orNone
- content_type (str) – Content-Type of the bytes to be written
- bytes (str) – actual bytes to be written
- length (int) – how many bytes to write, or -1, when the bytes is NUL-terminated
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_href: - optional return location for href of the resource, or - None- out_etag: - optional return location for etag of the resource, or - None- Return type: - Writes data to a resource identified by uri to the server. The URI cannot reference a collection. - The etag argument is used to avoid clashes when overwriting existing resources. It can contain three values: - None- to write completely new resource
- empty string - write new resource or overwrite any existing, regardless changes on the server
- valid ETag - overwrite existing resource only if it wasn’t changed on the server.
 - Note that the actual usage of etag is also influenced by - EDataServer.SourceWebdav- :avoid-ifmatchproperty of the associated- EDataServer.Source.- The out_href, if provided, is filled with the resulting URI of the written resource. It can be different from the uri when the server redirected to a different location. - The out_etag contains ETag of the resource after it had been saved. - To write large data use - EDataServer.WebDAVSession.put_sync() instead.- New in version 3.26. 
- uri (
 - 
put_sync(uri, etag, content_type, stream, cancellable)¶
- Parameters: - uri (str) – URI of the resource to write
- etag (strorNone) – an ETag of the resource, if it’s an existing resource, orNone
- content_type (str) – Content-Type of the bytes to be written
- stream (Gio.InputStream) – aGio.InputStreamwith data to be written
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - out_href: - optional return location for href of the resource, or - None- out_etag: - optional return location for etag of the resource, or - None- Return type: - Writes data from stream to a resource identified by uri to the server. The URI cannot reference a collection. - The etag argument is used to avoid clashes when overwriting existing resources. It can contain three values: - None- to write completely new resource
- empty string - write new resource or overwrite any existing, regardless changes on the server
- valid ETag - overwrite existing resource only if it wasn’t changed on the server.
 - Note that the actual behaviour is also influenced by - EDataServer.SourceWebdav- :avoid-ifmatchproperty of the associated- EDataServer.Source.- The out_href, if provided, is filled with the resulting URI of the written resource. It can be different from the uri when the server redirected to a different location. - The out_etag contains ETag of the resource after it had been saved. - The stream should support also - Gio.Seekableinterface, because the data send can require restart of the send due to redirect or other reasons.- This method uses Transfer-Encoding:chunked, in contrast to the - EDataServer.WebDAVSession.put_data_sync(), which writes data stored in memory like any other request.- New in version 3.26. 
- uri (
 - 
refresh_lock_sync(uri, lock_token, lock_timeout, cancellable)¶
- Parameters: - uri (strorNone) – URI to lock, orNoneto read fromEDataServer.Source
- lock_token (str) – token of an existing lock
- lock_timeout (int) – timeout for the lock, in seconds, on 0 to infinity
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Refreshes existing lock lock_token for a resource identified by uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source. The lock_token is returned from- EDataServer.WebDAVSession.lock_sync() and the uri should be the same as that used with- EDataServer.WebDAVSession.lock_sync().- New in version 3.26. 
- uri (
 - 
replace_with_detailed_error(request, response_data, ignore_multistatus, prefix)¶
- Parameters: - request (Soup.RequestHTTP) – aSoup.RequestHTTP
- response_data (bytesorNone) – received response data, orNone
- ignore_multistatus (bool) – whether to ignore multistatus responses
- prefix (strorNone) – error message prefix, used when replacing, orNone
 - Raises: - Returns: - Whether any detailed error had been recognized. - Return type: - Tries to read detailed error information from response_data, if not provided, then from request’s response_body. If the detailed error cannot be found, then does nothing, otherwise frees the content of inout_error, if any, and then populates it with an error message prefixed with prefix. - The prefix might be of form “Failed to something”, because the resulting error message will be: “Failed to something: HTTP error code XXX (reason_phrase): detailed_error”. When prefix is - None, the error message will be: “Failed with HTTP error code XXX (reason phrase): detailed_error”.- As the caller might not be interested in errors, also the inout_error can be - None, in which case the function does nothing.- New in version 3.26. 
- request (
 - 
report_sync(uri, depth, xml, func, func_user_data, out_content_type, out_content, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- depth (strorNone) – requested depth, can beNone, then no Depth header is sent
- xml (EDataServer.XmlDocument) – the request itself, as anEDataServer.XmlDocument
- func (EDataServer.WebDAVPropstatTraverseFuncorNone) – anEDataServer.WebDAVPropstatTraverseFuncfunction to call for each DAV:propstat in the multistatus response, orNone
- func_user_data (objectorNone) – user data passed to func
- out_content_type (strorNone) – return location for response Content-Type, orNone
- out_content (bytesorNone) – return location for response content, orNone
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Issues REPORT request on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source. On success, calls func for each returned DAV:propstat.- The report can result in a multistatus response, but also to raw data. In case the func is provided and the result is a multistatus response, then it is traversed using this func. - The optional out_content_type can be used to get content type of the response. Free it with - GLib.free(), when no longer needed.- The optional out_content can be used to get actual result content. Free it with - GLib.ByteArray.free(), when no longer needed.- New in version 3.26. 
- uri (
 - 
set_acl_sync(uri, entries, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- entries ([EDataServer.WebDAVAccessControlEntry]) – entries to write
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Changes Access Control List (ACL) for the uri, or, in case it’s - None, for the URI defined in associated- EDataServer.Source.- Make sure that the entries satisfy ACL restrictions, as returned by - EDataServer.WebDAVSession.get_acl_restrictions_sync(). The order in the entries is preserved. It cannot contain any- EDataServer.WebDAVACEFlag.PROTECTED, nor- EDataServer.WebDAVACEFlag.INHERITED, items.- Use - EDataServer.WebDAVSession.get_acl_sync() to read currently known ACL entries, remove from the list those protected and inherited, and then modify the rest with the required changed.- Note this function doesn’t support general - EDataServer.WebDAVACEPrincipalKind.PROPERTYand returns- Gio.IOErrorEnum.NOT_SUPPORTEDerror when any such is tried to be written.- In case the returned entries contain any - EDataServer.WebDAVACEPrincipalKind.PROPERTY, or there’s a need to write such Access Control Entry, then do not use- EDataServer.WebDAVSession.get_acl_sync(), neither- EDataServer.WebDAVSession.set_acl_sync(), and write more generic implementation.- New in version 3.26. 
- uri (
 - 
traverse_mkcalendar_response(message, xml_data, func, *func_user_data)¶
- Parameters: - message (Soup.MessageorNone) – an optionalSoup.Messagecorresponding to the response, orNone
- xml_data (bytes) – aGLib.ByteArraycontaining CALDAV:mkcalendar-response response
- func (EDataServer.WebDAVPropstatTraverseFuncorNone) – anEDataServer.WebDAVPropstatTraverseFuncfunction to call for each DAV:propstat in the response
- func_user_data (objectorNone) – user data passed to func
 - Raises: - Returns: - Whether succeeded. - Return type: - Traverses a CALDAV:mkcalendar-response response and calls func for each returned DAV:propstat. - The message, if provided, is used to verify that the response is an XML Content-Type. It’s used to get the request URI as well. - New in version 3.26. 
- message (
 - 
traverse_mkcol_response(message, xml_data, func, *func_user_data)¶
- Parameters: - message (Soup.MessageorNone) – an optionalSoup.Messagecorresponding to the response, orNone
- xml_data (bytes) – aGLib.ByteArraycontaining DAV:mkcol-response response
- func (EDataServer.WebDAVPropstatTraverseFuncorNone) – anEDataServer.WebDAVPropstatTraverseFuncfunction to call for each DAV:propstat in the response
- func_user_data (objectorNone) – user data passed to func
 - Raises: - Returns: - Whether succeeded. - Return type: - Traverses a DAV:mkcol-response response and calls func for each returned DAV:propstat. - The message, if provided, is used to verify that the response is an XML Content-Type. It’s used to get the request URI as well. - New in version 3.26. 
- message (
 - 
traverse_multistatus_response(message, xml_data, func, *func_user_data)¶
- Parameters: - message (Soup.MessageorNone) – an optionalSoup.Messagecorresponding to the response, orNone
- xml_data (bytes) – aGLib.ByteArraycontaining DAV:multistatus response
- func (EDataServer.WebDAVPropstatTraverseFuncorNone) – anEDataServer.WebDAVPropstatTraverseFuncfunction to call for each DAV:propstat in the multistatus response
- func_user_data (objectorNone) – user data passed to func
 - Raises: - Returns: - Whether succeeded. - Return type: - Traverses a DAV:multistatus response and calls func for each returned DAV:propstat. - The message, if provided, is used to verify that the response is a multi-status and that the Content-Type is properly set. It’s used to get a request URI as well. - New in version 3.26. 
- message (
 - 
unlock_sync(uri, lock_token, cancellable)¶
- Parameters: - uri (strorNone) – URI to lock, orNoneto read fromEDataServer.Source
- lock_token (str) – token of an existing lock
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Releases (unlocks) existing lock lock_token for a resource identified by uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source. The lock_token is returned from- EDataServer.WebDAVSession.lock_sync() and the uri should be the same as that used with- EDataServer.WebDAVSession.lock_sync().- New in version 3.26. 
- uri (
 - 
update_properties_sync(uri, changes, cancellable)¶
- Parameters: - uri (strorNone) – URI to issue the request for, orNoneto read fromEDataServer.Source
- changes ([EDataServer.WebDAVPropertyChange]) – aGLib.SListwith request changes
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Whether succeeded. - Return type: - Updates properties (set/remove) on the provided uri, or, in case it’s - None, on the URI defined in associated- EDataServer.Source, with the changes. The order of changes is significant, unlike on other places.- This function supports only flat properties, those not under other element. To support more complex property tries use - EDataServer.WebDAVSession.proppatch_sync() directly.- New in version 3.26. 
- uri (
 
- 
classmethod