/* * vcard.h * * Copyright 2019 Michael Rasmussen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ #ifndef __VCARD_H__ #define __VCARD_H__ #include G_BEGIN_DECLS #include #include #define DEFAULT_VCARD_VERSION VCARD_VERSION_3_0 VCard* VCard_version_new(VCardVersion version, gboolean init); VCard* VCard_new(); GSList* VCard_new_from_text(const gchar* text, VCardVersion version, gboolean skip_broken); GSList* VCard_new_from_file(FILE* file, VCardVersion version, gboolean skip_broken); void VCard_free(VCard* object); void VCard_print_list(GSList* list); void VCard_print_list_fd(GSList* list, int fd); void VCard_print(VCard* object); void VCard_print_fd(VCard* object, int fd); gchar* VCard_get_state(VCard* object); GSList* VCard_get_property(VCard* object, const gchar* property); void VCard_set_property(VCard* object, const gchar* property, GSList* props); void vcard_property_free(gpointer data); void vcard_slist_property_free(gpointer data); void VCard_set_name(VCard* vcard, const gchar* firstname, const gchar* lastname); void VCard_set_company(VCard* vcard, const gchar* company); void VCard_set_telefon(VCard* vcard, TelefonType type, const gchar* number); void VCard_set_address(VCard* vcard, AddressType type, const gchar* address, const gchar* state, const gchar* city, const gchar* zip, const gchar* country); void VCard_set_photo_uri(VCard* vcard, PhotoType type, const gchar* uri); void VCard_set_photo_image(VCard* vcard, PhotoType type, const gchar* image); void VCard_set_email(VCard* vcard, EmailType type, const gchar* email); void VCard_set_etag(VCard* vcard, const gchar* etag); gchar* VCard_get_name(VCard* vcard); gchar* VCard_get_company(VCard* vcard); GSList* VCard_get_telefon(VCard* vcard, TelefonType type); GSList* VCard_get_address(VCard* vcard, AddressType type); gchar* VCard_get_photo(VCard* vcard); GSList* VCard_get_email(VCard* vcard, EmailType type); gchar* VCard_get_as_string(VCard* object); gchar* VCard_get_etag(VCard* vcard); void print_slist(GSList* list); G_END_DECLS #endif