aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-05-14 08:46:29 +0800
committerChris Toshok <toshok@src.gnome.org>2001-05-14 08:46:29 +0800
commit9953071e22306fedaf852d018e0b5416496ababb (patch)
tree3be223f5b6f6b3f8b92e30ae4271eb0c5bcebcac /addressbook/backend/ebook
parent4e878bc6d47a427ec06032b5180245dd619678ae (diff)
downloadgsoc2013-evolution-9953071e22306fedaf852d018e0b5416496ababb.tar.gz
gsoc2013-evolution-9953071e22306fedaf852d018e0b5416496ababb.tar.zst
gsoc2013-evolution-9953071e22306fedaf852d018e0b5416496ababb.zip
add prototype for addressbook_expand_uri.
2001-05-13 Chris Toshok <toshok@ximian.com> * gui/component/addressbook.h: add prototype for addressbook_expand_uri. * gui/component/addressbook-component.c (destination_folder_handle_drop): create an EBook for @physical_uri. (dnd_drop_book_open_cb): actually add the dropped cards. * gui/component/addressbook.c (addressbook_expand_uri): abstract this code out from the set_prop method so we can use it in the component. (set_prop): call addressbook_expand_uri. * backend/ebook/e-card.c (e_card_load_cards_from_string): new function. * backend/ebook/e-card.h: add prototype for e_card_load_cards_from_string. svn path=/trunk/; revision=9788
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r--addressbook/backend/ebook/e-card.c18
-rw-r--r--addressbook/backend/ebook/e-card.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 3845ac8227..55b91e26d7 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -2013,6 +2013,24 @@ e_card_load_cards_from_file(const char *filename)
return list;
}
+GList *
+e_card_load_cards_from_string(const char *str)
+{
+ VObject *vobj = Parse_MIME(str, strlen (str));
+ GList *list = NULL;
+ while(vobj) {
+ VObject *next;
+ ECard *card = E_CARD(gtk_type_new(e_card_get_type()));
+ parse(card, vobj);
+ next = nextVObjectInList(vobj);
+ cleanVObject(vobj);
+ vobj = next;
+ list = g_list_prepend(list, card);
+ }
+ list = g_list_reverse(list);
+ return list;
+}
+
void
e_card_free_empty_lists (ECard *card)
{
diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h
index 3714324081..ae0ab3c1ef 100644
--- a/addressbook/backend/ebook/e-card.h
+++ b/addressbook/backend/ebook/e-card.h
@@ -154,6 +154,7 @@ gboolean e_card_email_match_string (const ECard
/* Specialized functionality */
GList *e_card_load_cards_from_file (const char *filename);
+GList *e_card_load_cards_from_string (const char *str);
void e_card_free_empty_lists (ECard *card);
enum _ECardDisposition {