
* Lightly reworked `NetworkManager` * Added new modules to handle various connection types. * TCP * WebSocket * Added general string splitter alias based on Qt version. * Replaced `lobby_constructed` and `courtroom_constructed` * Refactored and partially reimplemented the following classes: * `AOBlipPlayer` * `AOEmotePreview` * `AOMusicPlayer` * `AOSfxPlayer` * `AOTextArea`
29 lines
530 B
C++
29 lines
530 B
C++
#pragma once
|
|
|
|
#include "aopacket.h"
|
|
#include "datatypes.h"
|
|
|
|
#include <QObject>
|
|
|
|
class NetConnection : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit NetConnection(QObject *parent = nullptr);
|
|
|
|
virtual bool isConnected() = 0;
|
|
|
|
virtual void connectToServer(ServerInfo &server) = 0;
|
|
virtual void disconnectFromServer() = 0;
|
|
|
|
virtual void sendPacket(AOPacket packet) = 0;
|
|
|
|
Q_SIGNALS:
|
|
void connectedToServer();
|
|
void disconnectedFromServer();
|
|
void errorOccurred(QString error);
|
|
|
|
void receivedPacket(AOPacket packet);
|
|
};
|