GMime 2.4 Reference Manual | ||||
---|---|---|---|---|
InternetAddressList; InternetAddressList* internet_address_list_new (void); int internet_address_list_length (InternetAddressList *list); void internet_address_list_clear (InternetAddressList *list); int internet_address_list_add (InternetAddressList *list, InternetAddress *ia); void internet_address_list_insert (InternetAddressList *list, int index, InternetAddress *ia); gboolean internet_address_list_remove (InternetAddressList *list, InternetAddress *ia); gboolean internet_address_list_remove_at (InternetAddressList *list, int index); gboolean internet_address_list_contains (InternetAddressList *list, InternetAddress *ia); int internet_address_list_index_of (InternetAddressList *list, InternetAddress *ia); InternetAddress* internet_address_list_get_address (InternetAddressList *list, int index); void internet_address_list_set_address (InternetAddressList *list, int index, InternetAddress *ia); void internet_address_list_prepend (InternetAddressList *list, InternetAddressList *prepend); void internet_address_list_append (InternetAddressList *list, InternetAddressList *append); char* internet_address_list_to_string (InternetAddressList *list, gboolean encode); InternetAddressList* internet_address_list_parse_string (const char *str); void internet_address_list_writer (InternetAddressList *list, GString *str);
typedef struct _InternetAddressList InternetAddressList;
A collection of InternetAddress objects.
InternetAddressList* internet_address_list_new (void);
Creates a new InternetAddressList.
Returns : |
a new InternetAddressList. |
int internet_address_list_length (InternetAddressList *list);
Gets the length of the list.
|
a InternetAddressList |
Returns : |
the number of InternetAddress objects in the list. |
void internet_address_list_clear (InternetAddressList *list);
Clears the list of addresses.
|
a InternetAddressList |
int internet_address_list_add (InternetAddressList *list, InternetAddress *ia);
Adds an InternetAddress to the InternetAddressList.
|
a InternetAddressList |
|
a InternetAddress |
Returns : |
the index of the added InternetAddress. |
void internet_address_list_insert (InternetAddressList *list, int index, InternetAddress *ia);
Inserts an InternetAddress into the InternetAddressList at the specified index.
|
a InternetAddressList |
|
index to insert at |
|
a InternetAddress |
gboolean internet_address_list_remove (InternetAddressList *list, InternetAddress *ia);
Removes an InternetAddress from the InternetAddressList.
|
a InternetAddressList |
|
a InternetAddress |
Returns : |
TRUE if the specified InternetAddress was removed or
FALSE otherwise.
|
gboolean internet_address_list_remove_at (InternetAddressList *list, int index);
Removes an InternetAddress from the InternetAddressList at the specified index.
|
a InternetAddressList |
|
index to remove |
Returns : |
TRUE if an InternetAddress was removed or FALSE
otherwise.
|
gboolean internet_address_list_contains (InternetAddressList *list, InternetAddress *ia);
Checks whether or not the specified InternetAddress is contained within the InternetAddressList.
|
a InternetAddressList |
|
a InternetAddress |
Returns : |
TRUE if the specified InternetAddress is contained
within the specified InternetAddressList or FALSE otherwise.
|
int internet_address_list_index_of (InternetAddressList *list, InternetAddress *ia);
Gets the index of the specified InternetAddress inside the InternetAddressList.
|
a InternetAddressList |
|
a InternetAddress |
Returns : |
the index of the requested InternetAddress within the
InternetAddressList or -1 if it is not contained within the
InternetAddressList.
|
InternetAddress* internet_address_list_get_address (InternetAddressList *list, int index);
Gets the InternetAddress at the specified index.
|
a InternetAddressList |
|
index of InternetAddress to get |
Returns : |
the InternetAddress at the specified index or NULL if
the index is out of range.
|
void internet_address_list_set_address (InternetAddressList *list, int index, InternetAddress *ia);
Sets the InternetAddress at the specified index to ia
.
|
a InternetAddressList |
|
index of InternetAddress to set |
|
a InternetAddress |
void internet_address_list_prepend (InternetAddressList *list, InternetAddressList *prepend);
Inserts all of the addresses in prepend
to the beginning of list
.
|
a InternetAddressList |
|
a InternetAddressList |
void internet_address_list_append (InternetAddressList *list, InternetAddressList *append);
Adds all of the addresses in append
to list
.
|
a InternetAddressList |
|
a InternetAddressList |
char* internet_address_list_to_string (InternetAddressList *list, gboolean encode);
Allocates a string buffer containing the rfc822 formatted addresses
in list
.
|
list of internet addresses |
|
TRUE if the address should be rfc2047 encoded
|
Returns : |
a string containing the list of addresses in rfc822 format
or NULL if no addresses are contained in the list.
|
InternetAddressList* internet_address_list_parse_string (const char *str);
Construct a list of internet addresses from the given string.
|
a string containing internet addresses |
Returns : |
a InternetAddressList or NULL if the input string does
not contain any addresses.
|
void internet_address_list_writer (InternetAddressList *list, GString *str);
Writes the rfc2047-encoded rfc822 formatted addresses in list
to
string
, folding appropriately.
|
list of internet addresses |
|
string to write to |