lcd4linux: add slots for more user involvement

Keeps gui stuff away from parts of /src/driver and
callbacks with messages should inform the user about possible
operations during activation or deactivation of service.
Reason: long breaks are mediating
freeze or unknown status that leave the user in the dark.
This commit is contained in:
2021-06-30 18:28:33 +02:00
parent 24d05c67b7
commit 9621bc4a98
4 changed files with 83 additions and 14 deletions

View File

@@ -8,6 +8,7 @@
Homepage: http://www.neutrino-images.de/
Copyright (C) 2016-2019 'TangoCash'
Copyright (C) 2021, Thilo Graf 'dbt'
License: GPL
@@ -32,7 +33,7 @@
#include <string>
#include <thread>
#include <sigc++/signal.h>
class CLCD4l
{
@@ -75,6 +76,16 @@ class CLCD4l
START_LCD4L = 1,
RELOAD_LCD4L = 2
};
// use signal/slot handlers
// That is helping to keep the GUI code away from code inside ./src/driver.
sigc::signal<void> OnBeforeRestart,
OnAfterRestart,
OnBeforeStart,
OnAfterStart,
OnBeforeStop,
OnAfterStop;
private:
std::thread *thrLCD4l;
static void *LCD4lProc(void *arg);