aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-06-30 21:31:45 +0200
committerMax Kellermann <max@duempel.org>2010-06-30 21:31:45 +0200
commit9550c87327cdb0c97ca855bc5d77d28cbbb723d5 (patch)
tree6f68e282b3f67a3ef29e493af570afde77f16680 /src/tag.h
parente223e8a5b58509287098cb1deffb9655c7249a0c (diff)
downloadmpd-9550c87327cdb0c97ca855bc5d77d28cbbb723d5.tar.gz
mpd-9550c87327cdb0c97ca855bc5d77d28cbbb723d5.tar.xz
mpd-9550c87327cdb0c97ca855bc5d77d28cbbb723d5.zip
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 75a86b387..8d968c254 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -94,6 +94,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);