NeoMutt  2023-03-22
Teaching an old dog new tricks
DOXYGEN
tags.h
Go to the documentation of this file.
1
23#ifndef MUTT_EMAIL_TAGS_H
24#define MUTT_EMAIL_TAGS_H
25
26#include <stdbool.h>
27#include "mutt/lib.h"
28
29extern struct HashTable *TagTransforms;
30extern struct HashTable *TagFormats;
31
38struct Tag
39{
40 char *name;
42 bool hidden;
43 STAILQ_ENTRY(Tag) entries;
44};
45STAILQ_HEAD(TagList, Tag);
46
47void driver_tags_free (struct TagList *list);
48char *driver_tags_get (struct TagList *list);
49char *driver_tags_get_transformed (struct TagList *list);
50char *driver_tags_get_transformed_for(struct TagList *list, const char *name);
51char *driver_tags_get_with_hidden (struct TagList *list);
52bool driver_tags_replace (struct TagList *list, const char *tags);
53void driver_tags_add (struct TagList *list, char *tag);
54
55void driver_tags_init(void);
56void driver_tags_cleanup(void);
57
58#endif /* MUTT_EMAIL_TAGS_H */
Convenience wrapper for the library headers.
A Hash Table.
Definition: hash.h:96
LinkedList Tag Element.
Definition: tags.h:39
bool hidden
Tag should be hidden.
Definition: tags.h:42
char * transformed
Transformed name.
Definition: tags.h:41
char * name
Tag name.
Definition: tags.h:40
STAILQ_ENTRY(Tag) entries
Linked list.
void driver_tags_cleanup(void)
Deinitialize structures used for tags.
Definition: tags.c:230
char * driver_tags_get_transformed(struct TagList *list)
Get transformed tags.
Definition: tags.c:133
char * driver_tags_get(struct TagList *list)
Get tags.
Definition: tags.c:145
STAILQ_HEAD(TagList, Tag)
void driver_tags_free(struct TagList *list)
Free tags from a header.
Definition: tags.c:107
struct HashTable * TagFormats
Hash Table of tag-formats (tag -> format string)
Definition: tags.c:39
char * driver_tags_get_with_hidden(struct TagList *list)
Get tags with hiddens.
Definition: tags.c:158
void driver_tags_init(void)
Initialize structures used for tags.
Definition: tags.c:218
bool driver_tags_replace(struct TagList *list, const char *tags)
Replace all tags.
Definition: tags.c:186
struct HashTable * TagTransforms
Lookup table of alternative tag names.
Definition: tags.c:38
void driver_tags_add(struct TagList *list, char *tag)
Add a tag to header.
Definition: tags.c:83
char * driver_tags_get_transformed_for(struct TagList *list, const char *name)
Get transformed tag for a tag name from a header.
Definition: tags.c:172