mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-24 22:46:14 +02:00
added Volume struct
This commit is contained in:
parent
e5698d8ab1
commit
7ebefd85a4
2 changed files with 38 additions and 6 deletions
|
@ -44,14 +44,20 @@ void Config::test()
|
|||
}
|
||||
|
||||
|
||||
ClientInfoPtr Config::getClientInfo(const std::string& macAddress)
|
||||
ClientInfoPtr Config::getClientInfo(const std::string& macAddress, bool add)
|
||||
{
|
||||
if (macAddress.empty())
|
||||
return nullptr;
|
||||
|
||||
for (auto client: clients)
|
||||
{
|
||||
if (client->macAddress == macAddress)
|
||||
return client;
|
||||
}
|
||||
|
||||
if (!add)
|
||||
return nullptr;
|
||||
|
||||
ClientInfoPtr client = make_shared<ClientInfo>(macAddress);
|
||||
clients.push_back(client);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue