pianod2
multisource multiuser scriptable networked music player
Public Member Functions | List of all members
Pandora::GenreSuggestion Class Reference

A genre constructed from a suggestion. More...

#include <pandoratypes.h>

Inheritance diagram for Pandora::GenreSuggestion:
Inheritance graph
[legend]
Collaboration diagram for Pandora::GenreSuggestion:
Collaboration graph
[legend]

Public Member Functions

 GenreSuggestion (Source *const owner, const Parsnip::Data &message)
 Construct a genre suggestion from search/annotation result. More...
 
 GenreSuggestion (Source *const owner, MusicThingie::Type type, const Parsnip::Data &message)
 
- Public Member Functions inherited from PersistentMetaPlaylist
 PersistentMetaPlaylist (Media::Source *const owner, Type type, const Parsnip::Data &data)
 Reconstruct a song from our persistence format. More...
 
virtual Parsnip::Data persist () const
 Assemble the song details for serialization. More...
 
 MetaPlaylist (Media::Source *const owner, PianodPlaylist::PlaylistType type)
 
- Public Member Functions inherited from MetaPlaylist
 MetaPlaylist (Media::Source *const owner, PianodPlaylist::PlaylistType type)
 
 EncapsulatedPlaylist (Media::Source *const owner, Type type=Type::Playlist)
 
- Public Member Functions inherited from EncapsulatedPlaylist
 EncapsulatedPlaylist (Media::Source *const owner, Type type=Type::Playlist)
 
virtual Type type (void) const override
 Return the type letter for a thingie. More...
 
virtual Media::Source *const source (void) const override
 MediaSource from which this thingie originates. More...
 
virtual PlaylistType playlistType (void) const override
 Mix, everything, transient or single list. More...
 
virtual const std::string & playlistId (void) const override
 Item's playlist ID. More...
 
virtual const std::string & playlistName (void) const override
 Name of the playlist. More...
 
virtual const std::string & genre (void) const override
 Get genre of this playlist. More...
 
void playlistType (PlaylistType p)
 
void playlistId (const std::string &p)
 
void playlistId (const char *p)
 
void playlistName (const std::string &n)
 
void playlistName (const char *&n)
 
void genre (const std::string &g)
 
void genre (const char *&g)
 
- Public Member Functions inherited from PianodPlaylist
virtual const std::string id (void) const override
 Primary ID is playlist ID. More...
 
virtual const std::string id (MusicThingie::Type type) const override final
 Return the complete ID when used in a specific context. More...
 
virtual const std::string & internalId (MusicThingie::Type type) const override final
 Return the inner ID when used in a specific context. More...
 
virtual const std::string & name (void) const override final
 Return the most specific name of this, whatever type it is. More...
 
virtual Football::ThingietransmitCommon (Football::Thingie &recipient) const override final
 Typecode for playlist type. More...
 
virtual PianodConnectiontransmitPrivate (PianodConnection &recipient) const override
 Transmit the thingie's user-specific data on a connection. More...
 
class Response assembleRatings (const User *user) const
 
virtual Parsnip::Data serialize () const override final
 Assemble the thingie's data for JSON tranmission. More...
 
virtual void serializePrivate (Parsnip::Data &, const User *user) const override
 Add the thingie's user-specific data for JSON transmission. More...
 
Parsnip::Data serializeRatings (const User *user) const
 
virtual bool matches (const Filter &filter) const override final
 Check if a filter matches this item. More...
 
virtual PianodPlaylistasPlaylist () override final
 
virtual const PianodPlaylistasPlaylist () const override final
 
virtual SongList getRandomSongs (const UserList &users, Media::SelectionMethod selectionMethod)
 Choose some random songs for queueing. More...
 
virtual bool operator== (const std::string &compare) const override
 Check if the primary name of this thingie matches. More...
 
virtual bool operator== (const MusicThingie &compare) const override
 Compare a thingie's name to another of the equivalent or decendent type. More...
 
RESPONSE_CODE rate (Rating value, User *user)
 Set a user's playlist's rating. More...
 
Rating rating (const User *user) const
 Retrieve a user's playlist's rating. More...
 
float averageRating () const
 Return the average rating of a playlist, considering all ratings. More...
 
virtual bool canSeed (MusicThingie::Type seedType) const
 Determine if a particular type of seeding is possible. More...
 
virtual bool seed (MusicThingie::Type seedType, const MusicThingie *music) const
 Check if there is a seed of a particular type for this thingie. More...
 
virtual void seed (MusicThingie::Type seedType, MusicThingie *music, bool value)
 Make a particular seed type for this thingie. More...
 
