MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / UpdateStream

Method UpdateStream

src/render_panel/database/stream_db_operator.cpp:58–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 }
57
58 bool StreamDBOperator::UpdateStream(std::shared_ptr<spvr::SpvrStream> stream) {
59 stream->updated_timestamp_ = (int64_t)TimeUtil::GetCurrentTimestamp();
60 using Storage = decltype(db_->GetStorageTypeValue());
61 auto storage = std::any_cast<Storage>(db_->GetDbStorage());
62 auto streams = storage.get_all<spvr::SpvrStream>(where(c(&spvr::SpvrStream::stream_id_) == stream->stream_id_));
63 if (streams.size() >= 1) {
64 storage.update(*stream);
65 }
66 return true;
67 }
68
69 bool StreamDBOperator::UpdateStreamRandomPwd(const std::string& stream_id, const std::string& random_pwd) {
70 auto opt_stream = GetStreamByStreamId(stream_id);

Callers 3

CreateLayoutMethod · 0.80
InitMethod · 0.80
RequestBindDevicesMethod · 0.80

Calls 3

GetStorageTypeValueMethod · 0.80
GetDbStorageMethod · 0.80
updateMethod · 0.80

Tested by

no test coverage detected