- public virtual bool connect_sync (NamedParameters? credentials, out SourceAuthenticationResult out_auth_result, out string out_certificate_pem, out TlsCertificateFlags out_certificate_errors, Cancellable? cancellable = null) throws Error
This is called always before any operation which requires a connection
to the remote side.
- public virtual bool disconnect_sync (Cancellable? cancellable = null) throws Error
This is called when the backend goes into offline mode or when the
disconnect is required.
- public string? dup_sync_tag ()
Returns the last known synchronization tag, the same as used to call
get_changes_sync.
- public bool empty_cache_sync (Cancellable? cancellable = null) throws Error
Empties the local cache by removing all known contacts from it and
notifies about such removal any opened views.
- public bool ensure_connected_sync (Cancellable? cancellable = null) throws Error
Ensures that the this is connected
to its destination.
- public unowned string get_capabilities ()
- 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.
- public bool get_connected_writable ()
- public bool get_ever_connected ()
- public virtual bool get_ssl_error_details (out string out_certificate_pem, out TlsCertificateFlags out_certificate_errors)
It is optional to implement this virtual method by the descendants.
- public bool inline_local_photos_sync (Contact contact, Cancellable? cancellable = null) throws Error
Changes all URL photos and logos which point to a local file in
contact to inline type, aka adds the file content into the contact.
- public virtual bool list_existing_sync (out string out_new_sync_tag, out SList<BookMetaBackendInfo> out_existing_objects, Cancellable? cancellable = null) throws Error
Used to get list of all existing objects on the remote side.
- public virtual bool load_contact_sync (string uid, string? extra, out Contact out_contact, out string out_extra, Cancellable? cancellable = null) throws Error
Loads a contact from the remote side.
- public bool process_changes_sync (SList<BookMetaBackendInfo>? created_objects, SList<BookMetaBackendInfo>? modified_objects, SList<BookMetaBackendInfo>? removed_objects, Cancellable? cancellable = null) throws Error
Processes given changes by updating local cache content accordingly.
- public BookCache ref_cache ()
- public bool refresh_sync (Cancellable? cancellable = null) throws Error
Refreshes the this immediately.
- public virtual bool remove_contact_sync (ConflictResolution conflict_resolution, string uid, string? extra, string? object, uint32 opflags, Cancellable? cancellable = null) throws Error
Removes a contact from the remote side.
- public virtual bool requires_reconnect ()
Determines, whether current source content requires reconnect of the
backend.
- public virtual bool save_contact_sync (bool overwrite_existing, ConflictResolution conflict_resolution, Contact contact, string? extra, uint32 opflags, out string out_new_uid, out string out_new_extra, Cancellable? cancellable = null) throws Error
Saves one contact into the remote side.
- public void schedule_refresh ()
Schedules refresh of the content of the
this.
- public virtual bool search_sync (string? expr, bool meta_contact, out SList<Contact> out_contacts, Cancellable? cancellable = null) throws Error
Searches this with given expression
expr and returns found contacts as a SList of
Contact out_contacts.
- public virtual bool search_uids_sync (string? expr, out SList<string> out_uids, Cancellable? cancellable = null) throws Error
Searches this with given expression
expr and returns found contact UID-s as a SList
out_contacts.
- public void set_cache (BookCache cache)
Sets the cache as the cache to be used by the
this.
- public void set_connected_writable (bool value)
Sets whether the this connected to a
writable destination.
- public void set_ever_connected (bool value)
Sets whether the this ever made a
successful connection to its destination.
- public void set_sync_tag (string? sync_tag)
Sets the sync_tag for the this
.
- public bool split_changes_sync (ref SList<BookMetaBackendInfo> objects, out SList<BookMetaBackendInfo> out_created_objects, out SList<BookMetaBackendInfo> out_modified_objects, out SList<BookMetaBackendInfo>? out_removed_objects, Cancellable? cancellable = null) throws Error
Splits objects into created/modified/removed lists
according to current local cache content.
- public bool store_inline_photos_sync (Contact contact, Cancellable? cancellable = null) throws Error
Changes all inline photos and logos to URL type in contact
, which will point to a local file instead, beside the cache file.