diff options
| author | Sebastien Braun | 2010-10-06 15:08:03 +0200 |
|---|---|---|
| committer | Sebastien Braun | 2010-10-06 15:08:03 +0200 |
| commit | 6afd810d1954018791456a7cebca0d275c50ed95 (patch) | |
| tree | 64d7b3e560dde3049c6c3056387c14f10066c666 /src/input/pvsPrivInputSignalHandler.h | |
| parent | Implement administratively configured user privileges (diff) | |
| download | pvs-6afd810d1954018791456a7cebca0d275c50ed95.tar.gz pvs-6afd810d1954018791456a7cebca0d275c50ed95.tar.xz pvs-6afd810d1954018791456a7cebca0d275c50ed95.zip | |
Refactor signal handling in pvsprivinputd
Only use one socketpair and delegate the actual decision of what to do
when a specific signal is received to a special object.
Diffstat (limited to 'src/input/pvsPrivInputSignalHandler.h')
| -rw-r--r-- | src/input/pvsPrivInputSignalHandler.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/input/pvsPrivInputSignalHandler.h b/src/input/pvsPrivInputSignalHandler.h new file mode 100644 index 0000000..cb75c86 --- /dev/null +++ b/src/input/pvsPrivInputSignalHandler.h @@ -0,0 +1,47 @@ +/* + # Copyright (c) 2009 - OpenSLX Project, Computer Center University of Freiburg + # + # This program is free software distributed under the GPL version 2. + # See http://openslx.org/COPYING + # + # If you have any feedback please consult http://openslx.org/feedback and + # send your suggestions, praise, or complaints to feedback@openslx.org + # + # General information about OpenSLX can be found at http://openslx.org/ + # -------------------------------------------------------------------------- + # pvsPrivInputSignalHandler.h: + # - Handle signals forwarded over a file descriptor - interface + # -------------------------------------------------------------------------- + */ + +#ifndef PVSPRIVINPUTSIGNALHANDLER_H_ +#define PVSPRIVINPUTSIGNALHANDLER_H_ + +#include <QObject> + +class PVSPrivInputSignalHandler : public QObject +{ + Q_OBJECT +public: + PVSPrivInputSignalHandler(QObject* parent = 0) + : QObject(parent) + { + } + + void allowUnauthenticatedKilling(bool value) + { + _allowUnauthenticatedKilling = value; + } + +public slots: + void signalReceived(int sigfd); + +signals: + void terminate(); + void reloadConfiguration(); + +private: + bool _allowUnauthenticatedKilling; +}; + +#endif /* PVSPRIVINPUTSIGNALHANDLER_H_ */ |
