DatabasePlugin: add interface DatabaseListener

Allow database plugins to announce that they have been modified.
This commit is contained in:
Max Kellermann
2014-01-11 01:01:54 +01:00
parent 00adf7ff17
commit 114df1f137
13 changed files with 93 additions and 13 deletions

View File

@@ -21,11 +21,13 @@
#define MPD_INSTANCE_HXX
#include "check.h"
#include "DatabaseListener.hxx"
#include "Compiler.h"
class ClientList;
struct Partition;
struct Instance {
struct Instance final : public DatabaseListener {
ClientList *client_list;
Partition *partition;
@@ -48,6 +50,9 @@ struct Instance {
* Synchronize the player with the play queue.
*/
void SyncWithPlayer();
private:
virtual void OnDatabaseModified();
};
#endif