1 /* libebook-1.2.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "E", lower_case_cprefix = "e_")]
6 [CCode (cheader_filename = "libebook/e-book.h")]
7 public class AddressWestern {
8 public weak string country;
9 public weak string extended;
10 public weak string locality;
11 public weak string po_box;
12 public weak string postal_code;
13 public weak string region;
14 public weak string street;
15 public static unowned E.AddressWestern parse (string in_address);
17 [CCode (cheader_filename = "libebook/e-book.h")]
18 public class Book : GLib.Object {
19 [CCode (has_construct_function = false)]
20 public Book (E.Source source) throws GLib.Error;
21 public bool add_contact (E.Contact contact) throws GLib.Error;
22 public bool add_contacts (GLib.List contacts) throws GLib.Error;
23 public uint async_add_contact (E.Contact contact, E.BookIdCallback cb, void* closure);
24 public uint async_add_contacts (GLib.List contacts, E.BookCallback cb, void* closure);
25 public uint async_authenticate_user (string user, string passwd, string auth_method, E.BookCallback cb, void* closure);
26 public uint async_commit_contact (E.Contact contact, E.BookCallback cb, void* closure);
27 public uint async_commit_contacts (GLib.List contacts, E.BookCallback cb, void* closure);
28 public uint async_get_book_view (E.BookQuery query, GLib.List requested_fields, int max_results, E.BookBookViewCallback cb, void* closure);
29 public uint async_get_changes (string changeid, E.BookListCallback cb, void* closure);
30 public uint async_get_contact (string id, E.BookContactCallback cb, void* closure);
31 public uint async_get_contacts (E.BookQuery query, E.BookListCallback cb, void* closure);
32 public uint async_get_required_fields (E.BookEListCallback cb, void* closure);
33 public uint async_get_supported_auth_methods (E.BookEListCallback cb, void* closure);
34 public uint async_get_supported_fields (E.BookEListCallback cb, void* closure);
35 public uint async_open (bool only_if_exists, E.BookCallback open_response, void* closure);
36 public uint async_remove (E.BookCallback cb, void* closure);
37 public uint async_remove_all_contacts (E.BookCallback cb, void* closure);
38 public uint async_remove_contact (E.Contact contact, E.BookCallback cb, void* closure);
39 public uint async_remove_contact_by_id (string id, E.BookCallback cb, void* closure);
40 public uint async_remove_contacts (GLib.List ids, E.BookCallback cb, void* closure);
41 public bool authenticate_user (string user, string passwd, string auth_method) throws GLib.Error;
42 public bool cancel () throws GLib.Error;
43 public bool check_static_capability (string cap);
44 public bool commit_contact (E.Contact contact) throws GLib.Error;
45 public bool commit_contacts (GLib.List contacts) throws GLib.Error;
46 [CCode (has_construct_function = false)]
47 public Book.default_addressbook () throws GLib.Error;
48 public static GLib.Quark error_quark ();
49 public static void free_change_list (GLib.List change_list);
50 [CCode (has_construct_function = false)]
51 public Book.from_uri (string uri) throws GLib.Error;
52 public static bool get_addressbooks (out unowned E.SourceList addressbook_sources) throws GLib.Error;
53 public bool get_book_view (E.BookQuery query, GLib.List requested_fields, int max_results, out unowned E.BookView book_view) throws GLib.Error;
54 public bool get_changes (string changeid, GLib.List changes) throws GLib.Error;
55 public bool get_contact (string id, out unowned E.Contact contact) throws GLib.Error;
56 public bool get_contacts (E.BookQuery query, GLib.List contacts) throws GLib.Error;
57 public bool get_required_fields (GLib.List fields) throws GLib.Error;
58 public static bool get_self (out unowned E.Contact contact, out unowned E.Book book) throws GLib.Error;
59 public unowned E.Source get_source ();
60 public unowned string get_static_capabilities () throws GLib.Error;
61 public bool get_supported_auth_methods (GLib.List auth_methods) throws GLib.Error;
62 public bool get_supported_fields (GLib.List fields) throws GLib.Error;
63 public unowned string get_uri ();
64 public bool is_online ();
65 public bool is_opened ();
66 public static bool is_self (E.Contact contact);
67 public bool is_writable ();
68 public bool open (bool only_if_exists) throws GLib.Error;
69 public bool remove () throws GLib.Error;
70 public bool remove_all_contacts () throws GLib.Error;
71 public bool remove_contact (string id) throws GLib.Error;
72 public bool remove_contacts (GLib.List ids) throws GLib.Error;
73 public bool set_default_addressbook () throws GLib.Error;
74 public static bool set_default_source (E.Source source) throws GLib.Error;
75 public bool set_self (E.Contact contact) throws GLib.Error;
76 [CCode (has_construct_function = false)]
77 public Book.system_addressbook () throws GLib.Error;
78 public static void util_remove_duplicates (GLib.List haystack, GLib.List needles, GLib.List duplicate_ids);
79 public bool util_remove_duplicates_using_book (GLib.List contacts, GLib.List duplicate_ids) throws GLib.Error;
80 public virtual signal void auth_required ();
81 public virtual signal void backend_died ();
82 public virtual signal void connection_status (bool connected);
83 public virtual signal void writable_status (bool writable);
86 [CCode (cheader_filename = "libebook/e-book.h")]
87 public class BookChange {
88 public E.BookChangeType change_type;
89 public weak E.Contact contact;
92 [CCode (ref_function = "e_book_query_ref", unref_function = "e_book_query_unref", type_id = "E_TYPE_BOOK_QUERY", cheader_filename = "libebook/e-book.h")]
93 public class BookQuery {
94 public static unowned E.BookQuery and (int nqs, out unowned E.BookQuery qs, bool unref);
95 public unowned E.BookQuery andv ();
96 public static unowned E.BookQuery any_field_contains (string value);
97 public unowned E.BookQuery copy ();
98 public static unowned E.BookQuery field_exists (E.ContactField field);
99 public static unowned E.BookQuery field_test (E.ContactField field, E.BookQueryTest test, string value);
100 public static unowned E.BookQuery from_string (string query_string);
101 public unowned E.BookQuery not (bool unref);
102 public static unowned E.BookQuery or (int nqs, out unowned E.BookQuery qs, bool unref);
103 public unowned E.BookQuery orv ();
104 public unowned string to_string ();
105 public static unowned E.BookQuery vcard_field_exists (string field);
106 public static unowned E.BookQuery vcard_field_test (string field, E.BookQueryTest test, string value);
108 [CCode (cheader_filename = "libebook/e-book.h")]
109 public class BookSExp : GLib.Object {
110 [CCode (has_construct_function = false)]
111 public BookSExp (string text);
112 public bool match_contact (E.Contact contact);
113 public bool match_vcard (string vcard);
114 public bool parse (string text);
116 [CCode (cheader_filename = "libebook/e-book.h")]
117 public class BookView : GLib.Object {
118 public void* get_book ();
119 public bool get_parse_vcards ();
120 public void* get_query ();
121 public bool is_freezable ();
122 public void set_freezable (bool freezable);
123 public void set_parse_vcards (bool parse_vcards);
124 public void set_sort_order (string query_term);
125 public void start ();
128 public virtual signal void contacts_added (void* contacts);
129 public virtual signal void contacts_changed (void* contacts);
130 public virtual signal void contacts_removed (void* ids);
131 public virtual signal void sequence_complete (int status);
132 public virtual signal void status_message (string message);
134 [CCode (cheader_filename = "libebook/e-book.h")]
135 public class Contact : E.VCard {
136 [CCode (has_construct_function = false)]
138 public unowned E.Contact duplicate ();
139 public static E.ContactField field_id (string field_name);
140 public static E.ContactField field_id_from_vcard (string vcard_field);
141 public static unowned string field_name (E.ContactField field_id);
142 [CCode (has_construct_function = false)]
143 public Contact.from_vcard (string vcard);
144 public void* @get (E.ContactField field_id);
145 public unowned GLib.List get_attributes (E.ContactField field_id);
146 public void* get_const (E.ContactField field_id);
147 public bool inline_data ();
148 public bool is_syncable ();
149 public bool persist_data (string dir);
150 public static unowned string pretty_name (E.ContactField field_id);
151 public void @set (E.ContactField field_id, void* value);
152 public void set_attributes (E.ContactField field_id, GLib.List attributes);
153 public static unowned string vcard_attribute (E.ContactField field_id);
155 public string Rev { owned get; set; }
157 public void* address { get; set; }
159 public E.ContactAddress address_home { owned get; set; }
161 public string address_label_home { owned get; set; }
163 public string address_label_other { owned get; set; }
165 public string address_label_work { owned get; set; }
167 public E.ContactAddress address_other { owned get; set; }
169 public E.ContactAddress address_work { owned get; set; }
171 public E.ContactDate anniversary { owned get; set; }
173 public string assistant { owned get; set; }
175 public string assistant_phone { owned get; set; }
177 public E.ContactDate birth_date { owned get; set; }
179 public string blog_url { owned get; set; }
181 public string book_uri { owned get; set; }
183 public string business_fax { owned get; set; }
185 public string business_phone { owned get; set; }
187 public string business_phone_2 { owned get; set; }
189 public string callback_phone { owned get; set; }
191 public string caluri { owned get; set; }
193 public string car_phone { owned get; set; }
195 public string categories { owned get; set; }
197 public void* category_list { get; set; }
199 public string company_phone { owned get; set; }
201 public void* email { get; set; }
203 public string email_1 { owned get; set; }
205 public string email_2 { owned get; set; }
207 public string email_3 { owned get; set; }
209 public string email_4 { owned get; set; }
211 public string family_name { owned get; set; }
213 public string fburl { owned get; set; }
215 public string file_as { owned get; set; }
217 public string full_name { owned get; set; }
219 public E.ContactGeo geo { owned get; set; }
221 public string given_name { owned get; set; }
223 public string home_fax { owned get; set; }
225 public string home_phone { owned get; set; }
227 public string home_phone_2 { owned get; set; }
229 public string homepage_url { owned get; set; }
231 public string icscalendar { owned get; set; }
233 public string id { owned get; set; }
235 public void* im_aim { get; set; }
237 public string im_aim_home_1 { owned get; set; }
239 public string im_aim_home_2 { owned get; set; }
241 public string im_aim_home_3 { owned get; set; }
243 public string im_aim_work_1 { owned get; set; }
245 public string im_aim_work_2 { owned get; set; }
247 public string im_aim_work_3 { owned get; set; }
249 public void* im_gadugadu { get; set; }
251 public string im_gadugadu_home_1 { owned get; set; }
253 public string im_gadugadu_home_2 { owned get; set; }
255 public string im_gadugadu_home_3 { owned get; set; }
257 public string im_gadugadu_work_1 { owned get; set; }
259 public string im_gadugadu_work_2 { owned get; set; }
261 public string im_gadugadu_work_3 { owned get; set; }
263 public void* im_groupwise { get; set; }
265 public string im_groupwise_home_1 { owned get; set; }
267 public string im_groupwise_home_2 { owned get; set; }
269 public string im_groupwise_home_3 { owned get; set; }
271 public string im_groupwise_work_1 { owned get; set; }
273 public string im_groupwise_work_2 { owned get; set; }
275 public string im_groupwise_work_3 { owned get; set; }
277 public void* im_icq { get; set; }
279 public string im_icq_home_1 { owned get; set; }
281 public string im_icq_home_2 { owned get; set; }
283 public string im_icq_home_3 { owned get; set; }
285 public string im_icq_work_1 { owned get; set; }
287 public string im_icq_work_2 { owned get; set; }
289 public string im_icq_work_3 { owned get; set; }
291 public void* im_jabber { get; set; }
293 public string im_jabber_home_1 { owned get; set; }
295 public string im_jabber_home_2 { owned get; set; }
297 public string im_jabber_home_3 { owned get; set; }
299 public string im_jabber_work_1 { owned get; set; }
301 public string im_jabber_work_2 { owned get; set; }
303 public string im_jabber_work_3 { owned get; set; }
305 public void* im_msn { get; set; }
307 public string im_msn_home_1 { owned get; set; }
309 public string im_msn_home_2 { owned get; set; }
311 public string im_msn_home_3 { owned get; set; }
313 public string im_msn_work_1 { owned get; set; }
315 public string im_msn_work_2 { owned get; set; }
317 public string im_msn_work_3 { owned get; set; }
319 public void* im_skype { get; set; }
321 public string im_skype_home_1 { owned get; set; }
323 public string im_skype_home_2 { owned get; set; }
325 public string im_skype_home_3 { owned get; set; }
327 public string im_skype_work_1 { owned get; set; }
329 public string im_skype_work_2 { owned get; set; }
331 public string im_skype_work_3 { owned get; set; }
333 public void* im_yahoo { get; set; }
335 public string im_yahoo_home_1 { owned get; set; }
337 public string im_yahoo_home_2 { owned get; set; }
339 public string im_yahoo_home_3 { owned get; set; }
341 public string im_yahoo_work_1 { owned get; set; }
343 public string im_yahoo_work_2 { owned get; set; }
345 public string im_yahoo_work_3 { owned get; set; }
347 public string isdn_phone { owned get; set; }
349 public bool list { get; set; }
351 public bool list_show_addresses { get; set; }
353 public E.ContactPhoto logo { owned get; set; }
355 public string mailer { owned get; set; }
357 public string manager { owned get; set; }
359 public string mobile_phone { owned get; set; }
361 public E.ContactName name { owned get; set; }
363 public string name_or_org { owned get; }
365 public string nickname { owned get; set; }
367 public string note { owned get; set; }
369 public string office { owned get; set; }
371 public string org { owned get; set; }
373 public string org_unit { owned get; set; }
375 public string other_fax { owned get; set; }
377 public string other_phone { owned get; set; }
379 public string pager { owned get; set; }
381 public void* phone { get; set; }
383 public E.ContactPhoto photo { owned get; set; }
385 public string primary_phone { owned get; set; }
387 public string radio { owned get; set; }
389 public string role { owned get; set; }
391 public void* sip { get; set; }
393 public string spouse { owned get; set; }
395 public string telex { owned get; set; }
397 public string title { owned get; set; }
399 public string tty { owned get; set; }
401 public string video_url { owned get; set; }
403 public bool wants_html { get; set; }
405 public E.ContactCert x509Cert { owned get; set; }
408 [CCode (type_id = "E_TYPE_CONTACT_ADDRESS", cheader_filename = "libebook/e-book.h")]
409 public class ContactAddress {
410 public weak string address_format;
411 public weak string code;
412 public weak string country;
413 public weak string ext;
414 public weak string locality;
415 public weak string po;
416 public weak string region;
417 public weak string street;
420 [CCode (type_id = "E_TYPE_CONTACT_CERT", cheader_filename = "libebook/e-book.h")]
421 public class ContactCert {
422 public weak string data;
423 public size_t length;
426 [CCode (type_id = "E_TYPE_CONTACT_DATE", cheader_filename = "libebook/e-book.h")]
427 public class ContactDate {
431 [CCode (has_construct_function = false)]
432 public ContactDate ();
433 public bool equal (E.ContactDate dt2);
434 public static unowned E.ContactDate from_string (string str);
435 public unowned string to_string ();
438 [CCode (type_id = "E_TYPE_CONTACT_GEO", cheader_filename = "libebook/e-book.h")]
439 public class ContactGeo {
440 public double latitude;
441 public double longitude;
444 [CCode (copy_function = "e_contact_name_copy", type_id = "E_TYPE_CONTACT_NAME", cheader_filename = "libebook/e-book.h")]
445 public class ContactName {
446 public weak string additional;
447 public weak string family;
448 public weak string given;
449 public weak string prefixes;
450 public weak string suffixes;
451 [CCode (has_construct_function = false)]
452 public ContactName ();
453 public unowned E.ContactName copy ();
454 public static unowned E.ContactName from_string (string name_str);
455 public unowned string to_string ();
458 [CCode (type_id = "E_TYPE_CONTACT_PHOTO", cheader_filename = "libebook/e-book.h")]
459 public class ContactPhoto {
461 public E.ContactPhotoType type;
464 [CCode (cheader_filename = "libebook/e-book.h")]
465 public class NameWestern {
466 public weak string first;
467 public weak string full;
468 public weak string last;
469 public weak string middle;
470 public weak string nick;
471 public weak string prefix;
472 public weak string suffix;
473 public static unowned E.NameWestern parse (string full_name);
475 [CCode (cheader_filename = "libebook/e-book.h")]
476 public class VCard : GLib.Object {
477 [CCode (has_construct_function = false)]
479 public virtual void add_attribute (E.VCardAttribute attr);
480 public void add_attribute_with_value (owned E.VCardAttribute attr, string value);
481 public void add_attribute_with_values (owned E.VCardAttribute attr, ...);
482 public bool @construct (string str);
483 public bool construct_with_uid (string str, string uid);
484 public void dump_structure ();
485 public static unowned string escape_string (string s);
486 [CCode (has_construct_function = false)]
487 public VCard.from_string (string str);
488 public unowned E.VCardAttribute get_attribute (string name);
489 public unowned GLib.List get_attributes ();
490 public bool is_parsed ();
491 public bool is_parsing ();
492 public virtual void remove_attribute (E.VCardAttribute attr);
493 public void remove_attributes (string attr_group, string attr_name);
494 public unowned string to_string (E.VCardFormat format);
495 public static unowned string unescape_string (string s);
496 public static unowned GLib.List util_split_cards (string str, size_t len);
499 [CCode (copy_function = "e_vcard_attribute_copy", type_id = "E_TYPE_VCARD_ATTRIBUTE", cheader_filename = "libebook/e-book.h")]
500 public class VCardAttribute {
501 [CCode (has_construct_function = false)]
502 public VCardAttribute (string? attr_group, string attr_name);
503 public void add_param (E.VCardAttributeParam param);
504 public void add_param_with_value (owned E.VCardAttributeParam param, string value);
505 public void add_param_with_values (owned E.VCardAttributeParam param, ...);
506 public void add_value (string value);
507 public void add_value_decoded (string value, int len);
508 public void add_values ();
509 public unowned E.VCardAttribute copy ();
510 public bool equal (E.VCardAttribute attr_b);
511 public unowned string get_group ();
512 public unowned string get_name ();
513 public unowned GLib.List get_param (string name);
514 public unowned GLib.List get_params ();
515 public unowned string get_value ();
516 public unowned GLib.StringBuilder get_value_decoded ();
517 public unowned GLib.List get_values ();
518 public unowned GLib.List get_values_decoded ();
519 public bool has_type (string typestr);
520 public bool is_single_valued ();
521 public void remove_param (string param_name);
522 public void remove_param_value (string param_name, string s);
523 public void remove_params ();
524 public void remove_value (string s);
525 public void remove_values ();
528 [CCode (copy_function = "e_vcard_attribute_param_copy", cheader_filename = "libebook/e-book.h")]
529 public class VCardAttributeParam {
530 [CCode (has_construct_function = false)]
531 public VCardAttributeParam (string name);
532 public void add_value (string value);
533 public void add_values ();
534 public unowned E.VCardAttributeParam copy ();
535 public unowned string get_name ();
536 public unowned GLib.List get_values ();
537 public void remove_values ();
539 [CCode (cprefix = "E_BOOK_CHANGE_CARD_", has_type_id = false, cheader_filename = "libebook/e-book.h")]
540 public enum BookChangeType {
545 [CCode (cprefix = "E_BOOK_QUERY_", has_type_id = false, cheader_filename = "libebook/e-book.h")]
546 public enum BookQueryTest {
552 [CCode (cprefix = "E_BOOK_ERROR_", has_type_id = false, cheader_filename = "libebook/e-book.h")]
553 public enum BookStatus {
561 SOURCE_ALREADY_LOADED,
564 CONTACT_ID_ALREADY_EXISTS,
565 PROTOCOL_NOT_SUPPORTED,
568 AUTHENTICATION_FAILED,
569 AUTHENTICATION_REQUIRED,
575 INVALID_SERVER_VERSION,
579 [CCode (cprefix = "E_BOOK_VIEW_", has_type_id = false, cheader_filename = "libebook/e-book.h")]
580 public enum BookViewStatus {
582 STATUS_TIME_LIMIT_EXCEEDED,
583 STATUS_SIZE_LIMIT_EXCEEDED,
588 [CCode (cprefix = "E_CONTACT_", has_type_id = false, cheader_filename = "libebook/e-book.h")]
589 public enum ContactField {
728 [CCode (cprefix = "E_CONTACT_PHOTO_TYPE_", has_type_id = false, cheader_filename = "libebook/e-book.h")]
729 public enum ContactPhotoType {
733 [CCode (cprefix = "EVC_FORMAT_VCARD_", has_type_id = false, cheader_filename = "libebook/e-book.h")]
734 public enum VCardFormat {
738 [CCode (cheader_filename = "libebook/e-book.h", has_target = false)]
739 public delegate void BookBookViewCallback (E.Book book, E.BookStatus status, E.BookView book_view, void* closure);
740 [CCode (cheader_filename = "libebook/e-book.h", has_target = false)]
741 public delegate void BookCallback (E.Book book, E.BookStatus status, void* closure);
742 [CCode (cheader_filename = "libebook/e-book.h", has_target = false)]
743 public delegate void BookContactCallback (E.Book book, E.BookStatus status, E.Contact contact, void* closure);
744 [CCode (cheader_filename = "libebook/e-book.h", has_target = false)]
745 public delegate void BookEListCallback (E.Book book, E.BookStatus status, E.List list, void* closure);
746 [CCode (cheader_filename = "libebook/e-book.h", has_target = false)]
747 public delegate void BookIdCallback (E.Book book, E.BookStatus status, string id, void* closure);
748 [CCode (cheader_filename = "libebook/e-book.h", has_target = false)]
749 public delegate void BookListCallback (E.Book book, E.BookStatus status, GLib.List list, void* closure);
750 [CCode (cheader_filename = "libebook/e-book.h", has_target = false)]
751 public delegate void BookOpenProgressCallback (E.Book book, string status_message, short percent, void* closure);
752 [CCode (cname = "EVC_EMAIL", cheader_filename = "libebook/e-book.h")]
753 public const string EVC_EMAIL;
754 [CCode (cname = "EVC_FN", cheader_filename = "libebook/e-book.h")]
755 public const string EVC_FN;
756 [CCode (cname = "EVC_N", cheader_filename = "libebook/e-book.h")]
757 public const string EVC_N;
758 [CCode (cname = "EVC_TEL", cheader_filename = "libebook/e-book.h")]
759 public const string EVC_TEL;
760 [CCode (cname = "EVC_TYPE", cheader_filename = "libebook/e-book.h")]
761 public const string EVC_TYPE;
762 [CCode (cheader_filename = "libebook/e-book.h")]
763 public const int PARAM_READABLE;
764 [CCode (cheader_filename = "libebook/e-book.h")]
765 public const int PARAM_READWRITE;
766 [CCode (cheader_filename = "libebook/e-book-util.h")]
767 public static unowned string normalize_phone_number (string phone_number);