mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
migrate boblight to new logger and make it start/stoppable during runtime (#62)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
// Hyperion includes
|
||||
#include <hyperion/Hyperion.h>
|
||||
#include <utils/Logger.h>
|
||||
|
||||
class BoblightClientConnection;
|
||||
|
||||
@@ -32,6 +33,24 @@ public:
|
||||
/// @return the port number on which this TCP listens for incoming connections
|
||||
///
|
||||
uint16_t getPort() const;
|
||||
|
||||
/// @return true if server is active (bind to a port)
|
||||
///
|
||||
bool active() { return _isActive; };
|
||||
|
||||
public slots:
|
||||
///
|
||||
/// bind server to network
|
||||
///
|
||||
void start();
|
||||
|
||||
///
|
||||
/// close server
|
||||
///
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
void statusChanged(bool isActive);
|
||||
|
||||
private slots:
|
||||
///
|
||||
@@ -57,4 +76,12 @@ private:
|
||||
|
||||
/// hyperion priority
|
||||
const int _priority;
|
||||
|
||||
/// Logger instance
|
||||
Logger * _log;
|
||||
|
||||
/// state of connection
|
||||
bool _isActive;
|
||||
|
||||
uint16_t _port;
|
||||
};
|
||||
|
Reference in New Issue
Block a user