| Top |
GMimeInternetAddressList *
g_mime_internet_address_list_new (void);
Creates a new GMimeInternetAddressList.
GMimeInternetAddressList *
g_mime_internet_address_list_clone (GMimeInternetAddressList *list);
gboolean g_mime_internet_address_list_equal (GMimeInternetAddressList *list,GMimeInternetAddressList *other);
int g_mime_internet_address_list_compare (GMimeInternetAddressList *list,GMimeInternetAddressList *other);
Compares addresses lexicographically, using length to break a tied prefix.
GMimeInternetAddressList *
g_mime_internet_address_list_get_mailboxes
(GMimeInternetAddressList *list);
Flattens nested groups in depth-first order. The result owns references to the original mailboxes, not copies, and is a snapshot of list membership.
GMimeInternetAddressList * g_mime_internet_address_list_parse (GMimeParserOptions *options,const char *str);
Construct a list of internet addresses from the given string.
This legacy, best-effort API skips malformed entries. Use
g_mime_internet_address_list_parse_full() for all-or-nothing parsing.
options |
a GMimeParserOptions or |
[nullable] |
str |
a string containing internet addresses |
GMimeInternetAddressList * g_mime_internet_address_list_parse_full (GMimeParserOptions *options,const char *str,gssize length,GError **error);
Parses the complete input without skipping malformed entries. Strict compliance requires comma separators and terminated groups. Loose modes retain address-recovery rules within individual mailboxes. Explicitly bounded input need not be NUL-terminated; embedded NUL bytes are rejected. Message header parsing instead represents raw NULs as U+FFFD in the address model without changing the stored header bytes.
void g_mime_internet_address_list_append_parse (GMimeInternetAddressList *list,GMimeParserOptions *options,const char *str);
Adds the recoverable addresses in str
to list
. A failed header-list
parse leaves list
unchanged.
list |
||
options |
a GMimeParserOptions or |
[nullable] |
str |
a string containing internet addresses |
int
g_mime_internet_address_list_length (GMimeInternetAddressList *list);
Gets the length of the list.
void
g_mime_internet_address_list_clear (GMimeInternetAddressList *list);
Clears the list of addresses.
int g_mime_internet_address_list_add (GMimeInternetAddressList *list,GMimeInternetAddress *ia);
Adds an GMimeInternetAddress to the GMimeInternetAddressList.
void g_mime_internet_address_list_insert (GMimeInternetAddressList *list,int index,GMimeInternetAddress *ia);
Inserts an GMimeInternetAddress into the GMimeInternetAddressList at the specified index.
gboolean g_mime_internet_address_list_remove (GMimeInternetAddressList *list,GMimeInternetAddress *ia);
Removes an GMimeInternetAddress from the GMimeInternetAddressList.
gboolean g_mime_internet_address_list_remove_at (GMimeInternetAddressList *list,int index);
Removes an GMimeInternetAddress from the GMimeInternetAddressList at the specified index.
gboolean g_mime_internet_address_list_contains (GMimeInternetAddressList *list,GMimeInternetAddress *ia);
Checks whether or not the specified GMimeInternetAddress is contained within the GMimeInternetAddressList.
TRUE if the specified GMimeInternetAddress is contained
within the specified GMimeInternetAddressList or FALSE otherwise.
int g_mime_internet_address_list_index_of (GMimeInternetAddressList *list,GMimeInternetAddress *ia);
Gets the index of the specified GMimeInternetAddress inside the GMimeInternetAddressList.
the index of the requested GMimeInternetAddress within the
GMimeInternetAddressList or -1 if it is not contained within the
GMimeInternetAddressList.
GMimeInternetAddress * g_mime_internet_address_list_get_address (GMimeInternetAddressList *list,int index);
Gets the GMimeInternetAddress at the specified index.
void g_mime_internet_address_list_set_address (GMimeInternetAddressList *list,int index,GMimeInternetAddress *ia);
Sets the GMimeInternetAddress at the specified index to ia
.
void g_mime_internet_address_list_prepend (GMimeInternetAddressList *list,GMimeInternetAddressList *prepend);
Inserts all of the addresses in prepend
to the beginning of list
.
void g_mime_internet_address_list_append (GMimeInternetAddressList *list,GMimeInternetAddressList *append);
Adds all of the addresses in append
to list
.
char * g_mime_internet_address_list_to_string (GMimeInternetAddressList *list,GMimeFormatOptions *options,gboolean encode);
Allocates a string buffer containing the rfc822 formatted addresses
in list
.
list |
list of internet addresses |
|
options |
a GMimeFormatOptions or |
[nullable] |
encode |
|
a string containing the list of addresses in rfc822
format or NULL if no addresses are contained in the list.
[nullable]
void g_mime_internet_address_list_encode (GMimeInternetAddressList *list,GMimeFormatOptions *options,GString *str);
Writes the rfc2047-encoded rfc822 formatted addresses in list
to
str
, folding using the configured maximum line length and newline format.
The first address token remains on the initial line. Oversized tokens and
quoted strings are not split and may exceed the configured line length.
list |
list of internet addresses |
|
options |
a GMimeFormatOptions or |
[nullable] |
str |
string to write to |
typedef struct _GMimeInternetAddressList GMimeInternetAddressList;
A collection of GMimeInternetAddress objects.