aboutsummaryrefslogtreecommitdiff
path: root/src/tag.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-04 18:47:42 +0100
committerMax Kellermann <max@duempel.org>2009-11-04 18:47:42 +0100
commita434c35eb46ff71e2b0441595dcc7985e1b292c2 (patch)
tree073d3e51ab3a11090afecda68d6530415908ef79 /src/tag.h
parent7af8c88e37610fe7ebb167fadc28656385705d18 (diff)
tag: added function tag_name_parse()
Convert a string into a tag_type enum.
Diffstat (limited to 'src/tag.h')
-rw-r--r--src/tag.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tag.h b/src/tag.h
index 8b1dd9b3..8cd09003 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -96,6 +96,22 @@ struct tag {
};
/**
+ * Parse the string, and convert it into a #tag_type. Returns
+ * #TAG_NUM_OF_ITEM_TYPES if the string could not be recognized.
+ */
+enum tag_type
+tag_name_parse(const char *name);
+
+/**
+ * Parse the string, and convert it into a #tag_type. Returns
+ * #TAG_NUM_OF_ITEM_TYPES if the string could not be recognized.
+ *
+ * Case does not matter.
+ */
+enum tag_type
+tag_name_parse_i(const char *name);
+
+/**
* Creates an empty #tag.
*/
struct tag *tag_new(void);