| 280 | } |
| 281 | |
| 282 | bool Bridge::stopStreaming(std::string group_identifier) |
| 283 | { |
| 284 | nlohmann::json request; |
| 285 | |
| 286 | request["stream"]["active"] = false; |
| 287 | |
| 288 | nlohmann::json answer; |
| 289 | |
| 290 | std::string uri = "/api/" + username + "/groups/" + group_identifier; |
| 291 | |
| 292 | answer = http_handler->PUTJson(uri, request, ip, port); |
| 293 | |
| 294 | if (answer[0].contains("success")) |
| 295 | { |
| 296 | std::string key = "/groups/" + group_identifier + "/stream/active"; |
| 297 | |
| 298 | if (answer[0]["success"].contains(key)) |
| 299 | { |
| 300 | if (answer[0]["success"][key] == false) |
| 301 | { |
| 302 | return true; |
| 303 | } |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | return false; |
| 308 | } |
| 309 | |
| 310 | std::string Bridge::getUsername() const |
| 311 | { |
no test coverage detected