MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / stop

Method stop

Tactility/Source/service/screenshot/Screenshot.cpp:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void ScreenshotService::stop() {
65 auto lock = mutex.asScopedLock();
66 if (!lock.lock(50 / portTICK_PERIOD_MS)) {
67 LOGGER.warn(LOG_MESSAGE_MUTEX_LOCK_FAILED);
68 return;
69 }
70
71 if (task != nullptr) {
72 task = nullptr;
73 mode = Mode::None;
74 } else {
75 LOGGER.warn("Screenshot task not running");
76 }
77}
78
79Mode ScreenshotService::getMode() const {
80 auto lock = mutex.asScopedLock();

Callers 6

onStopMethod · 0.45
onStopMethod · 0.45
stopGpsDeviceMethod · 0.45
onStopMethod · 0.45
onStopMethod · 0.45
stopServerMethod · 0.45

Calls 3

asScopedLockMethod · 0.80
warnMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected