insert_entry


Description:

[ Version ( since = "0.9.0" ) ]
public Entry insert_entry (AuthorizationDomain? domain, string upload_uri, Entry entry, Cancellable? cancellable = null) throws Error

Inserts entry by uploading it to the online service at upload_uri.

For more information about the concept of inserting entries, see the <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/basics.html#InsertingEntry">online documentation</ulink> for the GData protocol.

The service will return an updated version of the entry, which is the return value of this function on success.

If cancellable is not null, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled before or during network activity, the error g_io_error_cancelled will be returned. Cancellation has no effect after network activity has finished, however, and the insertion will return successfully (or return an error sent by the server) if it is first cancelled after network activity has finished. See the <link linkend="cancellable-support">overview of cancellation</link> for more details.

If the entry is marked as already having been inserted a gdata_service_error_entry_already_inserted error will be returned immediately (there will be no network requests).

If there is an error inserting the entry, a gdata_service_error_protocol_error error will be returned. Currently, subclasses <emphasis>cannot</emphasis> cannot override this or provide more specific errors.

Parameters:

this

a Service

domain

the AuthorizationDomain the insertion operation falls under, or null

upload_uri

the URI to which the upload should be sent

entry

the Entry to insert

cancellable

optional Cancellable object, or null

Returns:

an updated Entry, or null; unref with unref