virtual ThingieList getSeeds (void) const
 Get the seed list for a playlist. More...
 
virtual SongList songs () override
 Retrieve a list of requestable songs applicable to this thingie. More...
 
virtual SongList songs (const Filter &filter)
 Get songs belonging to a playlist. More...
 
virtual void updateSelector (const Filter &new_selector)
 Update a playlist's selector algorithm. More...
 
- Public Member Functions inherited from MusicThingie
 MusicThingie (void)
 When allocated, use count starts at 1 and the object is put in the release pool, justifying its existence. More...
 
bool isPrimary (void) const
 
bool isSuggestion (void) const
 
bool isSeed (void) const
 
bool isPlaylist (void) const
 
bool isSong (void) const
 
bool isAlbum (void) const
 
bool isArtist (void) const
 
bool isValidType (void) const
 
Type primaryType (void) const
 
virtual bool canQueue () const
 Indicate if specific item can be queued/requested. More...
 
virtual PianodArtistasArtist ()
 
virtual PianodAlbumasAlbum ()
 
virtual PianodSongasSong ()
 
virtual const PianodArtistasArtist () const
 
virtual const PianodAlbumasAlbum () const
 
virtual const PianodSongasSong () const
 
std::string operator() (void) const
 
void retain (void) const
 Claim an instance. More...
 
void release (void)
 Abandon an instance. More...
 
int getUseCount (void) const
 
virtual OwnershipparentOwner (void) const
 Defer the ownership to the source. More...
 
void serializeCommon (Parsnip::Data &) const
 Insert common items into the serialization dictionary. More...
 
bool operator!= (const std::string &compare)
 
bool operator!= (const MusicThingie &compare)
 
- Public Member Functions inherited from SubordinateOwnership
virtual bool isOwnedBy (const User *user) const override
 
virtual bool hasPermission (const User *user, Action action) const override
 
- Public Member Functions inherited from Ownership
bool isVisibleBy (const User *user) const
 
bool isUsableBy (const User *user) const
 
bool isDecendableBy (const User *user) const
 
bool isReadableBy (const User *user) const
 
bool isEditableBy (const User *user) const
 

Additional Inherited Members

- Public Types inherited from PianodPlaylist
enum  PlaylistType { SINGLE , MIX , EVERYTHING , TRANSIENT }
 
- Public Types inherited from MusicThingie
enum class  Type : char {
  Playlist = 'p' , Artist = 'a' , Album = 'l' , Song = 's' ,
  PlaylistSuggestion = 'e' , ArtistSuggestion = 't' , AlbumSuggestion = 'b' , SongSuggestion = 'n' ,
  PlaylistSeed = 'y' , ArtistSeed = 'd' , AlbumSeed = 'u' , SongSeed = 'g' ,
  SongRating = 'i'
}
 
- Public Types inherited from Ownership
enum class  Type {
  DISOWNED , PRIVATE , SHARED , PUBLISHED ,
  PUBLIC
}
 Access levels for an object. More...
 
enum class  Action { SEE , USE , READ , ALTER }
 Access actions for an object. More...
 
- Static Public Member Functions inherited from PianodPlaylist
static Type typetype (void)
 Typecode for playlist objects. More...
 
- Static Public Member Functions inherited from MusicThingie
static std::string TypeName (Type type)
 Get the type name of a music thingie. More...
 
static Type TypeFromName (const std::string &name)
 
static constexpr bool isPrimary (Type t)
 
static constexpr bool isSuggestion (const Type t)
 
static constexpr bool isSeed (const Type t)
 
static constexpr bool isPlaylist (const Type t)
 
static constexpr bool isSong (const Type t)
 
static constexpr bool isAlbum (const Type t)
 
static constexpr bool isArtist (const Type t)
 
static constexpr bool isValidType (const Type t)
 
static Type primaryType (const Type t)
 
- Protected Member Functions inherited from MusicThingie
virtual ~MusicThingie (void)
 

Detailed Description

A genre constructed from a suggestion.

Constructor & Destructor Documentation

◆ GenreSuggestion() [1/2]

Pandora::GenreSuggestion::GenreSuggestion ( Source *const  owner,
const Parsnip::Data message 
)

Construct a genre suggestion from search/annotation result.

Parameters
ownerThe source the genre will belong to.
messageThe annotation record for the genre.
Here is the call graph for this function:

◆ GenreSuggestion() [2/2]

Pandora::GenreSuggestion::GenreSuggestion ( Source *const  owner,
MusicThingie::Type  type,
const Parsnip::Data message 
)

The documentation for this class was generated from the following files: