2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2009-12-14 22:53:13 +01:00
|
|
|
|
2013-01-10 10:15:09 +01:00
|
|
|
#ifndef MPD_INPUT_INIT_HXX
|
|
|
|
#define MPD_INPUT_INIT_HXX
|
2009-12-14 22:53:13 +01:00
|
|
|
|
2018-07-17 21:49:27 +02:00
|
|
|
struct ConfigData;
|
2017-01-25 23:06:12 +01:00
|
|
|
class EventLoop;
|
|
|
|
|
2009-12-14 22:53:13 +01:00
|
|
|
/**
|
2015-01-31 22:17:15 +01:00
|
|
|
* Initializes this library and all #InputStream implementations.
|
2009-12-14 22:53:13 +01:00
|
|
|
*/
|
2016-09-05 12:05:54 +02:00
|
|
|
void
|
2018-07-17 21:49:27 +02:00
|
|
|
input_stream_global_init(const ConfigData &config, EventLoop &event_loop);
|
2009-12-14 22:53:13 +01:00
|
|
|
|
|
|
|
/**
|
2015-01-31 22:17:15 +01:00
|
|
|
* Deinitializes this library and all #InputStream implementations.
|
2009-12-14 22:53:13 +01:00
|
|
|
*/
|
2015-03-03 20:05:08 +01:00
|
|
|
void
|
2017-12-26 11:31:05 +01:00
|
|
|
input_stream_global_finish() noexcept;
|
2009-12-14 22:53:13 +01:00
|
|
|
|
2019-02-05 21:50:31 +01:00
|
|
|
class ScopeInputPluginsInit {
|
|
|
|
public:
|
|
|
|
ScopeInputPluginsInit(const ConfigData &config,
|
|
|
|
EventLoop &event_loop) {
|
|
|
|
input_stream_global_init(config, event_loop);
|
|
|
|
}
|
|
|
|
|
|
|
|
~ScopeInputPluginsInit() noexcept {
|
|
|
|
input_stream_global_finish();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2009-12-14 22:53:13 +01:00
|
|
|
#endif
|