24#ifndef MUTT_ADDRESS_ADDRESS_H
25#define MUTT_ADDRESS_ADDRESS_H
59void mutt_addr_cat (
char *buf,
size_t buflen,
const char *value,
const char *specials);
77void mutt_addrlist_copy (
struct AddressList *dst,
const struct AddressList *src,
bool prune);
struct Address * mutt_addr_create(const char *personal, const char *mailbox)
Create and populate a new Address.
void mutt_addrlist_copy(struct AddressList *dst, const struct AddressList *src, bool prune)
Copy a list of addresses into another list.
void mutt_addrlist_qualify(struct AddressList *al, const char *host)
Expand local names in an Address list using a hostname.
bool mutt_addrlist_equal(const struct AddressList *ala, const struct AddressList *alb)
Compare two Address lists for equality.
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
size_t mutt_addrlist_write_list(const struct AddressList *al, struct ListHead *list)
Write Addresses to a List.
void mutt_addr_free(struct Address **ptr)
Free a single Address.
bool mutt_addr_valid_msgid(const char *msgid)
Is this a valid Message ID?
size_t mutt_addr_write(struct Buffer *buf, struct Address *addr, bool display)
Write a single Address to a buffer.
bool mutt_addrlist_uses_unicode(const struct AddressList *al)
Do any of a list of addresses use Unicode characters.
void mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *specials)
Copy a string and wrap it in quotes if it contains special characters.
bool mutt_addr_cmp(const struct Address *a, const struct Address *b)
Compare two e-mail addresses.
void mutt_addrlist_append(struct AddressList *al, struct Address *a)
Append an Address to an AddressList.
size_t mutt_addrlist_write_wrap(const struct AddressList *al, struct Buffer *buf, const char *header)
Write an AddressList to a buffer, perform line wrapping.
struct Address * mutt_addr_new(void)
Create a new Address.
int mutt_addrlist_to_local(struct AddressList *al)
Convert an Address list from Punycode.
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
bool mutt_addr_uses_unicode(const char *str)
Does this address use Unicode character.
int mutt_addrlist_parse2(struct AddressList *al, const char *s)
Parse a list of email addresses.
struct Address * mutt_addr_copy(const struct Address *addr)
Copy the real address.
const char AddressSpecials[]
Characters with special meaning for email addresses.
bool mutt_addr_to_local(struct Address *a)
Convert an Address from Punycode.
void mutt_addrlist_remove_xrefs(const struct AddressList *a, struct AddressList *b)
Remove cross-references.
int mutt_addrlist_count_recips(const struct AddressList *al)
Count the number of Addresses with valid recipients.
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
void mutt_addrlist_prepend(struct AddressList *al, struct Address *a)
Prepend an Address to an AddressList.
void mutt_addrlist_write_file(const struct AddressList *al, FILE *fp, const char *header)
Wrapper for mutt_write_address()
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
bool mutt_addr_to_intl(struct Address *a)
Convert an Address to Punycode.
int mutt_addrlist_remove(struct AddressList *al, const char *mailbox)
Remove an Address from a list.
bool mutt_addrlist_search(const struct AddressList *haystack, const struct Address *needle)
Search for an e-mail address in a list.
bool(* addr_predicate_t)(const struct Address *a)
const char * mutt_addr_for_display(const struct Address *a)
Convert an Address for display purposes.
void mutt_addrlist_dedupe(struct AddressList *al)
Remove duplicate addresses.
Convenience wrapper for the library headers.
#define TAILQ_HEAD(name, type)
struct Buffer * personal
Real name of address.
struct Buffer * mailbox
Mailbox and host address.
bool intl_checked
Checked for IDN?
TAILQ_ENTRY(Address) entries
Linked list.
bool is_intl
International Domain Name.
String manipulation buffer.