Began removal of platform/. The Monitor:: namespace is completely converted.
[aesalon.git] / src / gui / ActiveSessionSocket.h
blob31ee7451fe3d07adbc9dfa81c01d076968e8d4c7
1 #ifndef AESALON_GUI_ACTIVE_SESSION_SOCKET_H
2 #define AESALON_GUI_ACTIVE_SESSION_SOCKET_H
4 #include <QObject>
5 #include <QTcpSocket>
7 #include "platform/Memory.h"
8 #include "platform/Event.h"
10 namespace Aesalon {
11 namespace GUI {
13 class ActiveSessionSocket : public QObject { Q_OBJECT
14 private:
15 Platform::Memory *memory;
16 QTcpSocket *socket;
17 QString host;
18 int port;
19 public:
20 ActiveSessionSocket(QString host, int port, Platform::Memory *memory);
21 virtual ~ActiveSessionSocket();
22 public slots:
23 void handle_data();
24 void reemit_connected() { emit connected(); }
25 void reemit_disconnected() { emit disconnected(); }
26 void error_caught(QAbstractSocket::SocketError error);
27 void try_connecting();
28 signals:
29 void connected();
30 void disconnected();
31 void event_received(Platform::Event *event);
34 } // namespace GUI
35 } // namespace Aesalon
37 #endif