Virtual Method
EDataBookBookMetaBackendget_changes_sync
since: 3.26
Declaration [src]
gboolean
get_changes_sync (
EBookMetaBackend* meta_backend,
const gchar* last_sync_tag,
gboolean is_repeat,
gchar** out_new_sync_tag,
gboolean* out_repeat,
GSList** out_created_objects,
GSList** out_modified_objects,
GSList** out_removed_objects,
GCancellable* cancellable,
GError** error
)
Description [src]
Gathers the changes since the last check which had been done on the remote side.
The last_sync_tag can be used as a tag of the last check. This can be NULL,
when there was no previous call or when the descendant doesn’t store any
such tags. The out_new_sync_tag can be populated with a value to be stored
and used the next time.
The out_repeat can be set to TRUE when the descendant didn’t finish
read of all the changes. In that case the meta_backend calls this
function again with the out_new_sync_tag as the last_sync_tag, but also
notifies about the found changes immediately. The is_repeat is set to TRUE as well in this case, otherwise it’s FALSE.
The descendant can populate also EBookMetaBackendInfo::object of the out_created_objects and out_modified_objects, if known, in which
case this will be used instead of loading it with e_book_meta_backend_load_contact_sync().
It is optional to implement this virtual method by the descendant.
The default implementation calls e_book_meta_backend_list_existing_sync()
and then compares the list with the current content of the local cache
and populates the respective lists appropriately.
Each output GSList should be freed with
g_slist_free_full (objects, e_book_meta_backend_info_free);
when no longer needed.
Available since: 3.26
Parameters
last_sync_tag-
Type:
const gchar*Optional sync tag from the last check.
The argument can be NULL.The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. is_repeat-
Type:
gbooleanSet to
TRUEwhen this is the repeated call. out_new_sync_tag-
Type:
gchar**New sync tag to store on success.
The argument will be set by the function. 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_repeat-
Type:
gboolean*Whether to repeat this call again; default is
FALSE.The argument will be set by the function. out_created_objects-
Type: A list of
Nonea
GSListofEBookMetaBackendInfoobject infos which had been created since the last check.The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it. out_modified_objects-
Type: A list of
Nonea
GSListofEBookMetaBackendInfoobject infos which had been modified since the last check.The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it. out_removed_objects-
Type: A list of
Nonea
GSListofEBookMetaBackendInfoobject infos which had been removed since the last check.The argument will be set by the function. 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 virtual function 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.