pianod2
multisource multiuser scriptable networked music player
Namespaces | Macros | Functions
predicate.h File Reference

Predicate handling. More...

#include <config.h>
#include <memory>
#include "fundamentals.h"
#include "filter.h"
Include dependency graph for predicate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Predicate
 Functions and types for parsing and interpreting predicates.
 

Macros

#define PREDKEY_MANNER   "manner"
 
#define PREDKEY_TYPE   "type"
 
#define PREDKEY_SEEDTYPE   "seedtype"
 
#define PREDKEY_SOURCE   "source"
 
#define PARSER_SIMPLE_LIST_PREDICATE   "simpleListPredicate"
 
#define PARSER_LIST_PREDICATE   "listPredicate"
 
#define PARSER_SEED_PREDICATE   "seedPredicate"
 
#define PARSER_SINGLE_PREDICATE   "singleItemPredicate"
 
#define PARSER_PLAYLIST_LIST   "playlistPredicate"
 
#define PARSER_SINGLE_PLAYLIST   "singlePlaylistPredicate"
 
#define KEY_PREDICATE   "predicate"
 
#define KEY_PLAYLIST   "playlist"
 
#define SIMPLE_LIST_PREDICATE   " {" KEY_PREDICATE ":" PARSER_SIMPLE_LIST_PREDICATE "} ..."
 
#define LIST_PREDICATE   " {" KEY_PREDICATE ":" PARSER_LIST_PREDICATE "} ..."
 
#define SEED_PREDICATE   " {" KEY_PREDICATE ":" PARSER_SEED_PREDICATE "} ..."
 
#define SINGLE_PREDICATE   " {" KEY_PREDICATE ":" PARSER_SINGLE_PREDICATE "}"
 
#define LIST_PLAYLIST   " {" KEY_PLAYLIST ":" PARSER_PLAYLIST_LIST "} ..."
 
#define SINGLE_PLAYLIST   " {" KEY_PLAYLIST ":" PARSER_SINGLE_PLAYLIST "}"
 

Functions

void Predicate::construct_predicate_parsers (PianodParser *parser)
 
bool Predicate::havePredicate (const Parsnip::Data &options)
 Check for presence of a predicate. More...
 
std::unique_ptr< FilterPredicate::getPredicate (const PianodConnection &conn, const Parsnip::Data &predicate, Filter::Field field)
 Return just the filter portion of a predicate, for external use. More...
 
ThingieList Predicate::getSpecifiedThings (const PianodConnection &conn, const Parsnip::Data &predicate, SearchRange search_what)
 Gather a list of assorted things specified by a predicate. More...
 
MusicThingiePredicate::getSpecifiedThing (const PianodConnection &conn, const Parsnip::Data &predicate)
 Interpret a request for an unspecified type of thing and return it. More...
 
SongList Predicate::getSpecifiedSongs (const PianodConnection &conn, const Parsnip::Data &predicate, SearchRange search_what)
 Interpret a list of songs specified by a predicate. More...
 
PianodSongPredicate::getSpecifiedSong (const PianodConnection &conn, const Parsnip::Data &predicate)
 Gather a request for a single song and return it. More...
 
PlaylistList Predicate::getSpecifiedPlaylists (const PianodConnection &conn, const Parsnip::Data &predicate)
 Interpret a list of playlists specified by a predicate. More...
 
PianodPlaylistPredicate::getSpecifiedPlaylist (const PianodConnection &conn, const Parsnip::Data &predicate)
 Gather a request for a single playlist and return it. More...
 

Detailed Description

Predicate handling.

Predicate parsing and interpretation.

Macro Definition Documentation

◆ KEY_PLAYLIST

#define KEY_PLAYLIST   "playlist"

◆ KEY_PREDICATE

#define KEY_PREDICATE   "predicate"

◆ LIST_PLAYLIST

#define LIST_PLAYLIST   " {" KEY_PLAYLIST ":" PARSER_PLAYLIST_LIST "} ..."

◆ LIST_PREDICATE

#define LIST_PREDICATE   " {" KEY_PREDICATE ":" PARSER_LIST_PREDICATE "} ..."

◆ PARSER_LIST_PREDICATE

#define PARSER_LIST_PREDICATE   "listPredicate"

◆ PARSER_PLAYLIST_LIST

#define PARSER_PLAYLIST_LIST   "playlistPredicate"

◆ PARSER_SEED_PREDICATE

#define PARSER_SEED_PREDICATE   "seedPredicate"

◆ PARSER_SIMPLE_LIST_PREDICATE

#define PARSER_SIMPLE_LIST_PREDICATE   "simpleListPredicate"

◆ PARSER_SINGLE_PLAYLIST

#define PARSER_SINGLE_PLAYLIST   "singlePlaylistPredicate"

◆ PARSER_SINGLE_PREDICATE

#define PARSER_SINGLE_PREDICATE   "singleItemPredicate"

◆ PREDKEY_MANNER

#define PREDKEY_MANNER   "manner"

◆ PREDKEY_SEEDTYPE

#define PREDKEY_SEEDTYPE   "seedtype"

◆ PREDKEY_SOURCE

#define PREDKEY_SOURCE   "source"

◆ PREDKEY_TYPE

#define PREDKEY_TYPE   "type"

◆ SEED_PREDICATE

#define SEED_PREDICATE   " {" KEY_PREDICATE ":" PARSER_SEED_PREDICATE "} ..."

◆ SIMPLE_LIST_PREDICATE

#define SIMPLE_LIST_PREDICATE   " {" KEY_PREDICATE ":" PARSER_SIMPLE_LIST_PREDICATE "} ..."

◆ SINGLE_PLAYLIST

#define SINGLE_PLAYLIST   " {" KEY_PLAYLIST ":" PARSER_SINGLE_PLAYLIST "}"

◆ SINGLE_PREDICATE

#define SINGLE_PREDICATE   " {" KEY_PREDICATE ":" PARSER_SINGLE_PREDICATE "}"