mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-04 00:59:32 +02:00
serialize stream to json
This commit is contained in:
parent
7bec5b8744
commit
95e4a98fef
11 changed files with 172 additions and 113 deletions
|
@ -66,34 +66,6 @@ struct Volume
|
|||
};
|
||||
|
||||
|
||||
struct Stream
|
||||
{
|
||||
//TODO
|
||||
Stream() : id("TODO_ID"), name("TODO_NAME"), uri("file:///tmp/snapfifo")
|
||||
{
|
||||
}
|
||||
|
||||
void fromJson(const json& j)
|
||||
{
|
||||
id = jGet<std::string>(j, "id", "TODO_ID");
|
||||
name = jGet<std::string>(j, "name", "TODO_NAME");
|
||||
uri = jGet<std::string>(j, "uri", "file:///tmp/snapfifo");
|
||||
}
|
||||
|
||||
json toJson()
|
||||
{
|
||||
json j;
|
||||
j["id"] = id;
|
||||
j["name"] = name;
|
||||
j["uri"] = uri;
|
||||
return j;
|
||||
}
|
||||
|
||||
std::string id;
|
||||
std::string name;
|
||||
std::string uri;
|
||||
};
|
||||
|
||||
|
||||
struct ClientInfo
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue