Defines functions and structs for email address handling. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
Go to the source code of this file.
Data Structures | |
struct | CMimeAddress_T |
Represents an email address. More... | |
Macros | |
#define | cmime_address_get_name(ca) (ca->name) |
#define | cmime_address_get_email(ca) (ca->email) |
#define | cmime_address_get_type(ca) (ca->type) |
Enumerations | |
enum | CMimeAddressType_T { CMIME_ADDRESS_TYPE_TO, CMIME_ADDRESS_TYPE_CC, CMIME_ADDRESS_TYPE_BCC, CMIME_ADDRESS_TYPE_FROM } |
Possible types of email addresses. More... | |
Functions | |
CMimeAddress_T * | cmime_address_new (void) |
Creates a new CMimeAddress_T object. More... | |
void | cmime_address_set_name (CMimeAddress_T *ca, const char *name) |
Set the display name of CMimeAdresse_T object. More... | |
void | cmime_address_set_email (CMimeAddress_T *ca, const char *email) |
Set the email address of CMimeAdress_T object. More... | |
void | cmime_address_set_type (CMimeAddress_T *ca, CMimeAddressType_T t) |
Set the address type of CMimeAdress_T object. More... | |
char * | cmime_address_to_string (CMimeAddress_T *ca) |
Allocates a string containing the contents of the CMimeAddress_T object. More... | |
CMimeAddress_T * | cmime_address_parse_string (const char *s) |
Parse given string and create CMimeAddress_T object. More... | |
void | cmime_address_free (CMimeAddress_T *ca) |
Free a CMimeAddress_T object. More... | |
Defines functions and structs for email address handling.
#define cmime_address_get_email | ( | ca | ) | (ca->email) |
#define cmime_address_get_name | ( | ca | ) | (ca->name) |
#define cmime_address_get_type | ( | ca | ) | (ca->type) |
enum CMimeAddressType_T |
void cmime_address_free | ( | CMimeAddress_T * | ca | ) |
Free a CMimeAddress_T object.
ca | CMimeAddress_T pointer |
CMimeAddress_T* cmime_address_new | ( | void | ) |
Creates a new CMimeAddress_T object.
CMimeAddress_T* cmime_address_parse_string | ( | const char * | s | ) |
Parse given string and create CMimeAddress_T object.
s | string to parse |
void cmime_address_set_email | ( | CMimeAddress_T * | ca, |
const char * | |||
) |
Set the email address of CMimeAdress_T object.
ca | CMimeAddress_T pointer |
email address |
void cmime_address_set_name | ( | CMimeAddress_T * | ca, |
const char * | name | ||
) |
Set the display name of CMimeAdresse_T object.
ca | CMimeAddress_T pointer |
name | the display name for the address |
void cmime_address_set_type | ( | CMimeAddress_T * | ca, |
CMimeAddressType_T | t | ||
) |
Set the address type of CMimeAdress_T object.
ca | CMimeAddress_T object |
t | CMimeAddressType_T type |
char* cmime_address_to_string | ( | CMimeAddress_T * | ca | ) |
Allocates a string containing the contents of the CMimeAddress_T object.
ca | CMimeAddress_T pointer |