mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
This commit is contained in:
@@ -28,6 +28,12 @@ class HyperionIManager : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
struct PendingRequests
|
||||
{
|
||||
QObject *caller;
|
||||
int tan;
|
||||
};
|
||||
|
||||
// global instance pointer
|
||||
static HyperionIManager* getInstance() { return HIMinstance; }
|
||||
static HyperionIManager* HIMinstance;
|
||||
@@ -54,11 +60,11 @@ public slots:
|
||||
|
||||
///
|
||||
/// @brief Start a Hyperion instance
|
||||
/// @param instance Instance index
|
||||
/// @param block If true return when thread has been started
|
||||
/// @param instance Instance index
|
||||
/// @param block If true return when thread has been started
|
||||
/// @return Return true on success, false if not found in db
|
||||
///
|
||||
bool startInstance(quint8 inst, bool block = false);
|
||||
bool startInstance(quint8 inst, bool block = false, QObject *caller = nullptr, int tan = 0);
|
||||
|
||||
///
|
||||
/// @brief Stop a Hyperion instance
|
||||
@@ -110,6 +116,13 @@ signals:
|
||||
///
|
||||
void change();
|
||||
|
||||
///
|
||||
/// @brief Emits when the user has requested to start a instance
|
||||
/// @param caller The origin caller instance who requested
|
||||
/// @param tan The tan that was part of the request
|
||||
///
|
||||
void startInstanceResponse(QObject *caller, const int &tan);
|
||||
|
||||
signals:
|
||||
///////////////////////////////////////
|
||||
/// FROM HYPERIONDAEMON TO HYPERION ///
|
||||
@@ -180,4 +193,6 @@ private:
|
||||
const QString _rootPath;
|
||||
QMap<quint8, Hyperion*> _runningInstances;
|
||||
QList<quint8> _startQueue;
|
||||
/// All pending requests
|
||||
QMap<quint8, PendingRequests> _pendingRequests;
|
||||
};
|
||||
|
Reference in New Issue
Block a user