Evolution-Data-Server Manual: Address Book Data (libebook-contacts) | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
Synopsis
#define EVC_ADR #define EVC_BDAY #define EVC_CALURI #define EVC_CATEGORIES #define EVC_EMAIL #define EVC_ENCODING #define EVC_FBURL #define EVC_FN #define EVC_GEO #define EVC_ICSCALENDAR #define EVC_KEY #define EVC_LABEL #define EVC_LOGO #define EVC_MAILER #define EVC_NICKNAME #define EVC_N #define EVC_NOTE #define EVC_ORG #define EVC_PHOTO #define EVC_PRODID #define EVC_QUOTEDPRINTABLE #define EVC_REV #define EVC_ROLE #define EVC_TEL #define EVC_TITLE #define EVC_TYPE #define EVC_UID #define EVC_URL #define EVC_VALUE #define EVC_VERSION #define EVC_X_AIM #define EVC_X_ANNIVERSARY #define EVC_X_ASSISTANT #define EVC_X_BIRTHDAY #define EVC_X_BLOG_URL #define EVC_X_CALLBACK #define EVC_X_COMPANY #define EVC_X_DEST_CONTACT_UID #define EVC_X_DEST_EMAIL_NUM #define EVC_X_DEST_HTML_MAIL #define EVC_X_DEST_SOURCE_UID #define EVC_X_E164 #define EVC_X_FILE_AS #define EVC_X_GADUGADU #define EVC_X_GROUPWISE #define EVC_X_ICQ #define EVC_X_JABBER #define EVC_X_LIST_SHOW_ADDRESSES #define EVC_X_LIST #define EVC_X_LIST_NAME #define EVC_X_MANAGER #define EVC_X_MSN #define EVC_X_RADIO #define EVC_X_SKYPE #define EVC_X_GOOGLE_TALK #define EVC_X_TWITTER #define EVC_X_SIP #define EVC_X_SPOUSE #define EVC_X_TELEX #define EVC_X_TTYTDD #define EVC_X_VIDEO_URL #define EVC_X_WANTS_HTML #define EVC_X_YAHOO #define EVC_X_BOOK_UID #define EVC_CONTACT_LIST #define EVC_PARENT_CL #define EVC_CL_UID #define EVC_X_DEST_EMAIL #define EVC_X_DEST_NAME enum EVCardFormat; #define E_TYPE_VCARD_PARAM_ATTRIBUTE #define E_VCARD_21_VALID_PROPERTIES #define E_VCARD_21_VALID_PARAMETERS struct EVCard; void e_vcard_construct (EVCard *evc
,const gchar *str
); void e_vcard_construct_with_uid (EVCard *evc
,const gchar *str
,const gchar *uid
); EVCard * e_vcard_new (void
); EVCard * e_vcard_new_from_string (const gchar *str
); gboolean e_vcard_is_parsed (EVCard *evc
); gchar * e_vcard_to_string (EVCard *evc
,EVCardFormat format
); void e_vcard_dump_structure (EVCard *evc
); EVCardAttribute * e_vcard_attribute_new (const gchar *attr_group
,const gchar *attr_name
); void e_vcard_attribute_free (EVCardAttribute *attr
); EVCardAttribute * e_vcard_attribute_copy (EVCardAttribute *attr
); void e_vcard_remove_attributes (EVCard *evc
,const gchar *attr_group
,const gchar *attr_name
); void e_vcard_remove_attribute (EVCard *evc
,EVCardAttribute *attr
); void e_vcard_append_attribute (EVCard *evc
,EVCardAttribute *attr
); void e_vcard_append_attribute_with_value (EVCard *evcard
,EVCardAttribute *attr
,const gchar *value
); void e_vcard_append_attribute_with_values (EVCard *evcard
,EVCardAttribute *attr
,...
); void e_vcard_add_attribute (EVCard *evc
,EVCardAttribute *attr
); void e_vcard_add_attribute_with_value (EVCard *evcard
,EVCardAttribute *attr
,const gchar *value
); void e_vcard_add_attribute_with_values (EVCard *evcard
,EVCardAttribute *attr
,...
); void e_vcard_attribute_add_value (EVCardAttribute *attr
,const gchar *value
); void e_vcard_attribute_add_value_decoded (EVCardAttribute *attr
,const gchar *value
,gint len
); void e_vcard_attribute_add_values (EVCardAttribute *attr
,...
); void e_vcard_attribute_remove_value (EVCardAttribute *attr
,const gchar *s
); void e_vcard_attribute_remove_values (EVCardAttribute *attr
); void e_vcard_attribute_remove_params (EVCardAttribute *attr
); void e_vcard_attribute_remove_param (EVCardAttribute *attr
,const gchar *param_name
); void e_vcard_attribute_remove_param_value (EVCardAttribute *attr
,const gchar *param_name
,const gchar *s
); EVCardAttributeParam * e_vcard_attribute_param_new (const gchar *name
); void e_vcard_attribute_param_free (EVCardAttributeParam *param
); EVCardAttributeParam * e_vcard_attribute_param_copy (EVCardAttributeParam *param
); void e_vcard_attribute_add_param (EVCardAttribute *attr
,EVCardAttributeParam *param
); void e_vcard_attribute_add_param_with_value (EVCardAttribute *attr
,EVCardAttributeParam *param
,const gchar *value
); void e_vcard_attribute_add_param_with_values (EVCardAttribute *attr
,EVCardAttributeParam *param
,...
); void e_vcard_attribute_param_add_value (EVCardAttributeParam *param
,const gchar *value
); void e_vcard_attribute_param_add_values (EVCardAttributeParam *param
,...
); void e_vcard_attribute_param_remove_values (EVCardAttributeParam *param
); EVCardAttribute * e_vcard_get_attribute (EVCard *evc
,const gchar *name
); EVCardAttribute * e_vcard_get_attribute_if_parsed (EVCard *evc
,const gchar *name
); GList * e_vcard_get_attributes (EVCard *evcard
); const gchar * e_vcard_attribute_get_group (EVCardAttribute *attr
); const gchar * e_vcard_attribute_get_name (EVCardAttribute *attr
); GList * e_vcard_attribute_get_values (EVCardAttribute *attr
); GList * e_vcard_attribute_get_values_decoded (EVCardAttribute *attr
); gboolean e_vcard_attribute_is_single_valued (EVCardAttribute *attr
); gchar * e_vcard_attribute_get_value (EVCardAttribute *attr
); GString * e_vcard_attribute_get_value_decoded (EVCardAttribute *attr
); GList * e_vcard_attribute_get_params (EVCardAttribute *attr
); GList * e_vcard_attribute_get_param (EVCardAttribute *attr
,const gchar *name
); const gchar * e_vcard_attribute_param_get_name (EVCardAttributeParam *param
); GList * e_vcard_attribute_param_get_values (EVCardAttributeParam *param
); gboolean e_vcard_attribute_has_type (EVCardAttribute *attr
,const gchar *typestr
); gchar * e_vcard_escape_string (const gchar *s
); gchar * e_vcard_unescape_string (const gchar *s
); EVCardAttribute; EVCardAttributeParam;
Object Hierarchy
GObject +----EVCard +----EContact
GBoxed +----EVCardAttribute
GBoxed +----EVCardAttributeParam
Details
EVC_X_DEST_EMAIL
#define EVC_X_DEST_EMAIL "X-EVOLUTION-DEST-EMAIL"
Warning
EVC_X_DEST_EMAIL
is deprecated and should not be used in newly-written code.
EVC_X_DEST_NAME
#define EVC_X_DEST_NAME "X-EVOLUTION-DEST-NAME"
Warning
EVC_X_DEST_NAME
is deprecated and should not be used in newly-written code.
E_TYPE_VCARD_PARAM_ATTRIBUTE
#define E_TYPE_VCARD_PARAM_ATTRIBUTE (e_vcard_attribute_param_get_type ())
e_vcard_construct_with_uid ()
void e_vcard_construct_with_uid (EVCard *evc
,const gchar *str
,const gchar *uid
);
FIXME: Document me!
|
an EVCard |
|
a vCard string |
|
a unique ID string |
Since 3.4
e_vcard_new ()
EVCard * e_vcard_new (void
);
Creates a new, blank EVCard.
Returns : |
A new, blank EVCard. |
e_vcard_new_from_string ()
EVCard * e_vcard_new_from_string (const gchar *str
);
Creates a new EVCard from the passed-in string representation.
|
a string representation of the vcard to create |
Returns : |
A new EVCard. |
e_vcard_is_parsed ()
gboolean e_vcard_is_parsed (EVCard *evc
);
Check if the evc
has been parsed already. Used for debugging.
|
an EVCard |
Returns : |
TRUE if evc has been parsed, FALSE otherwise. |
Since 3.2
e_vcard_to_string ()
gchar * e_vcard_to_string (EVCard *evc
,EVCardFormat format
);
Exports evc
to a string representation, specified
by the format
argument.
|
the EVCard to export |
|
the format to export to |
Returns : |
A newly allocated string representing the vcard. |
e_vcard_dump_structure ()
void e_vcard_dump_structure (EVCard *evc
);
Prints a dump of evc
's structure to stdout. Used for
debugging.
|
the EVCard to dump |
e_vcard_attribute_new ()
EVCardAttribute * e_vcard_attribute_new (const gchar *attr_group
,const gchar *attr_name
);
Creates a new EVCardAttribute with the specified group and attribute names.
|
a group name. [allow-none] |
|
an attribute name |
Returns : |
A new EVCardAttribute. |
e_vcard_attribute_free ()
void e_vcard_attribute_free (EVCardAttribute *attr
);
Frees an attribute, its values and its parameters.
|
attribute to free |
e_vcard_attribute_copy ()
EVCardAttribute * e_vcard_attribute_copy (EVCardAttribute *attr
);
Makes a copy of attr
.
|
attribute to copy |
Returns : |
A new EVCardAttribute identical to attr . |
e_vcard_remove_attributes ()
void e_vcard_remove_attributes (EVCard *evc
,const gchar *attr_group
,const gchar *attr_name
);
Removes all the attributes with group name and attribute name equal to
passed in values. If attr_group
is NULL
or an empty string,
it removes all the attributes with passed in name irrespective of
their group names.
|
vcard object |
|
group name of attributes to be removed. [allow-none] |
|
name of the arributes to be removed |
e_vcard_remove_attribute ()
void e_vcard_remove_attribute (EVCard *evc
,EVCardAttribute *attr
);
Removes attr
from evc
and frees it.
|
an EVCard |
|
an EVCardAttribute to remove |
e_vcard_append_attribute ()
void e_vcard_append_attribute (EVCard *evc
,EVCardAttribute *attr
);
Appends attr
to evc
to the end of a list of attributes.
|
an EVCard |
|
an EVCardAttribute to append. [transfer full] |
Since 2.32
e_vcard_append_attribute_with_value ()
void e_vcard_append_attribute_with_value (EVCard *evcard
,EVCardAttribute *attr
,const gchar *value
);
Appends attr
to evcard
, setting it to value
.
For attribute addition is used e_vcard_append_attribute()
.
|
an EVCard |
|
an EVCardAttribute to append. [transfer full] |
|
a value to assign to the attribute |
Since 2.32
e_vcard_append_attribute_with_values ()
void e_vcard_append_attribute_with_values (EVCard *evcard
,EVCardAttribute *attr
,...
);
Appends attr
to evcard
, assigning the list of values to it.
For attribute addition is used e_vcard_append_attribute()
.
|
an EVCard
|
|
an EVCardAttribute to append. [transfer full] |
|
a NULL -terminated list of values to assign to the attribute |
Since 2.32
e_vcard_add_attribute ()
void e_vcard_add_attribute (EVCard *evc
,EVCardAttribute *attr
);
Adds attr
to evc
. It's added to the beginning of a list of attributes.
|
an EVCard |
|
an EVCardAttribute to add. [transfer full] |
e_vcard_add_attribute_with_value ()
void e_vcard_add_attribute_with_value (EVCard *evcard
,EVCardAttribute *attr
,const gchar *value
);
Adds attr
to evcard
, setting it to value
. For attribute addition
is used e_vcard_add_attribute()
.
|
an EVCard |
|
an EVCardAttribute to add. [transfer full] |
|
a value to assign to the attribute |
e_vcard_add_attribute_with_values ()
void e_vcard_add_attribute_with_values (EVCard *evcard
,EVCardAttribute *attr
,...
);
Adds attr
to evcard
, assigning the list of values to it.
For attribute addition is used e_vcard_add_attribute()
.
|
an EVCard
|
|
an EVCardAttribute to add. [transfer full] |
|
a NULL -terminated list of values to assign to the attribute |
e_vcard_attribute_add_value ()
void e_vcard_attribute_add_value (EVCardAttribute *attr
,const gchar *value
);
Adds value
to attr
's list of values.
|
an EVCardAttribute |
|
a string value |
e_vcard_attribute_add_value_decoded ()
void e_vcard_attribute_add_value_decoded (EVCardAttribute *attr
,const gchar *value
,gint len
);
Decodes value
according to the encoding used for attr
, and
adds it to attr
's list of values.
|
an EVCardAttribute |
|
an encoded value |
|
the length of the encoded value, in bytes |
e_vcard_attribute_add_values ()
void e_vcard_attribute_add_values (EVCardAttribute *attr
,...
);
Adds a list of values to attr
.
|
an EVCardAttribute |
|
a NULL -terminated list of strings |
e_vcard_attribute_remove_value ()
void e_vcard_attribute_remove_value (EVCardAttribute *attr
,const gchar *s
);
Removes from the value list in attr
the value s
.
|
an EVCardAttribute |
|
an value to remove |
e_vcard_attribute_remove_values ()
void e_vcard_attribute_remove_values (EVCardAttribute *attr
);
Removes all values from attr
.
|
an EVCardAttribute |
e_vcard_attribute_remove_params ()
void e_vcard_attribute_remove_params (EVCardAttribute *attr
);
Removes all parameters from attr
.
|
an EVCardAttribute |
e_vcard_attribute_remove_param ()
void e_vcard_attribute_remove_param (EVCardAttribute *attr
,const gchar *param_name
);
Removes the parameter param_name
from the attribute attr
.
|
an EVCardAttribute |
|
a parameter name |
Since 1.12
e_vcard_attribute_remove_param_value ()
void e_vcard_attribute_remove_param_value (EVCardAttribute *attr
,const gchar *param_name
,const gchar *s
);
Removes the value s
from the parameter param_name
on the attribute attr
.
|
an EVCardAttribute |
|
a parameter name |
|
a value |
e_vcard_attribute_param_new ()
EVCardAttributeParam * e_vcard_attribute_param_new (const gchar *name
);
Creates a new parameter named name
.
|
the name of the new parameter |
Returns : |
A new EVCardAttributeParam. |
e_vcard_attribute_param_free ()
void e_vcard_attribute_param_free (EVCardAttributeParam *param
);
Frees param
and its values.
|
an EVCardAttributeParam |
e_vcard_attribute_param_copy ()
EVCardAttributeParam * e_vcard_attribute_param_copy (EVCardAttributeParam *param
);
Makes a copy of param
.
|
an EVCardAttributeParam |
Returns : |
a new EVCardAttributeParam identical to param . |
e_vcard_attribute_add_param ()
void e_vcard_attribute_add_param (EVCardAttribute *attr
,EVCardAttributeParam *param
);
Adds param
to attr
's list of parameters.
It tests for duplicities, only new parameters are added,
when a new parameter already exists in attr, then those
values are merged, also without creating duplicities.
When we will not add whole param, then it's freed here.
|
an EVCardAttribute |
|
an EVCardAttributeParam to add. [transfer full] |
e_vcard_attribute_add_param_with_value ()
void e_vcard_attribute_add_param_with_value (EVCardAttribute *attr
,EVCardAttributeParam *param
,const gchar *value
);
Adds value
to param
, then adds param
to attr
.
|
an EVCardAttribute |
|
an EVCardAttributeParam. [transfer full] |
|
a string value |
e_vcard_attribute_add_param_with_values ()
void e_vcard_attribute_add_param_with_values (EVCardAttribute *attr
,EVCardAttributeParam *param
,...
);
Adds the list of values to param
, then adds param
to attr
.
|
an EVCardAttribute |
|
an EVCardAttributeParam. [transfer full] |
|
a NULL -terminated list of strings |
e_vcard_attribute_param_add_value ()
void e_vcard_attribute_param_add_value (EVCardAttributeParam *param
,const gchar *value
);
Adds value
to param
's list of values.
|
an EVCardAttributeParam |
|
a string value to add |
e_vcard_attribute_param_add_values ()
void e_vcard_attribute_param_add_values (EVCardAttributeParam *param
,...
);
Adds a list of values to param
.
|
an EVCardAttributeParam |
|
a NULL -terminated list of strings |
e_vcard_attribute_param_remove_values ()
void e_vcard_attribute_param_remove_values
(EVCardAttributeParam *param
);
Removes and frees all values from param
.
|
an EVCardAttributeParam |
e_vcard_get_attribute ()
EVCardAttribute * e_vcard_get_attribute (EVCard *evc
,const gchar *name
);
Get the attribute name
from evc
. The EVCardAttribute is owned by
evcard
and should not be freed. If the attribute does not exist, NULL
is
returned.
|
an EVCard |
|
the name of the attribute to get |
Returns : |
An EVCardAttribute if found, or NULL . [transfer none][allow-none]
|
e_vcard_get_attribute_if_parsed ()
EVCardAttribute * e_vcard_get_attribute_if_parsed (EVCard *evc
,const gchar *name
);
Similar to e_vcard_get_attribute()
but this method will not attempt to
parse the vcard if not already parsed.
|
an EVCard |
|
the name of the attribute to get |
Returns : |
An EVCardAttribute if found, or NULL . [transfer none][allow-none]
|
Since 3.4
e_vcard_get_attributes ()
GList * e_vcard_get_attributes (EVCard *evcard
);
Gets the list of attributes from evcard
. The list and its
contents are owned by evcard
, and must not be freed.
|
an EVCard |
Returns : |
A list of attributes of type EVCardAttribute. [transfer none][element-type EVCardAttribute] |
e_vcard_attribute_get_group ()
const gchar * e_vcard_attribute_get_group (EVCardAttribute *attr
);
Gets the group name of attr
.
|
an EVCardAttribute |
Returns : |
The attribute's group name, or NULL . [allow-none]
|
e_vcard_attribute_get_name ()
const gchar * e_vcard_attribute_get_name (EVCardAttribute *attr
);
Gets the name of attr
.
|
an EVCardAttribute |
Returns : |
The attribute's name. |
e_vcard_attribute_get_values ()
GList * e_vcard_attribute_get_values (EVCardAttribute *attr
);
Gets the list of values from attr
. The list and its
contents are owned by attr
, and must not be freed.
|
an EVCardAttribute |
Returns : |
A list of string values. They
will all be non-NULL , but may be empty strings. The list itself may be
empty. [transfer none][element-type utf8]
|
e_vcard_attribute_get_values_decoded ()
GList * e_vcard_attribute_get_values_decoded
(EVCardAttribute *attr
);
Gets the list of values from attr
, decoding them if
necessary. The list and its contents are owned by attr
,
and must not be freed.
|
an EVCardAttribute |
Returns : |
A list of values of type GString. [transfer none][element-type GString] |
e_vcard_attribute_is_single_valued ()
gboolean e_vcard_attribute_is_single_valued (EVCardAttribute *attr
);
Checks if attr
has a single value.
|
an EVCardAttribute |
Returns : |
TRUE if the attribute has exactly one value, FALSE otherwise. |
e_vcard_attribute_get_value ()
gchar * e_vcard_attribute_get_value (EVCardAttribute *attr
);
Gets the value of a single-valued EVCardAttribute, attr
.
|
an EVCardAttribute |
Returns : |
A newly allocated string representing the value, or NULL if the attribute has no value. [allow-none]
|
e_vcard_attribute_get_value_decoded ()
GString * e_vcard_attribute_get_value_decoded (EVCardAttribute *attr
);
Gets the value of a single-valued EVCardAttribute, attr
, decoding
it if necessary.
Note: this function seems currently to be unused. Could be removed.
|
an EVCardAttribute |
Returns : |
A newly allocated GString representing the value, or NULL if the attribute has no value. [allow-none]
|
e_vcard_attribute_get_params ()
GList * e_vcard_attribute_get_params (EVCardAttribute *attr
);
Gets the list of parameters from attr
. The list and its
contents are owned by attr
, and must not be freed.
|
an EVCardAttribute |
Returns : |
A list of elements of type EVCardAttributeParam. [transfer none][element-type EVCardAttributeParam] |
e_vcard_attribute_get_param ()
GList * e_vcard_attribute_get_param (EVCardAttribute *attr
,const gchar *name
);
Gets the list of values for the paramater name
from attr
. The list and its
contents are owned by attr
, and must not be freed.
|
an EVCardAttribute |
|
a parameter name |
Returns : |
A list of string elements representing the parameter's values. [transfer none][element-type utf8] |
e_vcard_attribute_param_get_name ()
const gchar * e_vcard_attribute_param_get_name (EVCardAttributeParam *param
);
Gets the name of param
.
|
an EVCardAttributeParam |
Returns : |
The name of the parameter. |
e_vcard_attribute_param_get_values ()
GList * e_vcard_attribute_param_get_values (EVCardAttributeParam *param
);
Gets the list of values from param
. The list and its
contents are owned by param
, and must not be freed.
|
an EVCardAttributeParam |
Returns : |
A list of string elements representing the parameter's values. [transfer none][element-type utf8] |
e_vcard_attribute_has_type ()
gboolean e_vcard_attribute_has_type (EVCardAttribute *attr
,const gchar *typestr
);
Checks if attr
has an EVCardAttributeParam of the specified type.
|
an EVCardAttribute |
|
a string representing the type |
Returns : |
TRUE if such a parameter exists, FALSE otherwise. |
e_vcard_escape_string ()
gchar * e_vcard_escape_string (const gchar *s
);
Escapes a string according to RFC2426, section 5.
|
the string to escape |
Returns : |
A newly allocated, escaped string. |
e_vcard_unescape_string ()
gchar * e_vcard_unescape_string (const gchar *s
);
Unescapes a string according to RFC2426, section 5.
|
the string to unescape |
Returns : |
A newly allocated, unescaped string. |