Formats minimally release source files based on former clang-format
This commit is contained in:
387 files changed
+37323
-38074
No files matched your search
@@ -11,46 +11,52 @@
|
||||
#include <QtWebSockets/QWebSocketServer>
|
||||
#include <QtWebSockets/qwebsocketprotocol.h>
|
||||
#else
|
||||
namespace LtsWebSocket { class QWebSocketServerStub; }
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
class QWebSocketServerStub;
|
||||
}
|
||||
using QWebSocketServer = LtsWebSocket::QWebSocketServerStub;
|
||||
namespace QWebSocketProtocol { enum class CloseCode { NormalClosure = 1000 }; }
|
||||
namespace QWebSocketProtocol
|
||||
{
|
||||
enum class CloseCode
|
||||
{
|
||||
NormalClosure = 1000
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
class MessageHandler;
|
||||
class ClientConnection;
|
||||
class ReplyMessage;
|
||||
class MessageHandler;
|
||||
class ClientConnection;
|
||||
class ReplyMessage;
|
||||
|
||||
class ConnectionHandler : public QObject
|
||||
{
|
||||
class ConnectionHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ConnectionHandler(QObject* parent = nullptr);
|
||||
explicit ConnectionHandler(QObject *parent = nullptr);
|
||||
~ConnectionHandler();
|
||||
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
bool init(const QString& serviceName, unsigned short port);
|
||||
bool init(const QString &serviceName, unsigned short port);
|
||||
|
||||
void sendToAllClients(ReplyMessage* message);
|
||||
void sendToAllClients(ReplyMessage *message);
|
||||
|
||||
unsigned short webSocketPort()
|
||||
{
|
||||
return m_server->serverPort();
|
||||
}
|
||||
unsigned short webSocketPort() { return m_server->serverPort(); }
|
||||
#else
|
||||
bool init(const QString& /*serviceName*/, unsigned short /*port*/) { return false; }
|
||||
void sendToAllClients(ReplyMessage* /*message*/) {}
|
||||
bool init(const QString & /*serviceName*/, unsigned short /*port*/) { return false; }
|
||||
void sendToAllClients(ReplyMessage * /*message*/) {}
|
||||
unsigned short webSocketPort() { return 0; }
|
||||
#endif
|
||||
|
||||
signals:
|
||||
|
||||
void newTextMessageFromClient(ClientConnection* client, const QString& message);
|
||||
void newTextMessageFromClient(ClientConnection *client, const QString &message);
|
||||
|
||||
void clientDisconnected(ClientConnection* client);
|
||||
void clientDisconnected(ClientConnection *client);
|
||||
|
||||
void clientConnected(ClientConnection* client);
|
||||
void clientConnected(ClientConnection *client);
|
||||
|
||||
private slots:
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
@@ -59,12 +65,12 @@ class ConnectionHandler : public QObject
|
||||
#endif
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
NGL::INGLLogger &m_logger;
|
||||
#ifdef QT6_WEBSOCKETS_AVAILABLE
|
||||
QWebSocketServer* m_server;
|
||||
QWebSocketServer *m_server;
|
||||
#else
|
||||
void* m_server;
|
||||
void *m_server;
|
||||
#endif
|
||||
QSet<ClientConnection*> m_connections;
|
||||
};
|
||||
QSet<ClientConnection *> m_connections;
|
||||
};
|
||||
} // namespace LtsWebSocket
|
||||
Reference in new issue
Block a user