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

Class representing the Pandora quick mix station. More...

#include <pandorastation.h>

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

Public Member Functions

 QuickMixStation (Source *const src, const Parsnip::Data &message)
 
- Public Member Functions inherited from Pandora::Station
 Station (Source *const owner, const Parsnip::Data &message)
 
Stationoperator= (const Station &update)
 This is not a full-copy assignment, this is to update station details in the master when changes are received. More...
 
void forceRefreshDetails ()
 
bool seedAppliesToStation (const MusicThingie *seed) const
 Check if a seed record is applicable to the current station. More...
 
void refreshSeedsAndRatings ()
 Retrieve a station's seed information on file with the servers. More...
 
void takePossession ()
 Convert a shared Pandora station into a private one. More...
 
Source *const pandora () const
 
virtual bool includedInMix (void) const override final
 
virtual void includedInMix (bool include) override final
 
virtual bool canSeed (MusicThingie::Type seedType) const override
 Determine if a particular type of seeding is possible. More...
 
virtual bool seed (MusicThingie::Type seedType, const MusicThingie *music) const override
 Check if there is a seed of a particular type for this thingie. More...
 
virtual void seed (MusicThingie::Type seedType, MusicThingie *music, bool value) override
 Make a particular seed type for this thingie. More...
 
virtual ThingieList getSeeds (void) const override
 Get the seed list for a playlist. More...
 
virtual void rename (const std::string &newname) override
 
virtual void erase () override
 
const std::string & getToken () const
 
- 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 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)
 
- Public Attributes inherited from Pandora::Station
SkipTracker skips { 6, 3600 }
 
StationDefinitionDetails< SongRatingfeedback {MusicThingie::Type::Song}
 
StationDefinitionDetails< SongSeedsong_seeds {MusicThingie::Type::Song}
 
StationDefinitionDetails< ArtistSeedartist_seeds {MusicThingie::Type::Artist}
 
StationDefinitionDetails< GenreSeedgenre_seeds {MusicThingie::Type::Playlist}
 
- Protected Member Functions inherited from MusicThingie
virtual ~MusicThingie (void)
 

Detailed Description

Class representing the Pandora quick mix station.

Constructor & Destructor Documentation

◆ QuickMixStation()

Pandora::QuickMixStation::QuickMixStation ( Source *const  src,
const Parsnip::Data message 
)
inline
Here is the call graph for this function:

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