93fb40360d
I think this is cleaner than having an upper layer allocate the results set manually. This also lets me return NULL in the case that there were no results. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
27 lines
646 B
C
27 lines
646 B
C
/*
|
|
* Copyright 2013 (c) Anna Schumaker.
|
|
*
|
|
* The filter layer is used to search for a subset of
|
|
* songs based on an input string.
|
|
*/
|
|
#ifndef OCARINA_CORE_FILTER_H
|
|
#define OCARINA_CORE_FILTER_H
|
|
#include <glib.h>
|
|
|
|
/* Called to initialize the filter index. */
|
|
void filter_init();
|
|
|
|
/* Called to clean up the filter index. */
|
|
void filter_deinit();
|
|
|
|
/* Add the input string to the index. */
|
|
void filter_add(const gchar *, void *);
|
|
|
|
/* Remove the input string from the index. */
|
|
void filter_remove(const gchar *, void *);
|
|
|
|
/* Search for the input string in the index. */
|
|
GHashTable *filter_search(const gchar *);
|
|
|
|
#endif /* OCARINA_CORE_FILTER_H */
|