serialize stream to json

This commit is contained in:
badaix 2016-01-25 23:09:32 +01:00
parent 7bec5b8744
commit 95e4a98fef
11 changed files with 172 additions and 113 deletions

View file

@ -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
{