Driver based email tags. More...
#include "config.h"
#include <stddef.h>
#include <stdbool.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 | |
static char * | driver_tags_getter (struct TagList *head, bool show_hidden, bool show_transformed, const char *filter) |
Get transformed tags. | |
void | driver_tags_add (struct TagList *list, char *new_tag) |
Add a tag to header. | |
void | driver_tags_free (struct TagList *list) |
Free tags from a header. | |
char * | driver_tags_get_transformed (struct TagList *list) |
Get transformed tags. | |
char * | driver_tags_get (struct TagList *list) |
Get tags. | |
char * | driver_tags_get_with_hidden (struct TagList *list) |
Get tags with hiddens. | |
char * | driver_tags_get_transformed_for (struct TagList *head, const char *name) |
Get transformed tag for a tag name from a header. | |
bool | driver_tags_replace (struct TagList *head, 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.
|
static |
Get transformed tags.
head | List of tags |
show_hidden | Show hidden tags |
show_transformed | Show transformed tags |
filter | Match tags to this string |
ptr | String list of tags |
Return a new allocated string containing tags separated by space
Definition at line 51 of file tags.c.
void driver_tags_add | ( | struct TagList * | list, |
char * | new_tag | ||
) |
Add a tag to header.
[in] | list | List of tags |
[in] | new_tag | String representing the new tag |
Add a tag to the header tags
Definition at line 83 of file tags.c.
void driver_tags_free | ( | struct TagList * | list | ) |
Free tags from a header.
[in] | list | List of tags |
Free the whole tags structure
Definition at line 107 of file tags.c.
char * driver_tags_get_transformed | ( | struct TagList * | list | ) |
Get transformed tags.
[in] | list | List of tags |
ptr | String list of tags |
Return a new allocated string containing all tags separated by space with transformation
Definition at line 133 of file tags.c.
char * driver_tags_get | ( | struct TagList * | list | ) |
char * driver_tags_get_with_hidden | ( | struct TagList * | list | ) |
Get tags with hiddens.
[in] | list | List of tags |
ptr | String list of tags |
Return a new allocated string containing all tags separated by space even the hiddens.
Definition at line 158 of file tags.c.
char * driver_tags_get_transformed_for | ( | struct TagList * | head, |
const char * | name | ||
) |
Get transformed tag for a tag name from a header.
[in] | head | List of tags |
[in] | name | Tag to transform |
ptr | String tag |
Return a new allocated string containing all tags separated by space even the hiddens.
Definition at line 172 of file tags.c.
bool driver_tags_replace | ( | struct TagList * | head, |
const char * | tags | ||
) |
Replace all tags.
[in] | head | 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 186 of file tags.c.
void driver_tags_init | ( | void | ) |
Initialize structures used for tags.
Definition at line 218 of file tags.c.
void driver_tags_cleanup | ( | void | ) |
struct HashTable* TagTransforms = NULL |