NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
tags.h
Go to the documentation of this file.
1
26#ifndef MUTT_EMAIL_TAGS_H
27#define MUTT_EMAIL_TAGS_H
28
29#include <stdbool.h>
30#include "mutt/lib.h"
31
32extern struct HashTable *TagTransforms;
33extern struct HashTable *TagFormats;
34
41struct Tag
42{
43 char *name;
45 bool hidden;
46 STAILQ_ENTRY(Tag) entries;
47};
48STAILQ_HEAD(TagList, Tag);
49
50void tag_free(struct Tag **ptr);
51struct Tag *tag_new (void);
52
53void driver_tags_free (struct TagList *tl);
54void driver_tags_get (struct TagList *tl, struct Buffer *tags);
55void driver_tags_get_transformed (struct TagList *tl, struct Buffer *tags);
56void driver_tags_get_transformed_for(struct TagList *tl, const char *name, struct Buffer *tags);
57void driver_tags_get_with_hidden (struct TagList *tl, struct Buffer *tags);
58bool driver_tags_replace (struct TagList *tl, const char *tags);
59void driver_tags_add (struct TagList *tl, char *tag);
60
61void driver_tags_init(void);
62void driver_tags_cleanup(void);
63
64#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
A Hash Table.
Definition: hash.h:97
LinkedList Tag Element.
Definition: tags.h:42
bool hidden
Tag should be hidden.
Definition: tags.h:45
char * transformed
Transformed name.
Definition: tags.h:44
char * name
Tag name.
Definition: tags.h:43
STAILQ_ENTRY(Tag) entries
Linked list.
bool driver_tags_replace(struct TagList *tl, const char *tags)
Replace all tags.
Definition: tags.c:201
void driver_tags_add(struct TagList *tl, char *tag)
Add a tag to header.
Definition: tags.c:107
void driver_tags_cleanup(void)
Deinitialize structures used for tags.
Definition: tags.c:245
struct Tag * tag_new(void)
Create a new Tag.
Definition: tags.c:64
struct HashTable * TagFormats
Hash Table: "inbox" -> "GI" - Tag format strings.
Definition: tags.c:42
void driver_tags_get(struct TagList *tl, struct Buffer *tags)
Get tags all tags separated by space.
Definition: tags.c:164
void driver_tags_init(void)
Initialize structures used for tags.
Definition: tags.c:233
void driver_tags_get_with_hidden(struct TagList *tl, struct Buffer *tags)
Get all tags, also hidden ones, separated by space.
Definition: tags.c:174
struct HashTable * TagTransforms
Hash Table: "inbox" -> "i" - Alternative tag names.
Definition: tags.c:41
void driver_tags_free(struct TagList *tl)
Free tags from a header.
Definition: tags.c:131
void tag_free(struct Tag **ptr)
Free a Tag.
Definition: tags.c:48
void driver_tags_get_transformed(struct TagList *tl, struct Buffer *tags)
Get transformed tags separated by space.
Definition: tags.c:152
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:187