Partition: add method GetDatabase()
This commit is contained in:
parent
6cce3d2996
commit
84e09aa8dd
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "Partition.hxx"
|
#include "Partition.hxx"
|
||||||
|
#include "Instance.hxx"
|
||||||
#include "DetachedSong.hxx"
|
#include "DetachedSong.hxx"
|
||||||
#include "output/MultipleOutputs.hxx"
|
#include "output/MultipleOutputs.hxx"
|
||||||
#include "mixer/Volume.hxx"
|
#include "mixer/Volume.hxx"
|
||||||
@ -27,6 +28,12 @@
|
|||||||
|
|
||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
|
|
||||||
|
const Database *
|
||||||
|
Partition::GetDatabase(Error &error) const
|
||||||
|
{
|
||||||
|
return instance.GetDatabase(error);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Partition::DatabaseModified(const Database &db)
|
Partition::DatabaseModified(const Database &db)
|
||||||
{
|
{
|
||||||
|
@ -176,6 +176,13 @@ struct Partition final : private PlayerListener, private MixerListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
|
/**
|
||||||
|
* Returns the global #Database instance. May return nullptr
|
||||||
|
* if this MPD configuration has no database (no
|
||||||
|
* music_directory was configured).
|
||||||
|
*/
|
||||||
|
const Database *GetDatabase(Error &error) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The database has been modified. Propagate the change to
|
* The database has been modified. Propagate the change to
|
||||||
* all subsystems.
|
* all subsystems.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user