20 #define PREDKEY_MANNER "manner"
21 #define PREDKEY_TYPE "type"
22 #define PREDKEY_SEEDTYPE "seedtype"
23 #define PREDKEY_SOURCE "source"
25 #define PARSER_SIMPLE_LIST_PREDICATE "simpleListPredicate"
26 #define PARSER_LIST_PREDICATE "listPredicate"
27 #define PARSER_SEED_PREDICATE "seedPredicate"
28 #define PARSER_SINGLE_PREDICATE "singleItemPredicate"
29 #define PARSER_PLAYLIST_LIST "playlistPredicate"
30 #define PARSER_SINGLE_PLAYLIST "singlePlaylistPredicate"
32 #define KEY_PREDICATE "predicate"
33 #define KEY_PLAYLIST "playlist"
35 #define SIMPLE_LIST_PREDICATE " {" KEY_PREDICATE ":" PARSER_SIMPLE_LIST_PREDICATE "} ..."
36 #define LIST_PREDICATE " {" KEY_PREDICATE ":" PARSER_LIST_PREDICATE "} ..."
37 #define SEED_PREDICATE " {" KEY_PREDICATE ":" PARSER_SEED_PREDICATE "} ..."
38 #define SINGLE_PREDICATE " {" KEY_PREDICATE ":" PARSER_SINGLE_PREDICATE "}"
39 #define LIST_PLAYLIST " {" KEY_PLAYLIST ":" PARSER_PLAYLIST_LIST "} ..."
40 #define SINGLE_PLAYLIST " {" KEY_PLAYLIST ":" PARSER_SINGLE_PLAYLIST "}"
Field
Fields on which comparisons can be done by the filter.
Definition: filter.h:44
Base class for songs, albums, artists, playlists, genres, etc.
Definition: musictypes.h:77
Generic data type.
Definition: parsnip.h:81
bool contains(const std::string &word) const
Check if a key exists in a dictionary.
Definition: parsnip_types.cpp:328
Connection to a pianod client, along with context and state of that connection.
Definition: connection.h:54
Command line parser based on Parsnip, but with some help support added for pianod.
Definition: interpreter.h:48
Base class for playlists, but still a MusicThingie.
Definition: musictypes.h:416
Base class for songs, these are also MusicThingies, artists and albums.
Definition: musictypes.h:339
A container for lists of playlists.
Definition: retainedlist.h:324
A container for holding songs.
Definition: retainedlist.h:328
Base class for storing lists of thingies, which need to be reference counted accurately.
Definition: retainedlist.h:20
Essential data structures and support.
SearchRange
Definition: fundamentals.h:35
@ KNOWN
Get whatever we know about; don't perform external searches.
Functions and types for parsing and interpreting predicates.
Definition: predicate.cpp:36
ThingieList getSpecifiedThings(const PianodConnection &conn, const Parsnip::Data &predicate, SearchRange search_what)
Gather a list of assorted things specified by a predicate.
Definition: predicate.cpp:257
PlaylistList getSpecifiedPlaylists(const PianodConnection &conn, const Parsnip::Data &predicate)
Interpret a list of playlists specified by a predicate.
Definition: predicate.cpp:334
bool havePredicate(const Parsnip::Data &options)
Check for presence of a predicate.
Definition: predicate.h:46
SongList getSpecifiedSongs(const PianodConnection &conn, const Parsnip::Data &predicate, SearchRange search_what)
Interpret a list of songs specified by a predicate.
Definition: predicate.cpp:371
void construct_predicate_parsers(PianodParser *parser)
Definition: predicate.cpp:65
PianodPlaylist * getSpecifiedPlaylist(const PianodConnection &conn, const Parsnip::Data &predicate)
Gather a request for a single playlist and return it.
Definition: predicate.cpp:352
std::unique_ptr< Filter > getPredicate(const PianodConnection &conn, const Parsnip::Data &predicate, Filter::Field field)
Return just the filter portion of a predicate, for external use.
Definition: predicate.cpp:183
MusicThingie * getSpecifiedThing(const PianodConnection &conn, const Parsnip::Data &predicate)
Interpret a request for an unspecified type of thing and return it.
Definition: predicate.cpp:292
PianodSong * getSpecifiedSong(const PianodConnection &conn, const Parsnip::Data &predicate)
Gather a request for a single song and return it.
Definition: predicate.cpp:403
#define PREDKEY_MANNER
Definition: predicate.h:20