NeoMutt  2024-02-01-23-g345d7b
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
group.h
Go to the documentation of this file.
1
24#ifndef MUTT_ADDRESS_GROUP_H
25#define MUTT_ADDRESS_GROUP_H
26
27#include <stdbool.h>
28#include <stdint.h>
29#include "mutt/lib.h"
30#include "address.h"
31
32#define MUTT_GROUP 0
33#define MUTT_UNGROUP 1
34
38struct Group
39{
40 struct AddressList al;
41 struct RegexList rs;
42 char *name;
43};
44
49{
50 struct Group *group;
52};
54
55void mutt_grouplist_add (struct GroupList *gl, struct Group *group);
56void mutt_grouplist_add_addrlist (struct GroupList *gl, struct AddressList *a);
57int mutt_grouplist_add_regex (struct GroupList *gl, const char *s, uint16_t flags, struct Buffer *err);
58void mutt_grouplist_cleanup (void);
59void mutt_grouplist_clear (struct GroupList *gl);
60void mutt_grouplist_destroy (struct GroupList *gl);
61void mutt_grouplist_init (void);
62int mutt_grouplist_remove_addrlist(struct GroupList *gl, struct AddressList *a);
63int mutt_grouplist_remove_regex (struct GroupList *gl, const char *s);
64
65bool mutt_group_match (struct Group *g, const char *s);
66struct Group *mutt_pattern_group(const char *pat);
67
68#endif /* MUTT_ADDRESS_GROUP_H */
Representation of an email address.
void mutt_grouplist_add(struct GroupList *gl, struct Group *group)
Add a Group to a GroupList.
Definition: group.c:183
bool mutt_group_match(struct Group *g, const char *s)
Does a string match an entry in a Group?
Definition: group.c:371
int mutt_grouplist_add_regex(struct GroupList *gl, const char *s, uint16_t flags, struct Buffer *err)
Add matching Addresses to a GroupList.
Definition: group.c:322
int mutt_grouplist_remove_addrlist(struct GroupList *gl, struct AddressList *a)
Remove an AddressList from a GroupList.
Definition: group.c:291
struct Group * mutt_pattern_group(const char *pat)
Match a pattern to a Group.
Definition: group.c:118
void mutt_grouplist_add_addrlist(struct GroupList *gl, struct AddressList *a)
Add Address list to a GroupList.
Definition: group.c:272
int mutt_grouplist_remove_regex(struct GroupList *gl, const char *s)
Remove matching addresses from a GroupList.
Definition: group.c:347
void mutt_grouplist_init(void)
Initialize the GroupList singleton.
Definition: group.c:96
void mutt_grouplist_destroy(struct GroupList *gl)
Free a GroupList.
Definition: group.c:203
void mutt_grouplist_clear(struct GroupList *gl)
Clear a GroupList.
Definition: group.c:149
void mutt_grouplist_cleanup(void)
Free GroupList singleton resource.
Definition: group.c:108
Convenience wrapper for the library headers.
#define STAILQ_HEAD(name, type)
Definition: queue.h:312
String manipulation buffer.
Definition: buffer.h:36
An element in a GroupList.
Definition: group.h:49
STAILQ_ENTRY(GroupNode) entries
Linked list.
struct Group * group
Address Group.
Definition: group.h:50
A set of email addresses.
Definition: group.h:39
char * name
Name of Group.
Definition: group.h:42
struct AddressList al
List of Addresses.
Definition: group.h:40
struct RegexList rs
Group Regex patterns.
Definition: group.h:41