![]() | ![]() | ![]() | MIME Directory Library Reference Manual | ![]() |
---|
#include <mimedir/mimedir-vcard-address.h> MIMEDirVCardAddress; MIMEDirVCardAddress* mimedir_vcard_address_new (void); MIMEDirVCardAddress* mimedir_vcard_address_new_from_attribute (MIMEDirAttribute *attribute, GError **error); gboolean mimedir_vcard_address_set_from_attribute (MIMEDirVCardAddress *address, MIMEDirAttribute *attribute, GError **error); MIMEDirAttribute* mimedir_vcard_address_save_to_attribute (MIMEDirVCardAddress *address); gchar* mimedir_vcard_address_get_as_string (MIMEDirVCardAddress *address); gchar* mimedir_vcard_address_get_type_string (MIMEDirVCardAddress *address); gchar* mimedir_vcard_address_get_title (MIMEDirVCardAddress *address);
The MIMEDirVCardAddress object contains information about a particular address that can be found in vCards. It contains some special properties that relate to the type of address.
typedef struct { GObject parent; MIMEDirVCardAddressPriv *priv; } MIMEDirVCardAddress;
The MIMEDirVCardAddress-struct struct contains private data only, and should be accessed using the functions below.
MIMEDirVCardAddress* mimedir_vcard_address_new (void);
Create a new MIMEDirVCardAddress object.
Returns : | the MIMEDirVCardAddress object |
MIMEDirVCardAddress* mimedir_vcard_address_new_from_attribute (MIMEDirAttribute *attribute, GError **error);
Creates a new MIMEDirVCardAddress object, initializing it with data taken from the attribute object.
attribute : | the object to take data from |
error : | location to store the error occuring, or NULL to ignore |
Returns : | the MIMEDirVCardAddress object |
gboolean mimedir_vcard_address_set_from_attribute (MIMEDirVCardAddress *address, MIMEDirAttribute *attribute, GError **error);
Initializes the address object to data taken from the attribute object. It is save to use this function, even if the object has been initialized before. All old data will be lost in this case.
address : | the object to manipulate |
attribute : | the object to take data from |
error : | location to store the error occuring, or NULL to ignore |
Returns : | success indicator |
MIMEDirAttribute* mimedir_vcard_address_save_to_attribute (MIMEDirVCardAddress *address);
Returns a new attribute that describes the address.
address : | an address object |
Returns : | a new attribute |
gchar* mimedir_vcard_address_get_as_string (MIMEDirVCardAddress *address);
Returns the address as a human-readable string. The returned string
should be freed with g_free()
.
address : | an address object |
Returns : | the address as human-readable string |
gchar* mimedir_vcard_address_get_type_string (MIMEDirVCardAddress *address);
Returns the type(s) of the address as a human-readable string. It
should be freed with g_free()
.
address : | the address object |
Returns : | the type as human-readable string |
gchar* mimedir_vcard_address_get_title (MIMEDirVCardAddress *address);
Returns a one-line string with the most important address information.
The returned string should be freed with g_free()
.
address : | a vCard address |
Returns : | title string |
<<< MIMEDirVCard | MIMEDirVCardEMail >>> |