Hello to all,
I have made more progress, but I'm a bit confused by the API.
I have added Speeddial support using Chris' trick :
--------------------------------------------
attr = e_vcard_attribute_new (NULL, "TEL");
e_vcard_attribute_add_param_with_value (attr,
e_vcard_attribute_param_new
("TYPE"),
"X-GNOME-MEETING-SPEEDDIAL");
e_vcard_attribute_add_value (attr, "55");
e_vcard_add_attribute (E_VCARD (contact), attr);
--------------------------------------------
Now, from an EContact, I want to be able to read the speed dial value
back. More or less easy with a succession of loops :
1) e_contact_get_attributes returns a GList of EVCardAttribute *
2) for each of the EVCardAttribute *, call e_vcard_attribute_get_params
to get a GList of EVCardAttributeParam *
3) for each of the EVCardAttributeParam, call
e_vcard_attribute_param_get_values to get a list of char * containing
the param value name. One of them is of course
"X-GNOMEMEETING-SPEEDDIAL", but how can I get the associate value back?
I can use e_vcard_attribute_get_values, but it will give me a list of
values for the EVCardAttribute found at step 1. How can I make sure I
get the value for the correct EVCardAttributeParam with the right
X-GNOMEMEETING-SPEEDDIAL value?
Currently, it works because all lists are single-valued, but shouldn't
there be a function in the API like :
e_vcard_attribute_param_get_value (EVCardAttributeParam (found in 2),
"X-GNOMEMEETING-SPEEDDIAL")?
Thanks,
--
Damien Sandras <dsandras seconix com>
Attachment:
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=