vcard.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * OBEX Server
  4. *
  5. * Copyright (C) 2008-2010 Intel Corporation. All rights reserved.
  6. *
  7. */
  8. enum phonebook_number_type {
  9. TEL_TYPE_HOME,
  10. TEL_TYPE_MOBILE,
  11. TEL_TYPE_FAX,
  12. TEL_TYPE_WORK,
  13. TEL_TYPE_OTHER,
  14. };
  15. enum phonebook_field_type {
  16. FIELD_TYPE_HOME,
  17. FIELD_TYPE_WORK,
  18. FIELD_TYPE_OTHER,
  19. };
  20. enum phonebook_call_type {
  21. CALL_TYPE_NOT_A_CALL,
  22. CALL_TYPE_MISSED,
  23. CALL_TYPE_INCOMING,
  24. CALL_TYPE_OUTGOING,
  25. };
  26. struct phonebook_field {
  27. char *text;
  28. int type;
  29. };
  30. struct phonebook_addr {
  31. GSList *fields;
  32. int type;
  33. };
  34. struct phonebook_contact {
  35. char *uid;
  36. char *fullname;
  37. char *given;
  38. char *family;
  39. char *additional;
  40. GSList *numbers;
  41. GSList *emails;
  42. char *prefix;
  43. char *suffix;
  44. GSList *addresses;
  45. char *birthday;
  46. char *nickname;
  47. GSList *urls;
  48. char *photo;
  49. char *company;
  50. char *department;
  51. char *role;
  52. char *title;
  53. char *datetime;
  54. int calltype;
  55. };
  56. void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact,
  57. uint64_t filter, uint8_t format);
  58. void phonebook_contact_free(struct phonebook_contact *contact);
  59. void phonebook_addr_free(gpointer addr);