47 struct Group *g = *ptr;
79 struct Group *g = obj;
120 struct Address *a = NULL, *tmp = NULL;
293 if (!groups || !
name)
338 struct AddressList *al)
340 if (!groups || !gl || !al)
370 if (!groups || !gl || !str)
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".
int grouplist_add_regex(struct GroupList *gl, const char *str, uint16_t flags, struct Buffer *err)
Add matching Addresses to a GroupList.
int groups_remove_addrlist(struct HashTable *groups, struct GroupList *gl, struct AddressList *al)
Remove an AddressList from a GroupList.
bool group_match(struct Group *g, const char *str)
Does a string match an entry in a Group?
void groups_remove_grouplist(struct HashTable *groups, struct GroupList *gl)
Clear a GroupList.
int groups_remove_regex(struct HashTable *groups, struct GroupList *gl, const char *str)
Remove matching addresses from a GroupList.
struct Group * groups_get_group(struct HashTable *groups, const char *name)
Get a Group by its name.
static int group_add_regex(struct Group *g, const char *str, uint16_t flags, struct Buffer *err)
Add a Regex to a Group.
static void group_add_addrlist(struct Group *g, const struct AddressList *al)
Add an Address List to a Group.
void grouplist_add_addrlist(struct GroupList *gl, struct AddressList *al)
Add Address list to a GroupList.
static void group_free(struct Group **ptr)
Free an Address Group.
static int group_remove_regex(struct Group *g, const char *str)
Remove a Regex from a Group.
static bool group_is_empty(struct Group *g)
Is a Group empty?
static struct Group * group_new(const char *name)
Create a new Address Group.
static void group_remove(struct HashTable *groups, struct Group *g)
Remove a Group from the Hash Table.
void grouplist_add_group(struct GroupList *gl, struct Group *g)
Add a Group to a GroupList.
struct HashTable * groups_new(void)
Create a HashTable for the Address Groups.
void groups_free(struct HashTable **pptr)
Free Address Groups HashTable.
void grouplist_destroy(struct GroupList *gl)
Free a GroupList.
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.