![]() | ![]() | ![]() | MIME Directory Library Reference Manual | ![]() |
---|
#include <mimedir/mimedir-vcard-email.h> enum MIMEDirVCardEMailType; MIMEDirVCardEMail; MIMEDirVCardEMail* mimedir_vcard_email_new (void); MIMEDirVCardEMail* mimedir_vcard_email_new_from_attribute (MIMEDirAttribute *attribute, GError **error); gboolean mimedir_vcard_email_set_from_attribute (MIMEDirVCardEMail *email, MIMEDirAttribute *attribute, GError **error); MIMEDirAttribute* mimedir_vcard_email_save_to_attribute (MIMEDirVCardEMail *email); gchar* mimedir_vcard_email_get_as_string (MIMEDirVCardEMail *email); gchar* mimedir_vcard_email_get_type_string (MIMEDirVCardEMail *email);
The MIMEDirVCardEMail object contains information about a particular e-mail address that can be found in vCards. It contains some special properties that relate to the type of e-mail address.
typedef enum { MIMEDIR_VCARD_EMAIL_TYPE_UNKNOWN, MIMEDIR_VCARD_EMAIL_TYPE_INTERNET, MIMEDIR_VCARD_EMAIL_TYPE_X400 } MIMEDirVCardEMailType;
Type of e-mail address.
MIMEDIR_VCARD_EMAIL_TYPE_UNKNOWN | The e-mail address type is unknown or unsupported. |
MIMEDIR_VCARD_EMAIL_TYPE_INTERNET | An Internet e-mail address. |
MIMEDIR_VCARD_EMAIL_TYPE_X400 | An X.400 address. |
typedef struct { GObject parent; MIMEDirVCardEMailPriv *priv; } MIMEDirVCardEMail;
The MIMEDirVCardEMail-struct struct contains private data only, and should be accessed using the functions below.
MIMEDirVCardEMail* mimedir_vcard_email_new (void);
Create a new MIMEDirVCardEMail object.
Returns : | the MIMEDirVCardEMail object |
MIMEDirVCardEMail* mimedir_vcard_email_new_from_attribute (MIMEDirAttribute *attribute, GError **error);
Creates a new MIMEDirVCardEMail 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 MIMEDirVCardEMail object |
gboolean mimedir_vcard_email_set_from_attribute (MIMEDirVCardEMail *email, MIMEDirAttribute *attribute, GError **error);
Initializes the email 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.
email : | 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_email_save_to_attribute (MIMEDirVCardEMail *email);
Returns a new attribute that describes the e-mail address.
email : | an e-mail object |
Returns : | a new attribute |
gchar* mimedir_vcard_email_get_as_string (MIMEDirVCardEMail *email);
Returns the email address as a human-readable string. The returned string
should be freed with g_free()
.
email : | the email object |
Returns : | the email address as human-readable string |
gchar* mimedir_vcard_email_get_type_string (MIMEDirVCardEMail *email);
Returns the type(s) of the email as a human-readable string. It
should be freed with g_free()
.
email : | the email object |
Returns : | the type as human-readable string |
<<< MIMEDirVCardAddress | MIMEDirVCardPhone >>> |