myMPD
Internal API documentation
Loading...
Searching...
No Matches
search.h File Reference

Search implementation. More...

#include "src/lib/album.h"
#include "src/lib/fields.h"
#include "src/lib/mpdclient.h"
#include "src/lib/webradio.h"
#include <stdbool.h>
Include dependency graph for search.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  search_type { SEARCH_TYPE_SONG , SEARCH_TYPE_WEBRADIO }
 

Functions

struct t_listparse_search_expression_to_list (const char *expression, enum search_type type)
 
void free_search_expression_list (struct t_list *expr_list)
 
bool search_expression_song (const struct mpd_song *song, const struct t_list *expr_list, const struct t_mympd_mpd_tags *any_tag_types)
 
bool search_expression_album (const struct t_album *album, const struct t_list *expr_list, const struct t_mympd_mpd_tags *any_tag_types)
 
bool search_expression_webradio (const struct t_webradio_data *webradio, const struct t_list *expr_list, const struct t_webradio_tags *any_tag_types)
 

Detailed Description

Search implementation.

Enumeration Type Documentation

◆ search_type

Types of struct to search

Function Documentation

◆ free_search_expression_list()

void free_search_expression_list ( struct t_list expr_list)

Frees the search expression list

Parameters
expr_listpointer to the list

◆ parse_search_expression_to_list()

struct t_list * parse_search_expression_to_list ( const char *  expression,
enum search_type  type 
)

Public functions Parses a mpd search expression

Parameters
expressionmpd search expression
typetype of struct for the search expression
Returns
list of the expression or NULL on error

◆ search_expression_album()

bool search_expression_album ( const struct t_album album,
const struct t_list expr_list,
const struct t_mympd_mpd_tags any_tag_types 
)

Implements search expressions for albums.

Parameters
albumpointer to album struct
expr_listexpression list returned by parse_search_expression
any_tag_typestags for special "any" tag in expression
Returns
expression result

◆ search_expression_song()

bool search_expression_song ( const struct mpd_song *  song,
const struct t_list expr_list,
const struct t_mympd_mpd_tags any_tag_types 
)

Implements search expressions for mpd songs.

Parameters
songpointer to mpd song struct
expr_listexpression list returned by parse_search_expression
any_tag_typestags for special "any" tag in expression
Returns
expression result

◆ search_expression_webradio()

bool search_expression_webradio ( const struct t_webradio_data webradio,
const struct t_list expr_list,
const struct t_webradio_tags any_tag_types 
)

Implements search expressions for webradios.

Parameters
webradiopointer to webradio struct
expr_listexpression list returned by parse_search_expression
any_tag_typestags for special "any" tag in expression
Returns
expression result