NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
tags.h
Go to the documentation of this file.
1
25
26#ifndef MUTT_EMAIL_TAGS_H
27#define MUTT_EMAIL_TAGS_H
28
29#include <stdbool.h>
30#include "mutt/lib.h"
31
32struct EmailModuleData;
33
40struct Tag
41{
42 char *name;
44 bool hidden;
45 STAILQ_ENTRY(Tag) entries;
46};
47STAILQ_HEAD(TagList, Tag);
48
49void tag_free(struct Tag **ptr);
50struct Tag *tag_new (void);
51
52void driver_tags_free (struct TagList *tl);
53void driver_tags_get (struct TagList *tl, struct Buffer *tags);
54void driver_tags_get_transformed (struct TagList *tl, struct Buffer *tags);
55void driver_tags_get_transformed_for(struct TagList *tl, const char *name, struct Buffer *tags);
56void driver_tags_get_with_hidden (struct TagList *tl, struct Buffer *tags);
57bool driver_tags_replace (struct TagList *tl, const char *tags);
58void driver_tags_add (struct TagList *tl, char *tag);
59
60void driver_tags_init (struct EmailModuleData *md);
62
63#endif /* MUTT_EMAIL_TAGS_H */
Convenience wrapper for the library headers.
#define STAILQ_HEAD(name, type)
Definition queue.h:312
String manipulation buffer.
Definition buffer.h:36
Email private Module data.
Definition module_data.h:32
LinkedList Tag Element.
Definition tags.h:41
bool hidden
Tag should be hidden.
Definition tags.h:44
char * transformed
Transformed name.
Definition tags.h:43
char * name
Tag name.
Definition tags.h:42
STAILQ_ENTRY(Tag) entries
Linked list.
bool driver_tags_replace(struct TagList *tl, const char *tags)
Replace all tags.
Definition tags.c:202
void driver_tags_add(struct TagList *tl, char *tag)
Add a tag to header.
Definition tags.c:105
struct Tag * tag_new(void)
Create a new Tag.
Definition tags.c:62
void driver_tags_init(struct EmailModuleData *md)
Initialize structures used for tags.
Definition tags.c:235
void driver_tags_get(struct TagList *tl, struct Buffer *tags)
Get tags all tags separated by space.
Definition tags.c:165
void driver_tags_get_with_hidden(struct TagList *tl, struct Buffer *tags)
Get all tags, also hidden ones, separated by space.
Definition tags.c:175
void driver_tags_cleanup(struct EmailModuleData *md)
Deinitialize structures used for tags.
Definition tags.c:248
void driver_tags_free(struct TagList *tl)
Free tags from a header.
Definition tags.c:132
void tag_free(struct Tag **ptr)
Free a Tag.
Definition tags.c:46
void driver_tags_get_transformed(struct TagList *tl, struct Buffer *tags)
Get transformed tags separated by space.
Definition tags.c:153
void driver_tags_get_transformed_for(struct TagList *tl, const char *name, struct Buffer *tags)
Get transformed tags for a tag name separated by space.
Definition tags.c:188