mpd/src/db/Configured.hxx

26 lines
592 B
C++
Raw Normal View History

// 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
#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
* 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
*/
DatabasePtr
2018-07-17 23:06:17 +02:00
CreateConfiguredDatabase(const ConfigData &config,
EventLoop &main_event_loop, EventLoop &io_event_loop,
DatabaseListener &listener);
2014-02-17 21:47:15 +01:00
#endif