[libgdata] [contacts] Add the ability to list all extended properties of a contact



commit 3684d2e4276c4a98b30e38613114456f20f84c31
Author: Philip Withnall <philip tecnocode co uk>
Date:   Mon Jun 1 16:46:50 2009 +0100

    [contacts] Add the ability to list all extended properties of a contact
---
 docs/reference/gdata-sections.txt                |    1 +
 gdata/gdata.symbols                              |    1 +
 gdata/services/contacts/gdata-contacts-contact.c |   17 +++++++++++++++++
 gdata/services/contacts/gdata-contacts-contact.h |   10 +++++++++-
 4 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/docs/reference/gdata-sections.txt b/docs/reference/gdata-sections.txt
index e29460b..cb3f591 100644
--- a/docs/reference/gdata-sections.txt
+++ b/docs/reference/gdata-sections.txt
@@ -410,6 +410,7 @@ gdata_contacts_contact_add_group
 gdata_contacts_contact_remove_group
 gdata_contacts_contact_is_group_deleted
 gdata_contacts_contact_get_extended_property
+gdata_contacts_contact_get_extended_properties
 gdata_contacts_contact_set_extended_property
 gdata_contacts_contact_get_edited
 gdata_contacts_contact_is_deleted
diff --git a/gdata/gdata.symbols b/gdata/gdata.symbols
index ab150f9..e9290e0 100644
--- a/gdata/gdata.symbols
+++ b/gdata/gdata.symbols
@@ -329,6 +329,7 @@ gdata_contacts_contact_add_organization
 gdata_contacts_contact_get_organizations
 gdata_contacts_contact_get_primary_organization
 gdata_contacts_contact_get_extended_property
+gdata_contacts_contact_get_extended_properties
 gdata_contacts_contact_set_extended_property
 gdata_contacts_contact_add_group
 gdata_contacts_contact_remove_group
diff --git a/gdata/services/contacts/gdata-contacts-contact.c b/gdata/services/contacts/gdata-contacts-contact.c
index ee72486..bb4d194 100644
--- a/gdata/services/contacts/gdata-contacts-contact.c
+++ b/gdata/services/contacts/gdata-contacts-contact.c
@@ -1017,6 +1017,23 @@ gdata_contacts_contact_get_extended_property (GDataContactsContact *self, const
 }
 
 /**
+ * gdata_contacts_contact_get_extended_properties:
+ * @self: a #GDataContactsContact
+ *
+ * Gets the full list of extended properties of the contact; a hash table mapping property name to value.
+ *
+ * Return value: a #GHashTable of extended properties
+ *
+ * Since: 0.4.0
+ **/
+GHashTable *
+gdata_contacts_contact_get_extended_properties (GDataContactsContact *self)
+{
+	g_return_val_if_fail (GDATA_IS_CONTACTS_CONTACT (self), NULL);
+	return self->priv->extended_properties;
+}
+
+/**
  * gdata_contacts_contact_set_extended_property:
  * @self: a #GDataContactsContact
  * @name: the property name; an arbitrary, unique string
diff --git a/gdata/services/contacts/gdata-contacts-contact.h b/gdata/services/contacts/gdata-contacts-contact.h
index da39812..ecf6b75 100644
--- a/gdata/services/contacts/gdata-contacts-contact.h
+++ b/gdata/services/contacts/gdata-contacts-contact.h
@@ -63,28 +63,36 @@ GDataContactsContact *gdata_contacts_contact_new (const gchar *id) G_GNUC_WARN_U
 GDataContactsContact *gdata_contacts_contact_new_from_xml (const gchar *xml, gint length, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 void gdata_contacts_contact_get_edited (GDataContactsContact *self, GTimeVal *edited);
+gboolean gdata_contacts_contact_is_deleted (GDataContactsContact *self);
+
 void gdata_contacts_contact_add_email_address (GDataContactsContact *self, GDataGDEmailAddress *email_address);
 GList *gdata_contacts_contact_get_email_addresses (GDataContactsContact *self);
 GDataGDEmailAddress *gdata_contacts_contact_get_primary_email_address (GDataContactsContact *self);
+
 void gdata_contacts_contact_add_im_address (GDataContactsContact *self, GDataGDIMAddress *im_address);
 GList *gdata_contacts_contact_get_im_addresses (GDataContactsContact *self);
 GDataGDIMAddress *gdata_contacts_contact_get_primary_im_address (GDataContactsContact *self);
+
 void gdata_contacts_contact_add_phone_number (GDataContactsContact *self, GDataGDPhoneNumber *phone_number);
 GList *gdata_contacts_contact_get_phone_numbers (GDataContactsContact *self);
 GDataGDPhoneNumber *gdata_contacts_contact_get_primary_phone_number (GDataContactsContact *self);
+
 void gdata_contacts_contact_add_postal_address (GDataContactsContact *self, GDataGDPostalAddress *postal_address);
 GList *gdata_contacts_contact_get_postal_addresses (GDataContactsContact *self);
 GDataGDPostalAddress *gdata_contacts_contact_get_primary_postal_address (GDataContactsContact *self);
+
 void gdata_contacts_contact_add_organization (GDataContactsContact *self, GDataGDOrganization *organization);
 GList *gdata_contacts_contact_get_organizations (GDataContactsContact *self);
 GDataGDOrganization *gdata_contacts_contact_get_primary_organization (GDataContactsContact *self);
+
 const gchar *gdata_contacts_contact_get_extended_property (GDataContactsContact *self, const gchar *name);
+GHashTable *gdata_contacts_contact_get_extended_properties (GDataContactsContact *self);
 gboolean gdata_contacts_contact_set_extended_property (GDataContactsContact *self, const gchar *name, const gchar *value);
+
 void gdata_contacts_contact_add_group (GDataContactsContact *self, const gchar *href);
 void gdata_contacts_contact_remove_group (GDataContactsContact *self, const gchar *href);
 gboolean gdata_contacts_contact_is_group_deleted (GDataContactsContact *self, const gchar *href);
 GList *gdata_contacts_contact_get_groups (GDataContactsContact *self) G_GNUC_WARN_UNUSED_RESULT;
-gboolean gdata_contacts_contact_is_deleted (GDataContactsContact *self);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]