aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-07 23:36:21 +0200
committerMax Kellermann <max@duempel.org>2012-08-07 23:52:11 +0200
commit3d2092ee23687aebaeafbabaf72ed7998d10206b (patch)
tree546c3e59cb95e42619a8b5ca3a433a95deceae5d /src/locate.h
parent8855efebc0488555b5a985589ee1f070c352c687 (diff)
downloadmpd-3d2092ee23687aebaeafbabaf72ed7998d10206b.tar.gz
mpd-3d2092ee23687aebaeafbabaf72ed7998d10206b.tar.xz
mpd-3d2092ee23687aebaeafbabaf72ed7998d10206b.zip
locate: make the structs opaque
Diffstat (limited to 'src/locate.h')
-rw-r--r--src/locate.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/locate.h b/src/locate.h
index 830ca219e..f6057e140 100644
--- a/src/locate.h
+++ b/src/locate.h
@@ -28,36 +28,16 @@
#define LOCATE_TAG_FILE_TYPE TAG_NUM_OF_ITEM_TYPES+10
#define LOCATE_TAG_ANY_TYPE TAG_NUM_OF_ITEM_TYPES+20
+struct locate_item_list;
struct song;
-/* struct used for search, find, list queries */
-struct locate_item {
- int8_t tag;
- /* what we are looking for */
- char *needle;
-};
-
-/**
- * An array of struct locate_item objects.
- */
-struct locate_item_list {
- /** number of items */
- unsigned length;
-
- /** this is a variable length array */
- struct locate_item items[1];
-};
-
gcc_pure
int
locate_parse_type(const char *str);
-/**
- * Allocates a new struct locate_item_list, and initializes all
- * members with zero bytes.
- */
+gcc_malloc
struct locate_item_list *
-locate_item_list_new(unsigned length);
+locate_item_list_new_single(unsigned tag, const char *needle);
/* return number of items or -1 on error */
gcc_nonnull(1)