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

Method DispatchAppEvent

src/render/plugin_interface/gr_plugin_interface.cpp:359–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357 }
358
359 void GrPluginInterface::DispatchAppEvent(const std::shared_ptr<AppBaseEvent>& event) {
360 if (event->type_ == AppBaseEvent::EType::kConnectedClientCount) {
361 auto target_evt = std::dynamic_pointer_cast<MsgConnectedClientCount>(event);
362 //LOGI("connected clients count: {}", target_evt->connected_client_count_);
363 if (target_evt->connected_client_count_ <= 0) {
364 no_connected_clients_counter_++;
365 }
366 else {
367 no_connected_clients_counter_ = 0;
368 }
369 }
370 }
371
372 bool GrPluginInterface::DontHaveConnectedClientsNow() {
373 auto dont_have = no_connected_clients_counter_ > 10;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected