BatchOperationCallback
Description:
[ Version ( since = "0.7.0" ) ]
public delegate void BatchOperationCallback (uint operation_id, BatchOperationType operation_type, Entry entry, Error error)
Callback function called once for each operation in a batch operation run.
The operation is identified by operation_id
and operation_type
(where operation_id
is the ID returned
by the relevant call to add_query,
add_insertion,
add_update or
add_deletion, and operation_type
shows which one of
the above was called).
If the operation was successful, the resulting Entry will be passed in as entry
, and error
will be null
. Otherwise, entry
will be null
and a descriptive error will
be in error
. If operation_type
is
DELETION, entry
will always be null
, and error
will be null
or non-%NULL as
appropriate.
If the callback code needs to retain a copy of entry
, it must be referenced (with
@ref). Similarly, error
is owned by the calling code, and must not
be freed.
The callback is called in the main thread, and there is no guarantee on the order in which the callbacks for the operations in a run are executed, or whether they will be called in a timely manner. It is, however, guaranteed that they will all be called before the TaskReadyCallback which signals the completion of the run (if initiated with run_async) is called; or run returns (if initiated synchronously).
Parameters:
operation_id |
the operation ID returned from gdata_batch_operation_add_*() |
operation_type |
the type of operation which was requested |
entry |
the result of the operation, or |
error |
a Error describing any error which occurred, or |
user_data |
user data passed to the callback |