2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2014-02-17 21:47:15 +01:00
|
|
|
|
|
|
|
#ifndef MPD_DB_CONFIG_HXX
|
|
|
|
#define MPD_DB_CONFIG_HXX
|
|
|
|
|
2019-02-20 20:32:11 +01:00
|
|
|
#include "Ptr.hxx"
|
|
|
|
|
2018-07-17 23:06:17 +02:00
|
|
|
struct ConfigData;
|
2014-02-17 21:47:15 +01:00
|
|
|
class EventLoop;
|
|
|
|
class DatabaseListener;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Read database configuration settings and create a #Database
|
2016-10-28 23:00:10 +02:00
|
|
|
* instance from it, but do not open it. Returns nullptr if no
|
|
|
|
* database is configured.
|
|
|
|
*
|
|
|
|
* Throws #std::runtime_error on error.
|
2014-02-17 21:47:15 +01:00
|
|
|
*/
|
2019-02-20 20:32:11 +01:00
|
|
|
DatabasePtr
|
2018-07-17 23:06:17 +02:00
|
|
|
CreateConfiguredDatabase(const ConfigData &config,
|
|
|
|
EventLoop &main_event_loop, EventLoop &io_event_loop,
|
2017-08-24 19:45:23 +02:00
|
|
|
DatabaseListener &listener);
|
2014-02-17 21:47:15 +01:00
|
|
|
|
|
|
|
#endif
|