get_changes_sync


Description:

public virtual bool get_changes_sync (string? last_sync_tag, bool is_repeat, out string out_new_sync_tag, out bool out_repeat, out SList<BookMetaBackendInfo> out_created_objects, out SList<BookMetaBackendInfo> out_modified_objects, out SList<BookMetaBackendInfo> out_removed_objects, Cancellable? cancellable = null) throws Error

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 this 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:EBookMetaBackend:object of the out_created_objects and out_modified_objects, if known, in which case this will be used instead of loading it with load_contact_sync.

It is optional to implement this virtual method by the descendant. The default implementation calls list_existing_sync and then compares the list with the current content of the local cache and populates the respective lists appropriately.

Each output SList should be freed with g_slist_free_full (objects, e_book_meta_backend_info_free); when no longer needed.

Parameters:

this

an BookMetaBackend

last_sync_tag

optional sync tag from the last check

is_repeat

set to true when this is the repeated call

out_new_sync_tag

new sync tag to store on success

out_repeat

whether to repeat this call again; default is false

out_created_objects

a SList of BookMetaBackendInfo object infos which had been created since the last check

out_modified_objects

a SList of BookMetaBackendInfo object infos which had been modified since the last check

out_removed_objects

a SList of BookMetaBackendInfo object infos which had been removed since the last check

cancellable

optional Cancellable object, or null

Returns:

Whether succeeded.