a group name
an attribute name
Prepends param
to attr'
s list of parameters. This takes ownership of
param
(and all its values).
Duplicate parameters have their values merged, so that all parameter names
in attr
are unique. Values are also merged so that uniqueness is preserved.
an #EVCardAttributeParam to add
Appends value
to param,
then prepends param
to attr
. This takes ownership
of param,
but not of value
.
This is a convenience method for e_vcard_attribute_param_add_value() and e_vcard_attribute_add_param().
an #EVCardAttributeParam
a string value
Appends value
to attr'
s list of values.
a string value
Encodes value
according to the encoding used for attr,
and appends it to
attr'
s list of values.
This should only be used if the #EVCardAttribute has a non-raw encoding (i.e. if it’s encoded in base-64 or quoted-printable encoding).
an encoded value
the length of the encoded value, in bytes
Makes a copy of attr
.
Frees an attribute, its values and its parameters.
Gets the group name of attr
.
Gets the name of attr
.
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. If no parameter with the
given name
exists, %NULL is returned.
a parameter name
Gets the list of parameters (of type #EVCardAttributeParam) from attr
. The
list and its contents are owned by attr,
and must not be freed.
Gets the value of a single-valued #EVCardAttribute, attr
.
For example, for a FN
(full name) attribute, this will
return the contact’s full name as a single string.
This will print a warning if called on an #EVCardAttribute which is not single-valued (i.e. for which e_vcard_attribute_is_single_valued() returns %FALSE). Use e_vcard_attribute_get_values() in such cases instead.
Gets the value of a single-valued #EVCardAttribute, attr,
decoding
it if necessary according to the encoding given in the vCard’s
ENCODING
attribute.
This will print a warning if called on an #EVCardAttribute which is not single-valued (i.e. for which e_vcard_attribute_is_single_valued() returns %FALSE). Use e_vcard_attribute_get_values_decoded() in such cases instead.
Gets the ordered list of values from attr
. The list and its
contents are owned by attr,
and must not be freed.
For example, for an ADR
(postal address) attribute, this will
return the components of the postal address.
This may be called on a single-valued attribute (i.e. one for which e_vcard_attribute_is_single_valued() returns %TRUE) and will return a one-element list in that case. Alternatively, use e_vcard_attribute_get_value() in such cases.
Gets the ordered list of values from attr,
decoding them if
necessary according to the encoding given in the vCard’s
ENCODING
attribute. The list and its contents are owned by
attr,
and must not be freed.
This may be called on a single-valued attribute (i.e. one for which e_vcard_attribute_is_single_valued() returns %TRUE) and will return a one-element list in that case. Alternatively, use e_vcard_attribute_get_value_decoded() in such cases.
Checks if attr
has an #EVCardAttributeParam with name %EVC_TYPE and typestr
as one of its values.
For example, for the vCard attribute: |[ TEL;TYPE=WORK,VOICE:(111) 555-1212
the following holds true:
|[
g_assert_true (e_vcard_attribute_has_type (attr, "WORK") == TRUE);
g_assert_true (e_vcard_attribute_has_type (attr, "voice") == TRUE);
g_assert_true (e_vcard_attribute_has_type (attr, "HOME") == FALSE);
Comparisons against typestr
are case-insensitive.
a string representing the type
Checks if attr
has a single value.
Removes and frees parameter param_name
from the attribute attr
. Parameter
names are guaranteed to be unique, so attr
is guaranteed to have no
parameters named param_name
after this function returns.
a parameter name
Removes the value s
from the parameter param_name
on the attribute attr
.
If s
was the only value for parameter param_name,
that parameter is removed
entirely from attr
and freed.
a parameter name
a value
Removes and frees all parameters from attr
.
This also resets the #EVCardAttribute's encoding back to raw.
Removes value s
from the value list in attr
. The value s
is not freed.
a value to remove
Removes and frees all values from attr
.
Creates a new #EVCardAttribute with the specified group and
attribute names. The attr_group
may be %NULL or the empty string if no
group is needed.
a group name
an attribute name
Creates a new #EVCardAttribute with the specified group and attribute names. The
attr_group
may be %NULL or the empty string if no group is needed.