MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / stopStreaming

Method stopStreaming

dependencies/hueplusplus-1.0.0/src/Bridge.cpp:282–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282bool 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
310std::string Bridge::getUsername() const
311{

Callers 2

connectMethod · 0.80
disconnectMethod · 0.80

Calls 2

PUTJsonMethod · 0.80
containsMethod · 0.80

Tested by

no test coverage detected