54 struct Group *g = *ptr;
86 struct Group *g = obj;
231 struct Address *a = NULL, *tmp = NULL;
322 uint16_t flags,
struct Buffer *err)
void mutt_addrlist_copy(struct AddressList *dst, const struct AddressList *src, bool prune)
Copy a list of addresses into another list.
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
void mutt_addrlist_append(struct AddressList *al, struct Address *a)
Append an Address to an AddressList.
void mutt_addrlist_remove_xrefs(const struct AddressList *a, struct AddressList *b)
Remove cross-references.
int mutt_addrlist_remove(struct AddressList *al, const char *mailbox)
Remove an Address from a list.
Representation of an email address.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
static bool empty_group(struct Group *g)
Is a Group empty?
static int group_add_regex(struct Group *g, const char *s, uint16_t flags, struct Buffer *err)
Add a Regex to a Group.
int mutt_grouplist_remove_addrlist(struct GroupList *gl, struct AddressList *al)
Remove an AddressList from a GroupList.
void mutt_grouplist_add(struct GroupList *gl, struct Group *group)
Add a Group to a GroupList.
static void group_remove(struct Group *g)
Remove a Group from the Hash Table.
static void group_add_addrlist(struct Group *g, const struct AddressList *al)
Add an Address List to a Group.
static struct HashTable * Groups
Hash Table: "group-name" -> Group.
static void group_free(struct Group **ptr)
Free an Address Group.
bool mutt_group_match(struct Group *g, const char *s)
Does a string match an entry in a Group?
int mutt_grouplist_add_regex(struct GroupList *gl, const char *s, uint16_t flags, struct Buffer *err)
Add matching Addresses to a GroupList.
static struct Group * group_new(const char *pat)
Create a new Address Group.
static int group_remove_regex(struct Group *g, const char *s)
Remove a Regex from a Group.
struct Group * mutt_pattern_group(const char *pat)
Match a pattern to a Group.
int mutt_grouplist_remove_regex(struct GroupList *gl, const char *s)
Remove matching addresses from a GroupList.
void mutt_grouplist_init(void)
Initialize the GroupList singleton.
void mutt_grouplist_destroy(struct GroupList *gl)
Free a GroupList.
void mutt_grouplist_clear(struct GroupList *gl)
Clear a GroupList.
void mutt_grouplist_add_addrlist(struct GroupList *gl, struct AddressList *al)
Add Address list to a GroupList.
void mutt_grouplist_cleanup(void)
Free GroupList singleton resource.
Handling for email address groups.
static void group_hash_free(int type, void *obj, intptr_t data)
Free our hash table data - Implements hash_hdata_free_t -.
#define mutt_debug(LEVEL,...)
struct HashElem * mutt_hash_insert(struct HashTable *table, const char *strkey, void *data)
Add a new element to the Hash Table (with string keys)
void mutt_hash_delete(struct HashTable *table, const char *strkey, const void *data)
Remove an element from a Hash Table.
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
struct HashTable * mutt_hash_new(size_t num_elems, HashFlags flags)
Create a new Hash Table (with string keys)
void mutt_hash_set_destructor(struct HashTable *table, hash_hdata_free_t fn, intptr_t fn_data)
Set the destructor for a Hash Table.
void mutt_hash_free(struct HashTable **ptr)
Free a hash table.
#define MUTT_HASH_NO_FLAGS
No flags are set.
@ LL_DEBUG2
Log at debug level 2.
#define MUTT_MEM_CALLOC(n, type)
void mutt_regexlist_free(struct RegexList *rl)
Free a RegexList object.
int mutt_regexlist_add(struct RegexList *rl, const char *str, uint16_t flags, struct Buffer *err)
Compile a regex string and add it to a list.
int mutt_regexlist_remove(struct RegexList *rl, const char *str)
Remove a Regex from a list.
bool mutt_regexlist_match(struct RegexList *rl, const char *str)
Does a string match any Regex in the list?
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FOREACH_SAFE(var, head, field, tvar)
#define STAILQ_INIT(head)
#define STAILQ_FIRST(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_INSERT_TAIL(head, elm, field)
#define STAILQ_EMPTY(head)
#define TAILQ_REMOVE(head, elm, field)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
#define STAILQ_NEXT(elm, field)
struct Buffer * mailbox
Mailbox and host address.
String manipulation buffer.
An element in a GroupList.
struct Group * group
Address Group.
A set of email addresses.
char * name
Name of Group.
struct AddressList al
List of Addresses.
struct RegexList rs
Group Regex patterns.