MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / remove_all

Method remove_all

OpenHD/ohd_common/src/openhd_external_device.cpp:106–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void openhd::ExternalDeviceManager::remove_all() {
107 auto console = openhd::log::create_or_get("ExternalDeviceManager");
108 console->debug("removing all devices - begin");
109 std::lock_guard<std::mutex> guard(m_ext_devices_lock);
110 for (auto& device_and_ip : m_curr_ext_devices) {
111 auto external_device = device_and_ip.second;
112 console->debug("Removing {}", external_device.to_string());
113 for (auto& cb : m_callbacks) {
114 cb(external_device, false);
115 }
116 }
117 m_curr_ext_devices.clear();
118 m_external_device_count = 0;
119 m_remove_all_called = true;
120 console->debug("removing all devices - end");
121}
122
123uint8_t openhd::ExternalDeviceManager::get_external_device_count() {
124 return m_external_device_count;

Callers 1

mainFunction · 0.80

Calls 2

debugMethod · 0.80
to_stringMethod · 0.45

Tested by

no test coverage detected