Driver based email tags. More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "tags.h"
Go to the source code of this file.
Functions | |
void | tag_free (struct Tag **ptr) |
Free a Tag. | |
struct Tag * | tag_new (void) |
Create a new Tag. | |
void | driver_tags_getter (struct TagList *tl, bool show_hidden, bool show_transformed, const char *filter, struct Buffer *tags) |
Get transformed tags separated by space. | |
void | driver_tags_add (struct TagList *tl, char *new_tag) |
Add a tag to header. | |
void | driver_tags_free (struct TagList *tl) |
Free tags from a header. | |
void | driver_tags_get_transformed (struct TagList *tl, struct Buffer *tags) |
Get transformed tags separated by space. | |
void | driver_tags_get (struct TagList *tl, struct Buffer *tags) |
Get tags all tags separated by space. | |
void | driver_tags_get_with_hidden (struct TagList *tl, struct Buffer *tags) |
Get all tags, also hidden ones, separated by space. | |
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. | |
bool | driver_tags_replace (struct TagList *tl, const char *tags) |
Replace all tags. | |
static void | tags_deleter (int type, void *obj, intptr_t data) |
Free our hash table data - Implements hash_hdata_free_t -. | |
void | driver_tags_init (void) |
Initialize structures used for tags. | |
void | driver_tags_cleanup (void) |
Deinitialize structures used for tags. | |
Variables | |
struct HashTable * | TagTransforms = NULL |
Hash Table: "inbox" -> "i" - Alternative tag names. | |
struct HashTable * | TagFormats = NULL |
Hash Table: "inbox" -> "GI" - Tag format strings. | |
Driver based email tags.
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 tags.c.
void tag_free | ( | struct Tag ** | ptr | ) |
struct Tag * tag_new | ( | void | ) |
Create a new Tag.
ptr | New Tag |
Definition at line 64 of file tags.c.
void driver_tags_getter | ( | struct TagList * | tl, |
bool | show_hidden, | ||
bool | show_transformed, | ||
const char * | filter, | ||
struct Buffer * | tags | ||
) |
Get transformed tags separated by space.
[in] | tl | List of tags |
[in] | show_hidden | Show hidden tags |
[in] | show_transformed | Show transformed tags |
[in] | filter | Match tags to this string |
[out] | tags | String list of tags |
Definition at line 77 of file tags.c.
void driver_tags_add | ( | struct TagList * | tl, |
char * | new_tag | ||
) |
Add a tag to header.
[in] | tl | List of tags |
[in] | new_tag | String representing the new tag |
Add a tag to the header tags
Definition at line 107 of file tags.c.
void driver_tags_free | ( | struct TagList * | tl | ) |
Free tags from a header.
[in] | tl | List of tags |
Free the whole tags structure
Definition at line 131 of file tags.c.
void driver_tags_get_transformed | ( | struct TagList * | tl, |
struct Buffer * | tags | ||
) |
Get transformed tags separated by space.
[in] | tl | List of tags |
[out] | tags | String list of tags |
Definition at line 152 of file tags.c.
void driver_tags_get | ( | struct TagList * | tl, |
struct Buffer * | tags | ||
) |
Get tags all tags separated by space.
[in] | tl | List of tags |
[out] | tags | String list of tags |
Definition at line 164 of file tags.c.
void driver_tags_get_with_hidden | ( | struct TagList * | tl, |
struct Buffer * | tags | ||
) |
void driver_tags_get_transformed_for | ( | struct TagList * | tl, |
const char * | name, | ||
struct Buffer * | tags | ||
) |
bool driver_tags_replace | ( | struct TagList * | tl, |
const char * | tags | ||
) |
Replace all tags.
[in] | tl | List of tags |
[in] | tags | string of all tags separated by space |
false | No changes are made |
true | Tags are updated |
Free current tags structures and replace it by new tags
Definition at line 201 of file tags.c.
void driver_tags_init | ( | void | ) |
Initialize structures used for tags.
Definition at line 233 of file tags.c.
void driver_tags_cleanup | ( | void | ) |
struct HashTable* TagTransforms = NULL |