Method
EDataServerWebDAVSessionput_data_sync
since: 3.26
Declaration [src]
gboolean
e_webdav_session_put_data_sync (
EWebDAVSession* webdav,
const gchar* uri,
const gchar* etag,
const gchar* content_type,
SoupMessageHeaders* in_headers,
const gchar* bytes,
gsize length,
gchar** out_href,
gchar** out_etag,
SoupMessageHeaders** out_headers,
GCancellable* cancellable,
GError** error
)
Description [src]
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: - NULL - 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 ESourceWebdav:avoid-ifmatch
property of the associated ESource.
The optional in_headers can contain additional headers to be added to the request.
These headers replace any existing in the request headers, without support for the list-values headers.
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 optional out_headers contains response headers. Free it with soup_message_headers_free(),
when no longer needed.
To write large data use e_webdav_session_put_sync() instead.
Available since: 3.26
Parameters
uri-
Type:
const gchar*URI of the resource to write.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. etag-
Type:
const gchar*An ETag of the resource, if it’s an existing resource, or
NULL.The argument can be NULL.The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. content_type-
Type:
const gchar*Content-Type of the
bytesto be written.The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. in_headers-
Type:
SoupMessageHeadersAdditional
SoupMessageHeadersto be added to the request, orNULL.The argument can be NULL.The data is owned by the caller of the method. bytes-
Type:
const gchar*Actual bytes to be written.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. length-
Type:
gsizeHow many bytes to write, or -1, when the
bytesis NUL-terminated. 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 NULLby 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 NULLby 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:
SoupMessageHeadersOptional return location for response
SoupMessageHeaders, orNULL.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. cancellable-
Type:
GCancellableOptional
GCancellableobject, orNULL.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 aNULLGError*.The argument will be left initialized to NULLby 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.