/* libedata-book-1.2.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "E", gir_namespace = "EDataBook", gir_version = "1.2", lower_case_cprefix = "e_")]
namespace E {
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_book_backend_get_type ()")]
	public class BookBackend : E.Backend {
		[CCode (has_construct_function = false)]
		protected BookBackend ();
		public void add_view (E.DataBookView view);
		[Version (since = "3.8")]
		public void configure_direct (string config);
		[Version (since = "3.44")]
		public async bool contains_email (string email_address, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.44")]
		public bool contains_email_sync (string email_address, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.10")]
		public async bool create_contacts (string vcards, uint32 opflags, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public bool create_contacts_sync (string vcards, uint32 opflags, GLib.Queue out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.12")]
		public unowned E.DataBookCursor create_cursor (E.ContactField sort_fields, E.BookCursorSortType sort_types, uint n_fields) throws GLib.Error;
		[Version (since = "3.12")]
		public bool delete_cursor (E.DataBookCursor cursor) throws GLib.Error;
		[Version (since = "3.10")]
		public string dup_cache_dir ();
		[Version (since = "3.12")]
		public string dup_locale ();
		[Version (since = "3.50")]
		public GLib.GenericArray<weak E.Contact>? dup_view_contacts (size_t view_id, uint range_start, uint range_length);
		[Version (since = "3.50")]
		public E.BookIndices? dup_view_indices (size_t view_id);
		[Version (since = "3.50")]
		public E.BookClientViewSortFields dup_view_sort_fields (size_t view_id);
		[Version (since = "3.34")]
		public bool foreach_view (E.BookBackendForeachViewFunc func);
		[Version (since = "3.34")]
		public void foreach_view_notify_progress (bool only_completed_views, int percent, string? message);
		[Version (since = "3.10")]
		public string get_backend_property (string prop_name);
		[Version (since = "2.32")]
		public unowned string get_cache_dir ();
		[Version (since = "3.10")]
		public async E.Contact get_contact (string uid, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public async bool get_contact_list (string query, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public bool get_contact_list_sync (string query, GLib.Queue out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.10")]
		public async bool get_contact_list_uids (string query, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public bool get_contact_list_uids_sync (string query, GLib.Queue out_uids, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.10")]
		public E.Contact get_contact_sync (string uid, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.8")]
		public E.DataBookDirect? get_direct_book ();
		[Version (since = "3.6")]
		public unowned E.SourceRegistry get_registry ();
		[Version (since = "3.50")]
		public uint get_view_n_total (size_t view_id);
		[Version (since = "3.8")]
		public bool get_writable ();
		[NoWrapper]
		public virtual void impl_configure_direct (string config);
		[NoWrapper]
		public virtual void impl_contains_email (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable, string email_address);
		[NoWrapper]
		public virtual void impl_create_contacts (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable, string vcards, uint32 opflags);
		[NoWrapper]
		public virtual bool impl_delete_cursor (E.DataBookCursor cursor) throws GLib.Error;
		[NoWrapper]
		public virtual string impl_dup_locale ();
		[NoWrapper]
		public virtual E.BookIndices impl_dup_view_indices (size_t view_id);
		[NoWrapper]
		public virtual string impl_get_backend_property (string prop_name);
		[NoWrapper]
		public virtual void impl_get_contact (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable, string id);
		[NoWrapper]
		public virtual void impl_get_contact_list (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable, string query);
		[NoWrapper]
		public virtual void impl_get_contact_list_uids (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable, string query);
		[NoWrapper]
		public virtual uint impl_get_view_n_total (size_t view_id);
		[NoWrapper]
		public virtual void impl_modify_contacts (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable, string vcards, uint32 opflags);
		[NoWrapper]
		public virtual void impl_notify_update (E.Contact contact);
		[NoWrapper]
		public virtual void impl_open (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable = null);
		[NoWrapper]
		public virtual void impl_refresh (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable = null);
		[NoWrapper]
		public virtual void impl_remove_contacts (E.DataBook book, uint32 opid, GLib.Cancellable? cancellable, string uids, uint32 opflags);
		[NoWrapper]
		public virtual bool impl_set_locale (string locale, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoWrapper]
		public virtual void impl_set_view_sort_fields (size_t view_id, E.BookClientViewSortFields fields);
		[NoWrapper]
		public virtual void impl_start_view (E.DataBookView view);
		[NoWrapper]
		public virtual void impl_stop_view (E.DataBookView view);
		[Version (since = "3.2")]
		public bool is_opened ();
		[Version (since = "3.2")]
		public bool is_readonly ();
		[Version (since = "3.8")]
		public GLib.List<E.DataBookView> list_views ();
		[Version (since = "3.10")]
		public async bool modify_contacts (string vcards, uint32 opflags, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public bool modify_contacts_sync (string vcards, uint32 opflags, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public void notify_complete ();
		[Version (since = "3.2")]
		public void notify_error (string message);
		[Version (since = "3.2")]
		public void notify_property_changed (string prop_name, string? prop_value);
		public void notify_remove (string id);
		public void notify_update (E.Contact contact);
		[Version (since = "3.10")]
		public async bool open (GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public bool open_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.10")]
		public GLib.Task prepare_for_completion (uint32 opid);
		[Version (since = "3.10")]
		public E.DataBook? ref_data_book ();
		[Version (since = "3.12")]
		public GLib.ProxyResolver? ref_proxy_resolver ();
		[Version (since = "3.50")]
		public E.DataBookView? ref_view (size_t view_id);
		[Version (since = "3.50")]
		public GLib.Object ref_view_user_data (size_t view_id);
		[Version (since = "3.10")]
		public async bool refresh (GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public bool refresh_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.10")]
		public async bool remove_contacts ([CCode (array_length = false, array_null_terminated = true)] string[] uids, uint32 opflags, GLib.Cancellable? cancellable) throws GLib.Error;
		[Version (since = "3.10")]
		public bool remove_contacts_sync (string uids, uint32 opflags, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public void remove_view (E.DataBookView view);
		[Version (since = "3.26")]
		public void schedule_custom_operation (GLib.Cancellable? use_cancellable, owned E.BookBackendCustomOpFunc func);
		[Version (since = "2.32")]
		public void set_cache_dir (string cache_dir);
		[Version (since = "3.10")]
		public void set_data_book (E.DataBook data_book);
		[Version (since = "3.12")]
		public bool set_locale (string locale, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public void set_view_indices (size_t view_id, E.BookIndices? indices);
		[Version (since = "3.50")]
		public void set_view_n_total (size_t view_id, uint n_total);
		[Version (since = "3.50")]
		public void set_view_sort_fields (size_t view_id, E.BookClientViewSortFields? fields);
		[Version (since = "3.8")]
		public void set_writable (bool writable);
		public void start_view (E.DataBookView view);
		public void stop_view (E.DataBookView view);
		public void sync ();
		[Version (since = "3.50")]
		public void take_view_user_data (size_t view_id, owned GLib.Object? user_data);
		public string cache_dir { get; set; }
		[NoAccessorMethod]
		public GLib.ProxyResolver proxy_resolver { owned get; }
		public E.SourceRegistry registry { get; construct; }
		public bool writable { get; set; }
		[Version (since = "3.10")]
		public virtual signal void closed (string sender);
		[Version (since = "3.10")]
		public virtual signal void shutdown ();
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_book_backend_factory_get_type ()")]
	public abstract class BookBackendFactory : E.BackendFactory {
		[CCode (has_construct_function = false)]
		protected BookBackendFactory ();
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_book_backend_sexp_get_type ()")]
	public class BookBackendSExp : GLib.Object {
		[CCode (has_construct_function = false)]
		public BookBackendSExp (string text);
		[Version (since = "3.34")]
		public void @lock ();
		public bool match_contact (E.Contact contact);
		public bool match_vcard (string vcard);
		[Version (since = "3.8")]
		public unowned string text ();
		[Version (since = "3.34")]
		public void @unlock ();
		[Version (since = "3.50")]
		public static bool util_phone_compare (string phone_value, string lookup_value, E.BookBackendSexpCompareKind compare_kind);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_book_backend_sync_get_type ()")]
	public class BookBackendSync : E.BookBackend {
		[CCode (has_construct_function = false)]
		protected BookBackendSync ();
		[Version (since = "3.44")]
		public bool contains_email (string email_address, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoWrapper]
		public virtual bool contains_email_sync (string email_address, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool create_contacts (string vcards, uint32 opflags, out GLib.SList<E.Contact> out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public E.Contact get_contact (string uid, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool get_contact_list (string query, out GLib.SList<E.Contact> out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool get_contact_list_uids (string query, out GLib.SList<string> out_uids, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool modify_contacts (string vcards, uint32 opflags, out GLib.SList<E.Contact> out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool open (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoWrapper]
		public virtual bool open_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool refresh (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoWrapper]
		public virtual bool refresh_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool remove_contacts (string uids, uint32 opflags, out GLib.SList<string> out_removed_uids, GLib.Cancellable? cancellable = null) throws GLib.Error;
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_book_cache_get_type ()")]
	[Version (since = "3.26")]
	public class BookCache : E.Cache, E.Extensible {
		[CCode (has_construct_function = false)]
		public BookCache (string filename, E.Source? source, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.44")]
		public bool contains_email (string email_address, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public bool count_query (string? sexp, out uint out_n_total, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool cursor_calculate (E.BookCacheCursor cursor, out int out_total, out int out_position, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public int cursor_compare_contact (E.BookCacheCursor cursor, E.Contact contact, out bool out_matches_sexp);
		public void cursor_free (E.BookCacheCursor cursor);
		public bool cursor_set_sexp (E.BookCacheCursor cursor, string sexp) throws GLib.Error;
		public void cursor_set_target_alphabetic_index (E.BookCacheCursor cursor, int idx);
		public int cursor_step (E.BookCacheCursor cursor, E.BookCacheCursorStepFlags flags, E.BookCacheCursorOrigin origin, int count, out GLib.SList<E.BookCacheSearchData>? out_results, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.48")]
		public string? dup_categories ();
		public string dup_locale ();
		[Version (since = "3.50")]
		public bool dup_query_contacts (string? sexp, E.ContactField sort_field, E.BookCursorSortType sort_type, uint n_offset, uint n_limit, owned GLib.GenericArray<weak E.Contact> out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public bool dup_query_field (E.ContactField summary_field, string? sexp, E.ContactField sort_field, E.BookCursorSortType sort_type, uint n_offset, uint n_limit, owned GLib.GenericArray<weak string> out_uids, owned GLib.GenericArray<weak string> out_values, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public bool dup_summary_field (E.ContactField summary_field, string uid, out string out_value, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[CCode (has_construct_function = false)]
		public BookCache.full (string filename, E.Source? source, E.SourceBackendSummarySetup? setup, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool get_contact (string uid, bool meta_contact, out E.Contact out_contact, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool get_contact_custom_flags (string uid, out uint32 out_custom_flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool get_contact_extra (string uid, out string out_extra, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool get_uids_with_extra (string extra, out GLib.SList<string> out_uids, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool get_vcard (string uid, bool meta_contact, out string out_vcard, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool put_contact (E.Contact contact, string? extra, uint32 custom_flags, E.CacheOfflineFlag offline_flag, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool put_contacts (GLib.SList<E.Contact> contacts, GLib.SList<string>? extras, GLib.SList<uint32>? custom_flags, E.CacheOfflineFlag offline_flag, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public E.Collator ref_collator ();
		public E.Source? ref_source ();
		public bool remove_contact (string uid, uint32 custom_flags, E.CacheOfflineFlag offline_flag, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool remove_contacts (GLib.SList<string> uids, GLib.SList<uint32>? custom_flags, E.CacheOfflineFlag offline_flag, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool search (string? sexp, bool meta_contacts, out GLib.SList<E.BookCacheSearchData> out_list, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool search_uids (string? sexp, out GLib.SList<string> out_list, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool search_with_callback (string? sexp, [CCode (delegate_target_pos = 2.5)] E.BookCacheSearchFunc func, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.34")]
		public bool set_contact_custom_flags (string uid, uint32 custom_flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool set_contact_extra (string uid, string? extra, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool set_locale (string lc_collate, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoAccessorMethod]
		public string locale { owned get; }
		public virtual signal void categories_changed (string categories);
		[HasEmitter]
		public virtual signal string dup_contact_revision (E.Contact contact);
		public virtual signal void e164_changed (E.Contact contact, bool is_replace);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "e_book_cache_cursor_get_type ()")]
	[Compact]
	[Version (since = "3.26")]
	public class BookCacheCursor {
		[CCode (has_construct_function = false)]
		public BookCacheCursor (E.BookCache book_cache, string? sexp, [CCode (array_length_cname = "n_sort_fields", array_length_pos = 4.1, array_length_type = "guint")] E.ContactField[] sort_fields, [CCode (array_length_cname = "n_sort_fields", array_length_pos = 4.1, array_length_type = "guint")] E.BookCursorSortType[] sort_types) throws GLib.Error;
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "e_book_cache_search_data_get_type ()")]
	[Compact]
	[Version (since = "3.26")]
	public class BookCacheSearchData {
		public weak string extra;
		public weak string uid;
		public weak string vcard;
		[CCode (has_construct_function = false)]
		public BookCacheSearchData (string uid, string vcard, string? extra);
		public E.BookCacheSearchData? copy ();
		public static void free (void* data);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_book_meta_backend_get_type ()")]
	[Version (since = "3.26")]
	public abstract class BookMetaBackend : E.BookBackendSync {
		[CCode (has_construct_function = false)]
		protected BookMetaBackend ();
		public virtual bool connect_sync (E.NamedParameters? credentials, out E.SourceAuthenticationResult out_auth_result, out string out_certificate_pem, out GLib.TlsCertificateFlags out_certificate_errors, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public virtual bool disconnect_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.28")]
		public string? dup_sync_tag ();
		public bool empty_cache_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool ensure_connected_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		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 GLib.SList<E.BookMetaBackendInfo> out_created_objects, out GLib.SList<E.BookMetaBackendInfo> out_modified_objects, out GLib.SList<E.BookMetaBackendInfo> out_removed_objects, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool get_connected_writable ();
		public bool get_ever_connected ();
		[Version (since = "3.28")]
		public virtual bool get_ssl_error_details (out string out_certificate_pem, out GLib.TlsCertificateFlags out_certificate_errors);
		public bool inline_local_photos_sync (E.Contact contact, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public virtual bool list_existing_sync (out string out_new_sync_tag, out GLib.SList<E.BookMetaBackendInfo> out_existing_objects, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public virtual bool load_contact_sync (string uid, string? extra, out E.Contact out_contact, out string out_extra, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool process_changes_sync (GLib.SList<E.BookMetaBackendInfo>? created_objects, GLib.SList<E.BookMetaBackendInfo>? modified_objects, GLib.SList<E.BookMetaBackendInfo>? removed_objects, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public E.BookCache ref_cache ();
		public bool refresh_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public virtual bool remove_contact_sync (E.ConflictResolution conflict_resolution, string uid, string? extra, string? object, uint32 opflags, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public virtual bool requires_reconnect ();
		public virtual bool save_contact_sync (bool overwrite_existing, E.ConflictResolution conflict_resolution, E.Contact contact, string? extra, uint32 opflags, out string out_new_uid, out string out_new_extra, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public void schedule_refresh ();
		public virtual bool search_sync (string? expr, bool meta_contact, out GLib.SList<E.Contact> out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public virtual bool search_uids_sync (string? expr, out GLib.SList<string> out_uids, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public void set_cache (E.BookCache cache);
		public void set_connected_writable (bool value);
		public void set_ever_connected (bool value);
		[Version (since = "3.50")]
		public void set_sync_tag (string? sync_tag);
		public bool split_changes_sync (ref GLib.SList<E.BookMetaBackendInfo> objects, out GLib.SList<E.BookMetaBackendInfo> out_created_objects, out GLib.SList<E.BookMetaBackendInfo> out_modified_objects, out GLib.SList<E.BookMetaBackendInfo>? out_removed_objects, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool store_inline_photos_sync (E.Contact contact, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[NoAccessorMethod]
		public E.BookCache cache { owned get; set; }
		public signal void refresh_completed ();
		public virtual signal void source_changed ();
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "e_book_meta_backend_info_get_type ()")]
	[Compact]
	public class BookMetaBackendInfo {
		public weak string extra;
		public weak string object;
		public weak string revision;
		public weak string uid;
		[CCode (has_construct_function = false)]
		[Version (since = "3.26")]
		public BookMetaBackendInfo (string uid, string? revision, string? object, string? extra);
		[Version (since = "3.26")]
		public E.BookMetaBackendInfo? copy ();
		[Version (since = "3.26")]
		public static void free (void* ptr);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_book_sqlite_get_type ()")]
	[Version (since = "3.12")]
	public class BookSqlite : GLib.Object, E.Extensible {
		[CCode (has_construct_function = false)]
		public BookSqlite (string path, E.Source? source, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool add_contact (E.Contact contact, string extra, bool replace, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool add_contacts (GLib.SList<E.Contact> contacts, GLib.SList<string>? extra, bool replace, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public bool count_query (string? sexp, out uint out_n_total, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public bool dup_query_contacts (string? sexp, E.ContactField sort_field, E.BookCursorSortType sort_type, uint n_offset, uint n_limit, owned GLib.GenericArray<weak E.Contact> out_contacts, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public bool dup_query_field (E.ContactField summary_field, string? sexp, E.ContactField sort_field, E.BookCursorSortType sort_type, uint n_offset, uint n_limit, owned GLib.GenericArray<weak string> out_uids, owned GLib.GenericArray<weak string> out_values, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.50")]
		public bool dup_summary_field (E.ContactField summary_field, string uid, out string out_value, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public static GLib.Quark error_quark ();
		[Version (since = "3.48")]
		public bool exec (string sql_stmt, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[CCode (has_construct_function = false)]
		public BookSqlite.full (string path, E.Source? source, E.SourceBackendSummarySetup? setup, [CCode (delegate_target_pos = 5.33333, scope = "async")] E.bSqlVCardCallback? vcard_callback, [CCode (delegate_target_pos = 5.33333, destroy_notify_pos = 5.66667)] owned E.bSqlChangeCallback? change_callback, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool get_contact (string uid, bool meta_contact, out E.Contact ret_contact) throws GLib.Error;
		public bool get_contact_extra (string uid, out string ret_extra) throws GLib.Error;
		public bool get_key_value (string key, out string value) throws GLib.Error;
		public bool get_key_value_int (string key, out int value) throws GLib.Error;
		public bool get_locale (out string locale_out) throws GLib.Error;
		public bool get_vcard (string uid, bool meta_contact, out string ret_vcard) throws GLib.Error;
		public bool has_contact (string uid, out bool exists) throws GLib.Error;
		public bool @lock (E.bSqlLockType lock_type, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public E.Collator ref_collator ();
		[Version (since = "3.16")]
		public E.Source? ref_source ();
		public bool remove_contact (string uid, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool remove_contacts (GLib.SList<string> uids, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool search (string? sexp, bool meta_contacts, out GLib.SList<E.bSqlSearchData?> ret_list, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public static void search_data_free (E.bSqlSearchData data);
		public bool search_uids (string? sexp, out GLib.SList<string> ret_list, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.48")]
		public bool select (string sql_stmt, [CCode (delegate_target_pos = 2.5)] E.BookSqliteSelectFunc func, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool set_contact_extra (string uid, string? extra) throws GLib.Error;
		public bool set_key_value (string key, string value) throws GLib.Error;
		public bool set_key_value_int (string key, int value) throws GLib.Error;
		public bool set_locale (string lc_collate, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool @unlock (E.bSqlUnlockAction action) throws GLib.Error;
		public virtual signal bool before_insert_contact (void* db, E.Contact contact, string extra, bool replace, GLib.Object cancellable);
		public virtual signal bool before_remove_contact (void* db, string contact_uid, GLib.Cancellable? cancellable = null);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_get_type ()")]
	public class DataBook : GLib.Object, GLib.Initable {
		[CCode (has_construct_function = false)]
		public DataBook (E.BookBackend backend, GLib.DBusConnection connection, string object_path) throws GLib.Error;
		[Version (since = "3.8")]
		public unowned GLib.DBusConnection get_connection ();
		[Version (since = "3.8")]
		public unowned string get_object_path ();
		[Version (since = "3.10")]
		public E.BookBackend ref_backend ();
		[Version (since = "3.2")]
		public void report_backend_property_changed (string prop_name, string? prop_value);
		[Version (since = "3.2")]
		public void report_error (string message);
		[Version (since = "3.44")]
		public void respond_contains_email (uint32 opid, GLib.Error error, bool found);
		[Version (since = "3.4")]
		public void respond_create_contacts (uint32 opid, GLib.Error error, GLib.SList<E.Contact> contacts);
		public void respond_get_contact (uint32 opid, owned GLib.Error? error, E.Contact? contact);
		[Version (since = "3.2")]
		public void respond_get_contact_list (uint32 opid, GLib.Error error, GLib.SList<E.Contact> contacts);
		[Version (since = "3.2")]
		public void respond_get_contact_list_uids (uint32 opid, GLib.Error error, GLib.SList<string> uids);
		[Version (since = "3.4")]
		public void respond_modify_contacts (uint32 opid, GLib.Error error, GLib.SList<E.Contact> contacts);
		public void respond_open (uint32 opid, GLib.Error error);
		[Version (since = "3.2")]
		public void respond_refresh (uint32 opid, GLib.Error error);
		[Version (since = "3.4")]
		public void respond_remove_contacts (uint32 opid, GLib.Error error, GLib.SList<string> ids);
		[Version (since = "3.12")]
		public bool set_locale (string locale, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[Version (since = "3.2")]
		public static string string_slist_to_comma_string (GLib.SList<string> strings);
		[NoAccessorMethod]
		public E.BookBackend backend { owned get; construct; }
		public GLib.DBusConnection connection { get; construct; }
		public string object_path { get; construct; }
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_cursor_get_type ()")]
	[Version (since = "3.12")]
	public abstract class DataBookCursor : GLib.Object {
		[CCode (has_construct_function = false)]
		protected DataBookCursor ();
		[NoWrapper]
		public virtual int compare_contact (E.Contact contact, out bool matches_sexp);
		public void contact_added (E.Contact contact);
		public void contact_removed (E.Contact contact);
		public unowned E.BookBackend get_backend ();
		public int get_position ();
		public int get_total ();
		[CCode (vfunc_name = "get_position")]
		[NoWrapper]
		public virtual bool impl_get_position (out int total, out int position, GLib.Cancellable? cancellable = null) throws GLib.Error;
		[CCode (vfunc_name = "load_locale")]
		[NoWrapper]
		public virtual bool impl_load_locale (out string locale) throws GLib.Error;
		[CCode (vfunc_name = "set_alphabetic_index")]
		[NoWrapper]
		public virtual bool impl_set_alphabetic_index (int index, string locale) throws GLib.Error;
		[CCode (vfunc_name = "set_sexp")]
		[NoWrapper]
		public virtual bool impl_set_sexp (string? sexp) throws GLib.Error;
		public bool load_locale (out string locale, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool recalculate (GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool register_gdbus_object (GLib.DBusConnection connection, string object_path) throws GLib.Error;
		public bool set_alphabetic_index (int index, string locale, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public bool set_sexp (string? sexp, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public virtual int step (string? revision_guard, E.BookCursorStepFlags flags, E.BookCursorOrigin origin, int count, out GLib.SList<string>? results, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public E.BookBackend backend { get; construct; }
		public int position { get; }
		public int total { get; }
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_cursor_cache_get_type ()")]
	[Version (since = "3.26")]
	public class DataBookCursorCache : E.DataBookCursor {
		[CCode (has_construct_function = false, type = "EDataBookCursor*")]
		public DataBookCursorCache (E.BookBackend book_backend, E.BookCache book_cache, [CCode (array_length_cname = "n_fields", array_length_pos = 4.1, array_length_type = "guint")] E.ContactField[] sort_fields, [CCode (array_length_cname = "n_fields", array_length_pos = 4.1, array_length_type = "guint")] E.BookCursorSortType[] sort_types) throws GLib.Error;
		[NoAccessorMethod]
		public E.BookCache book_cache { construct; }
		[NoAccessorMethod]
		public void* cursor { construct; }
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_cursor_sqlite_get_type ()")]
	[Version (since = "3.12")]
	public class DataBookCursorSqlite : E.DataBookCursor {
		[CCode (has_construct_function = false, type = "EDataBookCursor*")]
		public DataBookCursorSqlite (E.BookBackend backend, E.BookSqlite ebsql, string revision_key, [CCode (array_length_cname = "n_fields", array_length_pos = 5.1, array_length_type = "guint")] E.ContactField[] sort_fields, [CCode (array_length_cname = "n_fields", array_length_pos = 5.1, array_length_type = "guint")] E.BookCursorSortType[] sort_types) throws GLib.Error;
		[NoAccessorMethod]
		public void* cursor { construct; }
		[NoAccessorMethod]
		public E.BookSqlite ebsql { construct; }
		[NoAccessorMethod]
		public string revision_key { construct; }
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_direct_get_type ()")]
	public class DataBookDirect : GLib.Object {
		[CCode (has_construct_function = false)]
		[Version (since = "3.8")]
		public DataBookDirect (string backend_path, string backend_factory_name, string config);
		[Version (since = "3.8")]
		public bool register_gdbus_object (GLib.DBusConnection connection, string object_path) throws GLib.Error;
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_factory_get_type ()")]
	public class DataBookFactory : E.DataFactory, E.Extensible, GLib.Initable {
		[CCode (has_construct_function = false, type = "EDBusServer*")]
		public DataBookFactory (int backend_per_process, GLib.Cancellable? cancellable = null) throws GLib.Error;
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_view_get_type ()")]
	public class DataBookView : GLib.Object, GLib.Initable {
		[CCode (has_construct_function = false)]
		public DataBookView (E.BookBackend backend, E.BookBackendSExp sexp, GLib.DBusConnection connection, string object_path) throws GLib.Error;
		[Version (since = "3.50")]
		public void claim_contact_uid (string uid);
		[Version (since = "3.50")]
		public GLib.GenericArray<weak E.Contact>? dup_contacts (uint range_start, uint range_length);
		[Version (since = "3.50")]
		public E.BookIndices? dup_indices ();
		[Version (since = "3.8")]
		public unowned GLib.DBusConnection get_connection ();
		public unowned GLib.HashTable<string,int>? get_fields_of_interest ();
		[Version (since = "3.4")]
		public E.BookClientViewFlags get_flags ();
		[Version (since = "3.50")]
		public bool get_force_initial_notifications ();
		[Version (since = "3.50")]
		public size_t get_id ();
		[Version (since = "3.50")]
		public uint get_n_total ();
		[Version (since = "3.8")]
		public unowned string get_object_path ();
		[Version (since = "3.8")]
		public unowned E.BookBackendSExp get_sexp ();
		[Version (since = "3.34")]
		public bool is_completed ();
		public void notify_complete (GLib.Error error);
		[Version (since = "3.50")]
		public void notify_content_changed ();
		[Version (since = "3.2")]
		public void notify_progress (uint percent, string message);
		public void notify_remove (string id);
		public void notify_update (E.Contact contact);
		public void notify_update_prefiltered_vcard (string id, string vcard);
		public void notify_update_vcard (string id, string vcard);
		[Version (since = "3.34")]
		public E.BookBackend? ref_backend ();
		[Version (since = "3.50")]
		public void set_force_initial_notifications (bool value);
		[Version (since = "3.50")]
		public void set_indices (E.BookIndices indices);
		[Version (since = "3.50")]
		public void set_n_total (uint n_total);
		[Version (since = "3.50")]
		public void set_sort_fields (E.BookClientViewSortFields fields);
		[NoAccessorMethod]
		public E.BookBackend backend { owned get; construct; }
		public GLib.DBusConnection connection { get; construct; }
		[NoAccessorMethod]
		public void* indices { get; set; }
		public uint n_total { get; set; }
		public string object_path { get; construct; }
		public E.BookBackendSExp sexp { get; construct; }
		[Version (since = "3.50")]
		public signal void objects_added ([CCode (array_length = false, array_null_terminated = true)] string[] vcards);
		[Version (since = "3.50")]
		public signal void objects_modified ([CCode (array_length = false, array_null_terminated = true)] string[] vcards);
		[Version (since = "3.50")]
		public signal void objects_removed ([CCode (array_length = false, array_null_terminated = true)] string[] uids);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_view_watcher_cache_get_type ()")]
	[Version (since = "3.50")]
	public class DataBookViewWatcherCache : E.BookIndicesUpdater {
		[CCode (has_construct_function = false, type = "GObject*")]
		public DataBookViewWatcherCache (E.BookBackend backend, E.BookCache cache, E.DataBookView view);
		public GLib.GenericArray<weak E.Contact>? dup_contacts (uint range_start, uint range_length);
		public void take_sort_fields (owned E.BookClientViewSortFields? sort_fields);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_view_watcher_memory_get_type ()")]
	[Version (since = "3.50")]
	public class DataBookViewWatcherMemory : E.BookIndicesUpdater {
		[CCode (has_construct_function = false, type = "GObject*")]
		public DataBookViewWatcherMemory (E.BookBackend backend, E.DataBookView view);
		public GLib.GenericArray<weak E.Contact>? dup_contacts (uint range_start, uint range_length);
		public void set_locale (string? locale);
		public void take_sort_fields (owned E.BookClientViewSortFields? sort_fields);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_data_book_view_watcher_sqlite_get_type ()")]
	[Version (since = "3.50")]
	public class DataBookViewWatcherSqlite : E.BookIndicesUpdater {
		[CCode (has_construct_function = false, type = "GObject*")]
		public DataBookViewWatcherSqlite (E.BookBackend backend, E.BookSqlite ebsql, E.DataBookView view);
		public GLib.GenericArray<weak E.Contact>? dup_contacts (uint range_start, uint range_length);
		public void take_sort_fields (owned E.BookClientViewSortFields? sort_fields);
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_subprocess_book_factory_get_type ()")]
	public class SubprocessBookFactory : E.SubprocessFactory, GLib.Initable {
		[CCode (has_construct_function = false)]
		public SubprocessBookFactory (GLib.Cancellable? cancellable = null) throws GLib.Error;
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", type_id = "e_system_locale_watcher_get_type ()")]
	public class SystemLocaleWatcher : GLib.Object {
		[CCode (has_construct_function = false)]
		[Version (since = "3.30")]
		public SystemLocaleWatcher ();
		[Version (since = "3.30")]
		public string? dup_locale ();
		[NoAccessorMethod]
		[Version (since = "3.30")]
		public string locale { owned get; }
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_type_id = false)]
	[Compact]
	[Version (since = "3.12")]
	public class bSqlCursor {
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_type_id = false)]
	[Version (since = "3.12")]
	public struct bSqlSearchData {
		public weak string uid;
		public weak string vcard;
		public weak string extra;
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "E_BOOK_BACKEND_SEXP_COMPARE_KIND_", has_type_id = false)]
	[Version (since = "3.50")]
	public enum BookBackendSexpCompareKind {
		UNKNOWN,
		BEGINS_WITH,
		ENDS_WITH,
		CONTAINS,
		IS
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "E_BOOK_CACHE_CURSOR_ORIGIN_", has_type_id = false)]
	[Version (since = "3.26")]
	public enum BookCacheCursorOrigin {
		CURRENT,
		BEGIN,
		END
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "E_BOOK_CACHE_CURSOR_STEP_", has_type_id = false)]
	[Flags]
	[Version (since = "3.26")]
	public enum BookCacheCursorStepFlags {
		MOVE,
		FETCH
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "E_BOOK_SQLITE_ERROR_", has_type_id = false)]
	public enum BookSqliteError {
		ENGINE,
		CONSTRAINT,
		CONTACT_NOT_FOUND,
		INVALID_QUERY,
		UNSUPPORTED_QUERY,
		UNSUPPORTED_FIELD,
		END_OF_LIST,
		LOAD
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "EBSQL_CHANGE_", has_type_id = false)]
	[Version (since = "3.12")]
	public enum bSqlChangeType {
		CONTACT_ADDED,
		LOCALE_CHANGED,
		LAST
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "EBSQL_CURSOR_ORIGIN_", has_type_id = false)]
	[Version (since = "3.12")]
	public enum bSqlCursorOrigin {
		CURRENT,
		BEGIN,
		END
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "EBSQL_CURSOR_STEP_", has_type_id = false)]
	[Flags]
	[Version (since = "3.12")]
	public enum bSqlCursorStepFlags {
		MOVE,
		FETCH
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "EBSQL_LOCK_", has_type_id = false)]
	public enum bSqlLockType {
		READ,
		WRITE
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cprefix = "EBSQL_UNLOCK_", has_type_id = false)]
	public enum bSqlUnlockAction {
		NONE,
		COMMIT,
		ROLLBACK
	}
	[CCode (cheader_filename = "libedata-book/libedata-book.h", instance_pos = 1.9)]
	[Version (since = "3.26")]
	public delegate void BookBackendCustomOpFunc (E.BookBackend book_backend, GLib.Cancellable? cancellable = null) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", instance_pos = 2.9)]
	[Version (since = "3.34")]
	public delegate bool BookBackendForeachViewFunc (E.BookBackend backend, E.DataBookView view);
	[CCode (cheader_filename = "libedata-book/libedata-book.h", instance_pos = 7.9)]
	[Version (since = "3.26")]
	public delegate bool BookCacheSearchFunc (E.BookCache book_cache, string uid, string revision, string object, string extra, uint32 custom_flags, E.OfflineState offline_state);
	[CCode (cheader_filename = "libedata-book/libedata-book.h", instance_pos = 3.9)]
	[Version (since = "3.48")]
	public delegate bool BookSqliteSelectFunc (E.BookSqlite ebsql, [CCode (array_length_cname = "ncols", array_length_pos = 1.5)] string[] column_names, [CCode (array_length_cname = "ncols", array_length_pos = 1.5)] string[] column_values);
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_target = false)]
	[Version (since = "3.12")]
	public delegate int DataBookCursorCompareContactFunc (E.DataBookCursor cursor, E.Contact contact, out bool matches_sexp);
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_target = false)]
	[Version (since = "3.12")]
	public delegate bool DataBookCursorGetPositionFunc (E.DataBookCursor cursor, out int total, out int position, GLib.Cancellable? cancellable = null) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_target = false)]
	[Version (since = "3.12")]
	public delegate bool DataBookCursorLoadLocaleFunc (E.DataBookCursor cursor, out string locale) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_target = false)]
	[Version (since = "3.12")]
	public delegate bool DataBookCursorSetAlphabetIndexFunc (E.DataBookCursor cursor, int index, string locale) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_target = false)]
	[Version (since = "3.12")]
	public delegate bool DataBookCursorSetSexpFunc (E.DataBookCursor cursor, string? sexp) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", has_target = false)]
	[Version (since = "3.12")]
	public delegate int DataBookCursorStepFunc (E.DataBookCursor cursor, string? revision_guard, E.BookCursorStepFlags flags, E.BookCursorOrigin origin, int count, out GLib.SList<string>? results, GLib.Cancellable? cancellable = null) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", instance_pos = 4.9)]
	[Version (since = "3.12")]
	public delegate void bSqlChangeCallback (E.bSqlChangeType change_type, string uid, string extra, string vcard);
	[CCode (cheader_filename = "libedata-book/libedata-book.h", instance_pos = 2.9)]
	[Version (since = "3.12")]
	public delegate string bSqlVCardCallback (string uid, string extra);
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "E_BOOK_SQL_IS_POPULATED_KEY")]
	[Version (since = "3.12")]
	public const string BOOK_SQL_IS_POPULATED_KEY;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "E_BOOK_SQL_SYNC_DATA_KEY")]
	[Version (since = "3.12")]
	public const string BOOK_SQL_SYNC_DATA_KEY;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "EDS_ADDRESS_BOOK_MODULES")]
	public const string EDS_ADDRESS_BOOK_MODULES;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "EDS_SUBPROCESS_BOOK_PATH")]
	public const string EDS_SUBPROCESS_BOOK_PATH;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "XIMIAN_VCARD")]
	public const string XIMIAN_VCARD;
	[CCode (cheader_filename = "libedata-book/libedata-book.h")]
	[Version (replacement = "BookCacheSearchData.free", since = "3.26")]
	public static void book_cache_search_data_free (void* data);
	[CCode (cheader_filename = "libedata-book/libedata-book.h")]
	[Version (replacement = "BookMetaBackendInfo.free", since = "3.26")]
	public static void book_meta_backend_info_free (void* ptr);
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "ebsql_get_contact_extra_unlocked")]
	[Version (since = "3.16")]
	public static bool ebsql_get_contact_extra_unlocked (E.BookSqlite ebsql, string uid, out string ret_extra) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "ebsql_get_contact_unlocked")]
	[Version (since = "3.16")]
	public static bool ebsql_get_contact_unlocked (E.BookSqlite ebsql, string uid, bool meta_contact, out E.Contact contact) throws GLib.Error;
	[CCode (cheader_filename = "libedata-book/libedata-book.h", cname = "ebsql_get_vcard_unlocked")]
	[Version (since = "3.16")]
	public static bool ebsql_get_vcard_unlocked (E.BookSqlite ebsql, string uid, bool meta_contact, out string ret_vcard) throws GLib.Error;
}
