2015-11-10 10:17:52 -05:00
|
|
|
/*
|
2013-08-25 10:33:48 -04:00
|
|
|
* Copyright 2013 (c) Anna Schumaker.
|
2015-11-10 10:17:52 -05:00
|
|
|
*
|
|
|
|
* The filter layer is used to search for a subset of
|
|
|
|
* songs based on an input string.
|
2013-08-25 10:33:48 -04:00
|
|
|
*/
|
2014-06-21 09:37:47 -04:00
|
|
|
#ifndef OCARINA_CORE_FILTER_H
|
|
|
|
#define OCARINA_CORE_FILTER_H
|
2016-04-29 10:35:32 -04:00
|
|
|
#include <glib.h>
|
2013-08-25 10:33:48 -04:00
|
|
|
|
2015-11-10 10:17:52 -05:00
|
|
|
/* Called to initialize the filter index. */
|
2015-09-29 16:25:16 -04:00
|
|
|
void filter_init();
|
2015-11-10 10:17:52 -05:00
|
|
|
|
|
|
|
/* Called to clean up the filter index. */
|
2015-09-29 16:25:16 -04:00
|
|
|
void filter_deinit();
|
|
|
|
|
2015-11-10 09:36:38 -05:00
|
|
|
/* Add the input string to the index. */
|
2016-04-29 09:03:20 -04:00
|
|
|
void filter_add(const gchar *, void *);
|
2015-11-10 09:36:38 -05:00
|
|
|
|
2016-04-29 08:51:58 -04:00
|
|
|
/* Remove the input string from the index. */
|
2016-04-29 09:03:20 -04:00
|
|
|
void filter_remove(const gchar *, void *);
|
2016-04-29 08:51:58 -04:00
|
|
|
|
2015-11-10 10:12:20 -05:00
|
|
|
/* Search for the input string in the index. */
|
2016-04-29 11:10:48 -04:00
|
|
|
GHashTable *filter_search(const gchar *);
|
2015-11-10 10:12:20 -05:00
|
|
|
|
2014-06-21 09:37:47 -04:00
|
|
|
#endif /* OCARINA_CORE_FILTER_H */
|