BookCache
Object Hierarchy:
Description:
[
CCode ( type_id =
"e_book_cache_get_type ()" ) ]
[
Version ( since =
"3.26" ) ]
public class BookCache :
Cache,
Extensible
Contains only private data that should be read and manipulated using the functions below.
Content:
Properties:
Creation methods:
Methods:
- public bool contains_email (string email_address, Cancellable? cancellable = null) throws Error
Checks whether contains an email_address.
- public bool count_query (string? sexp, out uint out_n_total, Cancellable? cancellable = null) throws Error
Counts how many contacts satisfy the sexp.
- public bool cursor_calculate (BookCacheCursor cursor, out int out_total, out int out_position, Cancellable? cancellable = null) throws Error
Calculates the out_total amount of results for the
cursor's query expression, as well as the current out_position of cursor in the results.
- public int cursor_compare_contact (BookCacheCursor cursor, Contact contact, out bool out_matches_sexp)
Compares contact with cursor and returns
whether contact is less than, equal to, or greater than cursor.
- public void cursor_free (BookCacheCursor cursor)
- public bool cursor_set_sexp (BookCacheCursor cursor, string sexp) throws Error
Modifies the current query expression for cursor.
- public void cursor_set_target_alphabetic_index (BookCacheCursor cursor, int idx)
Sets the cursor position to an <link
linkend="cursor-alphabet">Alphabetic Index</link> into the alphabet active in this's
locale.
- public int cursor_step (BookCacheCursor cursor, BookCacheCursorStepFlags flags, BookCacheCursorOrigin origin, int count, out SList<BookCacheSearchData>? out_results, Cancellable? cancellable = null) throws Error
Steps cursor through its sorted query by a maximum of
count contacts starting from origin.
- public string? dup_categories ()
Returns a comma-separated list of categories used by the contacts
stored in the this.
- public string dup_locale ()
- public bool dup_query_contacts (string? sexp, ContactField sort_field, BookCursorSortType sort_type, uint n_offset, uint n_limit, owned GenericArray<unowned Contact> out_contacts, Cancellable? cancellable = null) throws Error
Queries the this for the contacts in
the given range and order.
- public bool dup_query_field (ContactField summary_field, string? sexp, ContactField sort_field, BookCursorSortType sort_type, uint n_offset, uint n_limit, owned GenericArray<unowned string> out_uids, owned GenericArray<unowned string> out_values, Cancellable? cancellable = null) throws Error
Queries the this for a
summary_field value for contacts in the given range and order.
- public bool dup_summary_field (ContactField summary_field, string uid, out string out_value, Cancellable? cancellable = null) throws Error
Queries the this for a
summary_field value for contact with UID uid.
- public bool get_contact (string uid, bool meta_contact, out Contact out_contact, Cancellable? cancellable = null) throws Error
Fetch the
Contact specified by uid in
this.
- public bool get_contact_custom_flags (string uid, out uint32 out_custom_flags, Cancellable? cancellable = null) throws Error
Gets the custom flags previously set for the uid, either
with set_contact_custom_flags, when adding contacts or when
removing contacts in offline.
- public bool get_contact_extra (string uid, out string out_extra, Cancellable? cancellable = null) throws Error
Fetches the extra data previously set for uid, either
with set_contact_extra or when adding contacts.
- public bool get_uids_with_extra (string extra, out SList<string> out_uids, Cancellable? cancellable = null) throws Error
Gets all the UID-s the extra data is set for.
- public bool get_vcard (string uid, bool meta_contact, out string out_vcard, Cancellable? cancellable = null) throws Error
Fetch a vCard string for uid in
this.
- public bool put_contact (Contact contact, string? extra, uint32 custom_flags, CacheOfflineFlag offline_flag, Cancellable? cancellable = null) throws Error
This is a convenience wrapper for
put_contacts, which is the preferred way to add or modify multiple contacts
when possible.
- public bool put_contacts (SList<Contact> contacts, SList<string>? extras, SList<uint32>? custom_flags, CacheOfflineFlag offline_flag, Cancellable? cancellable = null) throws Error
Adds or replaces contacts in this.
- public Collator ref_collator ()
References the currently active
Collator for this, use
unref when finished using the returned collator.
- public Source? ref_source ()
References the
Source to which this is paired, use
unref when no longer needed.
- public bool remove_contact (string uid, uint32 custom_flags, CacheOfflineFlag offline_flag, Cancellable? cancellable = null) throws Error
Removes the contact identified by uid from
this.
- public bool remove_contacts (SList<string> uids, SList<uint32>? custom_flags, CacheOfflineFlag offline_flag, Cancellable? cancellable = null) throws Error
Removes the contacts indicated by uids from
this.
- public bool search (string? sexp, bool meta_contacts, out SList<BookCacheSearchData> out_list, Cancellable? cancellable = null) throws Error
Searches this for contacts matching
the search expression sexp.
- public bool search_uids (string? sexp, out SList<string> out_list, Cancellable? cancellable = null) throws Error
Similar to search
, but fetches only a list of contact UIDs.
- public bool search_with_callback (string? sexp, BookCacheSearchFunc func, Cancellable? cancellable = null) throws Error
Similar to search
, but calls the func for each found contact.
- public bool set_contact_custom_flags (string uid, uint32 custom_flags, Cancellable? cancellable = null) throws Error
Sets or replaces the custom flags associated with a contact identified
by the uid.
- public bool set_contact_extra (string uid, string? extra, Cancellable? cancellable = null) throws Error
Sets or replaces the extra data associated with uid.
- public bool set_locale (string lc_collate, Cancellable? cancellable = null) throws Error
Relocalizes any locale specific data in the specified new
lc_collate locale.
Signals:
Inherited Members:
All known members inherited from class E.Cache
All known members inherited from class GLib.Object
All known members inherited from interface E.Extensible