config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
#include <queue>
|
||||
#include <list>
|
||||
|
||||
struct config_param;
|
||||
struct ConfigBlock;
|
||||
class Error;
|
||||
class EventLoop;
|
||||
class ServerSocket;
|
||||
@@ -162,16 +162,16 @@ public:
|
||||
|
||||
using DeferredMonitor::GetEventLoop;
|
||||
|
||||
bool Init(const config_param ¶m, Error &error);
|
||||
bool Init(const ConfigBlock &block, Error &error);
|
||||
|
||||
bool Configure(const config_param ¶m, Error &error);
|
||||
bool Configure(const ConfigBlock &block, Error &error);
|
||||
|
||||
AudioOutput *InitAndConfigure(const config_param ¶m,
|
||||
AudioOutput *InitAndConfigure(const ConfigBlock &block,
|
||||
Error &error) {
|
||||
if (!Init(param, error))
|
||||
if (!Init(block, error))
|
||||
return nullptr;
|
||||
|
||||
if (!Configure(param, error))
|
||||
if (!Configure(block, error))
|
||||
return nullptr;
|
||||
|
||||
return &base;
|
||||
|
||||
Reference in New Issue
Block a user