mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-22 13:36:18 +02:00
Pass complete Settings struct around
This commit is contained in:
parent
964801896a
commit
c112058998
18 changed files with 584 additions and 140 deletions
|
@ -20,6 +20,7 @@
|
|||
|
||||
|
||||
// local headers
|
||||
#include "common/utils/string_utils.hpp"
|
||||
#include "image_cache.hpp"
|
||||
|
||||
// standard headers
|
||||
|
@ -45,6 +46,23 @@ struct ServerSettings
|
|||
std::string key_password{""};
|
||||
};
|
||||
|
||||
struct User
|
||||
{
|
||||
User(const std::string& user_permissions_password)
|
||||
{
|
||||
std::string perm;
|
||||
name = utils::string::split_left(user_permissions_password, ':', perm);
|
||||
perm = utils::string::split_left(perm, ':', password);
|
||||
permissions = utils::string::split(perm, ',');
|
||||
}
|
||||
|
||||
std::string name;
|
||||
std::vector<std::string> permissions;
|
||||
std::string password;
|
||||
};
|
||||
|
||||
std::vector<User> users;
|
||||
|
||||
struct Http
|
||||
{
|
||||
bool enabled{true};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue