2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2019-02-05 21:56:20 +01:00
|
|
|
|
|
|
|
#ifndef MPD_TEST_CONFIG_GLUE_HXX
|
|
|
|
#define MPD_TEST_CONFIG_GLUE_HXX
|
|
|
|
|
|
|
|
#include "config/File.hxx"
|
|
|
|
#include "config/Migrate.hxx"
|
|
|
|
#include "config/Data.hxx"
|
|
|
|
#include "fs/Path.hxx"
|
|
|
|
|
|
|
|
inline ConfigData
|
|
|
|
AutoLoadConfigFile(Path path)
|
|
|
|
{
|
|
|
|
ConfigData data;
|
|
|
|
|
|
|
|
if (!path.IsNull()) {
|
|
|
|
ReadConfigFile(data, path);
|
|
|
|
Migrate(data);
|
|
|
|
}
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|