mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
ea796160af
- Added CodeDocs config file for customization - Fixing LGTM alerts - LGTM bug fixed again - added token option to hyperion-remote - fix DBManager::getDB() - next bugfix - correct broken signal from SettingManager to Hyperion - Token list is created after the schema is fetched Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
53 lines
898 B
C++
53 lines
898 B
C++
#pragma once
|
|
|
|
// Qt includes
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <QJsonObject>
|
|
|
|
// util includes
|
|
#include <utils/Logger.h>
|
|
|
|
class JsonAPI;
|
|
class QTcpSocket;
|
|
|
|
///
|
|
/// The Connection object created by \a JsonServer when a new connection is established
|
|
///
|
|
class JsonClientConnection : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
///
|
|
/// Constructor
|
|
/// @param socket The Socket object for this connection
|
|
///
|
|
JsonClientConnection(QTcpSocket * socket, const bool& localConnection);
|
|
|
|
signals:
|
|
void connectionClosed();
|
|
|
|
public slots:
|
|
qint64 sendMessage(QJsonObject);
|
|
|
|
private slots:
|
|
///
|
|
/// Slot called when new data has arrived
|
|
///
|
|
void readRequest();
|
|
|
|
void disconnected();
|
|
|
|
private:
|
|
QTcpSocket* _socket;
|
|
/// new instance of JsonAPI
|
|
JsonAPI * _jsonAPI;
|
|
|
|
/// The buffer used for reading data from the socket
|
|
QByteArray _receiveBuffer;
|
|
|
|
/// The logger instance
|
|
Logger * _log;
|
|
};
|