aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-card.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-04-05 04:58:46 +0800
committerChris Lahey <clahey@src.gnome.org>2000-04-05 04:58:46 +0800
commitd8db781adee587ed1fc5b948a68d1d0a7c2952c2 (patch)
treee2003adb7f8e6dbf4ec917adf95c7f594113ce39 /addressbook/backend/ebook/e-card.c
parent2d75a701029288c953a84ba0a696675f5a7eb77f (diff)
downloadgsoc2013-evolution-d8db781adee587ed1fc5b948a68d1d0a7c2952c2.tar
gsoc2013-evolution-d8db781adee587ed1fc5b948a68d1d0a7c2952c2.tar.gz
gsoc2013-evolution-d8db781adee587ed1fc5b948a68d1d0a7c2952c2.tar.bz2
gsoc2013-evolution-d8db781adee587ed1fc5b948a68d1d0a7c2952c2.tar.lz
gsoc2013-evolution-d8db781adee587ed1fc5b948a68d1d0a7c2952c2.tar.xz
gsoc2013-evolution-d8db781adee587ed1fc5b948a68d1d0a7c2952c2.tar.zst
gsoc2013-evolution-d8db781adee587ed1fc5b948a68d1d0a7c2952c2.zip
Changed this to backend to an ebook.
2000-04-04 Christopher James Lahey <clahey@helixcode.com> * addressbook/demo/e-test-model.c, addressbook/demo/e-test-model.h, addressbook/demo/Makefile.am: Changed this to backend to an ebook. * addressbook/backend/ebook/e-card-iterator.c, addressbook/backend/ebook/e-card-iterator.h, addressbook/backend/ebook/e-card-list-iterator.c, addressbook/backend/ebook/e-card-list.c, addressbook/backend/ebook/e-card-list.h, addressbook/backend/ebook/e-card.c, addressbook/backend/ebook/e-card.h: Fixed const correctness and changed a couple of functions to be external. * addressbook/Makefile.am: Fixed subdir ordering. svn path=/trunk/; revision=2287
Diffstat (limited to 'addressbook/backend/ebook/e-card.c')
-rw-r--r--addressbook/backend/ebook/e-card.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index ba55ffc2f7..0ec6105a95 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -62,11 +62,6 @@ static void set_phone_flags (VObject *vobj, ECardPhoneFlags flags);
static ECardAddressFlags get_address_flags (VObject *vobj);
static void set_address_flags (VObject *vobj, ECardAddressFlags flags);
-static void e_card_phone_free (ECardPhone *phone);
-static ECardPhone *e_card_phone_copy (ECardPhone *phone);
-static void e_card_delivery_address_free (ECardDeliveryAddress *addr);
-static ECardDeliveryAddress *e_card_delivery_address_copy (ECardDeliveryAddress *addr);
-
typedef void (* ParsePropertyFunc) (ECard *card, VObject *object);
struct {
@@ -502,7 +497,7 @@ e_card_class_init (ECardClass *klass)
object_class->set_arg = e_card_set_arg;
}
-static void
+void
e_card_phone_free (ECardPhone *phone)
{
if ( phone ) {
@@ -512,8 +507,8 @@ e_card_phone_free (ECardPhone *phone)
}
}
-static ECardPhone *
-e_card_phone_copy (ECardPhone *phone)
+ECardPhone *
+e_card_phone_copy (const ECardPhone *phone)
{
if ( phone ) {
ECardPhone *phone_copy = g_new(ECardPhone, 1);
@@ -524,7 +519,7 @@ e_card_phone_copy (ECardPhone *phone)
return NULL;
}
-static void
+void
e_card_delivery_address_free (ECardDeliveryAddress *addr)
{
if ( addr ) {
@@ -546,8 +541,8 @@ e_card_delivery_address_free (ECardDeliveryAddress *addr)
}
}
-static ECardDeliveryAddress *
-e_card_delivery_address_copy (ECardDeliveryAddress *addr)
+ECardDeliveryAddress *
+e_card_delivery_address_copy (const ECardDeliveryAddress *addr)
{
if ( addr ) {
ECardDeliveryAddress *addr_copy = g_new(ECardDeliveryAddress, 1);
@@ -642,17 +637,17 @@ e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->address);
break;
case ARG_PHONE:
- if (!card->address)
- card->address = e_card_list_new((ECardListCopyFunc) e_card_phone_copy,
- (ECardListFreeFunc) e_card_phone_free,
- NULL);
+ if (!card->phone)
+ card->phone = e_card_list_new((ECardListCopyFunc) e_card_phone_copy,
+ (ECardListFreeFunc) e_card_phone_free,
+ NULL);
GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->phone);
break;
case ARG_EMAIL:
- if (!card->address)
- card->address = e_card_list_new((ECardListCopyFunc) g_strdup,
- (ECardListFreeFunc) g_free,
- NULL);
+ if (!card->email)
+ card->email = e_card_list_new((ECardListCopyFunc) g_strdup,
+ (ECardListFreeFunc) g_free,
+ NULL);
GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->email);
break;
case ARG_BIRTH_DATE: