mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Introduce Event Services (#1653)
* Allow to enable/disable suspend & lock event handling * Fix Windows * Refactor event handling incl.CEC * Revert "Auxiliary commit to revert individual files from 0d9a8b8a3a4a09609a339f54c7d8a9384c561282" This reverts commit 80737d926ad151a07b2493dd1685ed502975cb2e. * Support Events for Grabbers generically * Have CECEvent to actions configurable, further clean-ups * Remove handleEvent from V4L2grabber, as grabber will be stopped on suspend * Validate that one CEC Event can only trigger one action * MacOS lock/unlock added * fast windows fix * Corrections * Fix CodeQL findings * add macos lock/unlock handler * Migration of CEC-config and have default actions * Correct target_link_libraries * Include Foundation * macOS include AppKit * Support Scheduled Events, cleanups. * Fix destructing * Fix coredump during free * Consider additional error sceanrio * Fix missing code * install desktop icons * correct bash logic --------- Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <utils/Logger.h>
|
||||
#include <utils/Components.h>
|
||||
|
||||
#include <events/EventEnum.h>
|
||||
|
||||
///
|
||||
/// @brief The Grabber class is responsible to apply image resizes (with or without ImageResampler)
|
||||
|
||||
@@ -111,6 +113,10 @@ public:
|
||||
|
||||
QString getGrabberName() const { return _grabberName; }
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void handleEvent(Event event) {}
|
||||
|
||||
protected slots:
|
||||
///
|
||||
/// @brief Set device in error state
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
#include <grabber/GrabberType.h>
|
||||
|
||||
#include <events/EventEnum.h>
|
||||
|
||||
class Grabber;
|
||||
class GlobalSignals;
|
||||
class QTimer;
|
||||
@@ -139,6 +141,8 @@ public slots:
|
||||
///
|
||||
virtual void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
|
||||
|
||||
void handleEvent(Event event);
|
||||
|
||||
signals:
|
||||
///
|
||||
/// @brief Emit the final processed image
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <utils/VideoMode.h>
|
||||
#include <utils/settings.h>
|
||||
#include <utils/Components.h>
|
||||
#include <events/EventEnum.h>
|
||||
|
||||
// qt
|
||||
#include <QMap>
|
||||
@@ -74,20 +75,10 @@ public slots:
|
||||
bool stopInstance(quint8 inst);
|
||||
|
||||
///
|
||||
/// @brief Suspend (disable) all Hyperion instances
|
||||
/// @brief Handle an Hyperion Event
|
||||
/// @param event Event to be processed
|
||||
///
|
||||
void suspend();
|
||||
|
||||
///
|
||||
/// @brief Resume (resume) all Hyperion instances
|
||||
///
|
||||
void resume();
|
||||
|
||||
///
|
||||
/// @brief Toggle the state of all Hyperion instances for an idle sceanrio (user is not interacting with the system
|
||||
/// @param isIdle, If true all instances toggle to idle, else to resume
|
||||
///
|
||||
void toggleIdle(bool isIdle);
|
||||
void handleEvent(Event event);
|
||||
|
||||
///
|
||||
/// @brief Toggle the state of all Hyperion instances
|
||||
@@ -141,10 +132,6 @@ signals:
|
||||
///
|
||||
void startInstanceResponse(QObject *caller, const int &tan);
|
||||
|
||||
void triggerSuspend(bool isSuspend);
|
||||
void triggerToggleSuspend();
|
||||
void triggerIdle(bool isIdle);
|
||||
void triggerToggleIdle();
|
||||
|
||||
signals:
|
||||
///////////////////////////////////////
|
||||
@@ -186,6 +173,18 @@ private slots:
|
||||
///
|
||||
void handleFinished();
|
||||
|
||||
///
|
||||
/// @brief Toggle the state of all Hyperion instances for a suspend sceanrio (user is not interacting with the system)
|
||||
/// @param isSuspend, If true all instances toggle to suspend, else to resume
|
||||
///
|
||||
void toggleSuspend(bool isSuspend);
|
||||
|
||||
///
|
||||
/// @brief Toggle the state of all Hyperion instances for an idle sceanrio
|
||||
/// @param isIdle, If true all instances toggle to idle, else to resume
|
||||
///
|
||||
void toggleIdle(bool isIdle);
|
||||
|
||||
private:
|
||||
friend class HyperionDaemon;
|
||||
///
|
||||
|
Reference in New Issue
Block a user