aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.h
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-02-24 00:54:54 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-02-24 00:54:54 +0000
commit1ae3bdb7e6d5a5c4135f6046be9259d6f716498a (patch)
treeb8e70764ebecf56536c683f98ab3e13a140f60cd /src/locate.h
parentd7e20861d490cf0743f740cec3506fd3aca3d34b (diff)
downloadmpd-1ae3bdb7e6d5a5c4135f6046be9259d6f716498a.tar.gz
mpd-1ae3bdb7e6d5a5c4135f6046be9259d6f716498a.tar.xz
mpd-1ae3bdb7e6d5a5c4135f6046be9259d6f716498a.zip
Moving a bunch of the LocateTagItem code to locate.[ch] so that it can
later be used for playlist searching. git-svn-id: https://svn.musicpd.org/mpd/trunk@5419 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/locate.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/locate.h b/src/locate.h
new file mode 100644
index 000000000..c4eae687a
--- /dev/null
+++ b/src/locate.h
@@ -0,0 +1,28 @@
+#include "song.h"
+
+#define LOCATE_TAG_FILE_TYPE TAG_NUM_OF_ITEM_TYPES+10
+#define LOCATE_TAG_ANY_TYPE TAG_NUM_OF_ITEM_TYPES+20
+
+/* struct used for search, find, list queries */
+typedef struct _LocateTagItem {
+ mpd_sint8 tagType;
+ /* what we are looking for */
+ char *needle;
+} LocateTagItem;
+
+int getLocateTagItemType(char *str);
+
+/* returns NULL if not a known type */
+LocateTagItem *newLocateTagItem(char *typeString, char *needle);
+
+/* return number of items or -1 on error */
+int newLocateTagItemArrayFromArgArray(char *argArray[], int numArgs,
+ LocateTagItem ** arrayRet);
+
+void freeLocateTagItemArray(int count, LocateTagItem * array);
+
+void freeLocateTagItem(LocateTagItem * item);
+
+int strstrSearchTags(Song * song, int numItems, LocateTagItem * items);
+
+int tagItemsFoundAndMatches(Song * song, int numItems, LocateTagItem * items);