|
pianod2
multisource multiuser scriptable networked music player
|
Storage mechanism for user data. More...
#include <datastore.h>

Public Member Functions | |
| virtual | ~DataStore (void) |
| virtual const std::string & | origin (void) const =0 |
| Retrieve the origin (type of data) stored in this storage unit. More... | |
| virtual const std::string & | identity (void) const =0 |
| Retrieve the identity (primary identifier) of the data in this storage unit. More... | |
| virtual bool | reconstitute (const Parsnip::Data &data)=0 |
| Restore data from a JSON source. More... | |
| virtual Parsnip::Data | persist () const =0 |
| Persist data using Parsnip. More... | |
| bool | isSourceData (void) const |
Static Public Member Functions | |
| static bool | isSourceData (const std::string &origin) |
Storage mechanism for user data.
A user may have multiple containers. Each container is identified by an origin-identity pair, such as pandora-perette@deviousfish.com or localfiles-/Users/perette/Music; thus, there may be multiple data containers for different kinds of data ("origin"), each with a unique identity.
|
inlinevirtual |
|
pure virtual |
Retrieve the identity (primary identifier) of the data in this storage unit.
Implemented in UserData::Dictionary< TKey, TValue, TStorage >, UserData::Dictionary< std::string, time_t >, UserData::Dictionary< std::string, Rating, std::string >, and UserData::JSONData.

|
static |

| bool UserData::DataStore::isSourceData | ( | void | ) | const |


|
pure virtual |
Retrieve the origin (type of data) stored in this storage unit.
Implemented in UserData::Dictionary< TKey, TValue, TStorage >, UserData::Dictionary< std::string, time_t >, UserData::Dictionary< std::string, Rating, std::string >, and UserData::JSONData.

|
pure virtual |
Persist data using Parsnip.
Implemented in UserData::Dictionary< TKey, TValue, TStorage >, UserData::Dictionary< std::string, time_t >, UserData::Dictionary< std::string, Rating, std::string >, and UserData::JSONData.
|
pure virtual |
Restore data from a JSON source.
| data | Data to restore from. |
Implemented in UserData::Dictionary< TKey, TValue, TStorage >, UserData::Dictionary< std::string, time_t >, UserData::Dictionary< std::string, Rating, std::string >, and UserData::JSONData.