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

Method startApps

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

Source from the content-addressed store, hash-verified

21}
22
23void ScreenshotService::startApps(const std::string& path) {
24 auto lock = mutex.asScopedLock();
25 if (!lock.lock(50 / portTICK_PERIOD_MS)) {
26 LOGGER.warn(LOG_MESSAGE_MUTEX_LOCK_FAILED);
27 return;
28 }
29
30 if (task == nullptr || task->isFinished()) {
31 task = std::make_unique<ScreenshotTask>();
32 mode = Mode::Apps;
33 task->startApps(path);
34 } else {
35 LOGGER.warn("Screenshot task already running");
36 }
37}
38
39void ScreenshotService::startTimed(const std::string& path, uint8_t delayInSeconds, uint8_t amount) {
40 auto lock = mutex.asScopedLock();

Callers 1

onStartPressedMethod · 0.45

Calls 4

asScopedLockMethod · 0.80
warnMethod · 0.80
isFinishedMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected