/**
 * rb_source_search_create_query:
 *
 * Creates a #RhythmDBQuery from the user's search text.
 *
 * @search: a #RBSourceSearch
 * @db: the #RhythmDB
 * @search_text: the search text
 * @return: #RhythmDBQuery for the source to use
 */
RhythmDBQuery *
rb_source_search_create_query (RBSourceSearch *search, RhythmDB *db, const char *search_text)
{
	RBSourceSearchClass *klass = RB_SOURCE_SEARCH_GET_CLASS (search);
	g_assert (klass->create_query);
	return klass->create_query (search, db, search_text);
}
/**
 * rb_source_search_is_subset:
 *
 * Determines whether the new search text will result in a
 * subset of entries matched by the previous search.  This is
 * used to optimise the search query.
 *
 * @search: a #RBSourceSearch
 * @current: the current search text (or NULL if the current search was done with a different
 *    search implementation and so cannot be considered)
 * @next: the new search text
 * @return: TRUE iff the new search text will match a subset of those matched by the current search.
 */
gboolean
rb_source_search_is_subset (RBSourceSearch *search, const char *current, const char *next)
{
	RBSourceSearchClass *klass = RB_SOURCE_SEARCH_GET_CLASS (search);
	return klass->is_subset (search, current, next);
}
/**
 * rb_source_search_get_description:
 * @search: a #RBSourceSearch
 *
 * Returns a description of the search suitable for displaying in a menu
 *
 * Return value: description string
 */
char *
rb_source_search_get_description (RBSourceSearch *search)
{
	RBSourceSearchClass *klass = RB_SOURCE_SEARCH_GET_CLASS (search);
	return klass->get_description (search);
}