|
pianod2
multisource multiuser scriptable networked music player
|
Container for lists of user overplayed songs. More...
#include <datastore.h>


Public Member Functions | |
| OverplayedList (const std::string &ratingGroup) | |
| OverplayedList (const Parsnip::Data &json) | |
| bool | isExpired (const std::string &song_id) |
Public Member Functions inherited from UserData::Dictionary< std::string, time_t > | |
| Dictionary (const std::string &_origin, const std::string &_id) | |
| Dictionary (const Parsnip::Data &data) | |
| virtual const std::string & | origin (void) const override |
| Retrieve the origin (type of data) stored in this storage unit. More... | |
| virtual const std::string & | identity (void) const override |
| Retrieve the identity (primary identifier) of the data in this storage unit. More... | |
| void | rename (const std::string new_id) |
| bool | add (const std::string &key, const time_t &value) |
| const time_t & | get (const std::string &key, const time_t &def) const |
| virtual bool | reconstitute (const Parsnip::Data &data) override |
| Restore data from a JSON source. More... | |
| virtual Parsnip::Data | persist () const override |
| Persist data using Parsnip. More... | |
Public Member Functions inherited from UserData::DataStore | |
| virtual | ~DataStore (void) |
| bool | isSourceData (void) const |
Static Public Member Functions | |
| static OverplayedList * | retrieve (const User *user, const std::string &key) |
| Retrieve overplayed list for a user. More... | |
| static OverplayedList * | retrieve (User *user, const std::string &key) |
| Retrieve overplayed list for a user. More... | |
Static Public Member Functions inherited from UserData::DataStore | |
| static bool | isSourceData (const std::string &origin) |
Container for lists of user overplayed songs.
Each source storing overplayed ratings uses one container for each user. Values are stored in key-value pairs, with an ID specific to the item and the time the overplayed ban expires.
|
inline |
|
inline |
| bool UserData::OverplayedList::isExpired | ( | const std::string & | song_id | ) |
|
static |
Retrieve overplayed list for a user.
If the user doesn't have a list, try to create one.
| user | The user for whom to retrieve the list. |
| key | The source's type/name of the collection to retrieve. |


|
static |
Retrieve overplayed list for a user.
If the user doesn't have a list, try to create one.
| user | The user for whom to retrieve the list. |
| key | The source's type/name of the collection to retrieve. |
