Method

EDataServerWebDAVSessionget_sync

since: 3.26

Declaration [src]

gboolean
e_webdav_session_get_sync (
  EWebDAVSession* webdav,
  const gchar* uri,
  gchar** out_href,
  gchar** out_etag,
  SoupMessageHeaders** out_headers,
  GOutputStream* out_stream,
  GCancellable* cancellable,
  GError** error
)

Description [src]

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 NULL, with g_free(), when no longer needed.

The optional out_headers contains response headers. Free it with soup_message_headers_free(), when no longer needed.

The e_webdav_session_get_data_sync() can be used to read the resource data directly to memory.

Available since: 3.26

Parameters

uri

Type: const gchar*

URI of the resource to read.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
out_href

Type: gchar**

Optional return location for href of the resource, or NULL.

The argument will be set by the function.
The argument can be set to NULL by the method.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
out_etag

Type: gchar**

Optional return location for etag of the resource, or NULL.

The argument will be set by the function.
The argument can be set to NULL by the method.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
out_headers

Type: SoupMessageHeaders

Optional return location for response SoupMessageHeaders, or NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
out_stream

Type: GOutputStream

A GOutputStream to write data to.

The argument will be set by the function.
The returned data is owned by the instance.
cancellable

Type: GCancellable

Optional GCancellable object, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

Whether succeeded.