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

#include <pandora.h>

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

Public Member Functions

Sourcepandora ()
 
virtual MusicThingiereconstruct (MusicThingie::Type type, const Parsnip::Data &data) override
 Reconstructs a cached record. More...
 
 PersistentPool (Media::Source *const src)
 Initialize the cache/pool. More...
 
 PersistentPool (Media::Source *const src, const ThingiePoolParameters &params)
 Initialize the cache/pool. More...
 
- Public Member Functions inherited from PersistentPool
 PersistentPool (Media::Source *const src)
 Initialize the cache/pool. More...
 
 PersistentPool (Media::Source *const src, const ThingiePoolParameters &params)
 Initialize the cache/pool. More...
 
void markDirty ()
 Mark data for persistence. More...
 
bool isDirty () const
 Check if the pool's data has been modified. More...
 
void clearDirty () const
 Reset the pool-modified flag. More...
 
bool writeIsDue () const
 Check if the pool is due to be persisted. More...
 
Parsnip::Data persist () const
 Assemble the contents of the pool for serialization. More...
 
void restore (const Parsnip::Data &data)
 Restore cache contents from serialized data. More...
 
void add (MusicThingie *thing)
 
void add (const SongList &songs)
 
void add (const ThingieList &things)
 
- Public Member Functions inherited from ThingiePool
 ThingiePool ()
 Initialize a thingie storage cache/pool. More...
 
 ThingiePool (const ThingiePoolParameters &params)
 Initialize a thingie storage cache/pool. More...
 
void setParameters (const ThingiePoolParameters &params)
 Update the cache's retention parameters. More...
 
void add (MusicThingie *thing, bool update=false)
 Add (or update) an item to the cache. More...
 
void add (const SongList &songs)
 Add several things to the cache. More...
 
void add (const ThingieList &things)
 Add several things to the cache. More...
 
void update (MusicThingie *thing)
 
void update (const SongList &songs)
 Add or update several things to the cache. More...
 
void update (const ThingieList &things)
 Add or update several things to the cache. More...
 
void erase (MusicThingie *thing)
 Remove a thing from the cache. More...
 
MusicThingieget (const std::string &id)
 Get an item from the cache. More...
 
ThingieList get (const Filter &filter)
 Get matching items from the cache. More...
 
void periodic (void)
 Periodically pare down the cache. More...
 

Additional Inherited Members

- Protected Attributes inherited from PersistentPool
Media::Source *const source { nullptr }
 The source to which records will belong. More...
 
time_t write_time { 0 }
 The time at which cached data should be saved. More...
 

Member Function Documentation

◆ pandora()

Source* Pandora::Library::pandora ( )
inline
Here is the caller graph for this function:

◆ PersistentPool() [1/2]

PersistentPool::PersistentPool

Initialize the cache/pool.

◆ PersistentPool() [2/2]

PersistentPool::PersistentPool

Initialize the cache/pool.

Parameters
srcThe source to which records will belong.
paramsParameters describing the cache's retention and purge behavior.

◆ reconstruct()

MusicThingie * Pandora::Library::reconstruct ( MusicThingie::Type  type,
const Parsnip::Data data 
)
overridevirtual

Reconstructs a cached record.

Parameters
typeThe record's type() value.
dataThe persisted record data.
Exceptions
<tt>Parsnip::Exception</tt>if data is not in expected format, or invalid_argument If type is not supported.

Implements PersistentPool.

Here is the call graph for this function:

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