predicate returning TRUE if there's only one value for the attribute.
authorChris Toshok <toshok@ximian.com>
Thu, 26 Feb 2004 15:54:10 +0000 (15:54 +0000)
committerChris Toshok <toshok@src.gnome.org>
Thu, 26 Feb 2004 15:54:10 +0000 (15:54 +0000)
commitac53ec420a4c893e76507ee373a4d356278eb001
tree9d587afdb8ce8f45feffbed87c000c67bea6fb85
parent70845e09c32451fba485172fdb7e3b8db0a82a29
predicate returning TRUE if there's only one value for the attribute.

2004-02-25  Chris Toshok  <toshok@ximian.com>

* libebook/e-vcard.c (e_vcard_attribute_is_single_valued):
predicate returning TRUE if there's only one value for the
attribute.
(e_vcard_attribute_get_value): return the first value in the list,
if there is one.  also, warn if called on a multi-valued
attribute.
(e_vcard_attribute_get_value_decoded): same, but return a GString.
(e_vcard_attribute_has_type): predicate to check for TYPE=@typestr
in the parameter list for an attribute.

* libebook/e-vcard.h: add prototypes for
e_vcard_attribute_is_single_valued and
e_vcard_attribute_get_value{_decoded}.  Also, add
e_vcard_attribute_has_type.

* libebook/e-contact.h: add prototypes for
e_contact_{get,set}_attributes, and e_contact_vcard_attribute.

* libebook/e-contact.c (e_contact_vcard_attribute): new function,
return the vcard attribute for a given EContactField id.
(e_contact_get_attributes): get a GList* of EVCardAttributes for
the given EContactField.  This allows you to get at the parameters
to the attribute, which you can't get with e_contact_get.
(e_contact_set_attributes): an analogous setter for
e_contact_get_attributes.
addressbook/ChangeLog
addressbook/libebook/e-contact.c
addressbook/libebook/e-contact.h
addressbook/libebook/e-vcard.c
addressbook/libebook/e-vcard.h