Handling for email address groups. More...
Go to the source code of this file.
Data Structures | |
struct | Group |
A set of email addresses. More... | |
struct | GroupNode |
An element in a GroupList. More... | |
Macros | |
#define | MUTT_GROUP 0 |
'group' config command | |
#define | MUTT_UNGROUP 1 |
'ungroup' config command | |
Functions | |
STAILQ_HEAD (GroupList, GroupNode) | |
void | mutt_grouplist_add (struct GroupList *gl, struct Group *group) |
Add a Group to a GroupList. | |
void | mutt_grouplist_add_addrlist (struct GroupList *gl, struct AddressList *a) |
Add Address list to a GroupList. | |
int | mutt_grouplist_add_regex (struct GroupList *gl, const char *s, uint16_t flags, struct Buffer *err) |
Add matching Addresses to a GroupList. | |
void | mutt_grouplist_cleanup (void) |
Free GroupList singleton resource. | |
void | mutt_grouplist_clear (struct GroupList *gl) |
Clear a GroupList. | |
void | mutt_grouplist_destroy (struct GroupList *gl) |
Free a GroupList. | |
void | mutt_grouplist_init (void) |
Initialize the GroupList singleton. | |
int | mutt_grouplist_remove_addrlist (struct GroupList *gl, struct AddressList *a) |
Remove an AddressList from a GroupList. | |
int | mutt_grouplist_remove_regex (struct GroupList *gl, const char *s) |
Remove matching addresses from a GroupList. | |
bool | mutt_group_match (struct Group *g, const char *s) |
Does a string match an entry in a Group? | |
struct Group * | mutt_pattern_group (const char *pat) |
Match a pattern to a Group. | |
Handling for email address groups.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file group.h.
STAILQ_HEAD | ( | GroupList | , |
GroupNode | |||
) |
void mutt_grouplist_add | ( | struct GroupList * | gl, |
struct Group * | group | ||
) |
Add a Group to a GroupList.
gl | GroupList to add to |
group | Group to add |
Definition at line 182 of file group.c.
void mutt_grouplist_add_addrlist | ( | struct GroupList * | gl, |
struct AddressList * | al | ||
) |
Add Address list to a GroupList.
gl | GroupList to add to |
al | Address list to add |
Definition at line 271 of file group.c.
int mutt_grouplist_add_regex | ( | struct GroupList * | gl, |
const char * | s, | ||
uint16_t | flags, | ||
struct Buffer * | err | ||
) |
Add matching Addresses to a GroupList.
gl | GroupList to add to |
s | Address to match |
flags | Flags, e.g. REG_ICASE |
err | Buffer for error message |
0 | Success |
-1 | Error |
Definition at line 321 of file group.c.
void mutt_grouplist_cleanup | ( | void | ) |
void mutt_grouplist_clear | ( | struct GroupList * | gl | ) |
Clear a GroupList.
gl | GroupList to clear |
Definition at line 148 of file group.c.
void mutt_grouplist_destroy | ( | struct GroupList * | gl | ) |
Free a GroupList.
gl | GroupList to free |
Definition at line 202 of file group.c.
void mutt_grouplist_init | ( | void | ) |
Initialize the GroupList singleton.
This is called once from init.c when initializing the global structures.
Definition at line 95 of file group.c.
int mutt_grouplist_remove_addrlist | ( | struct GroupList * | gl, |
struct AddressList * | al | ||
) |
Remove an AddressList from a GroupList.
gl | GroupList to remove from |
al | AddressList to remove |
0 | Success |
-1 | Error |
Definition at line 290 of file group.c.
int mutt_grouplist_remove_regex | ( | struct GroupList * | gl, |
const char * | s | ||
) |
Remove matching addresses from a GroupList.
gl | GroupList to remove from |
s | Address to match |
0 | Success |
-1 | Error |
Definition at line 346 of file group.c.
bool mutt_group_match | ( | struct Group * | g, |
const char * | s | ||
) |
Does a string match an entry in a Group?
g | Group to match against |
s | String to match |
true | There's a match |
Definition at line 370 of file group.c.
struct Group * mutt_pattern_group | ( | const char * | pat | ) |
Match a pattern to a Group.
pat | Pattern to match |
Definition at line 117 of file group.c.