repoindex/lib/network/server.h

42 lines
634 B
C
Raw Normal View History

2015-08-10 22:46:01 +02:00
#ifndef REPOINDEX_SERVER_H
#define REPOINDEX_SERVER_H
#include <QObject>
2017-01-22 20:47:14 +01:00
QT_FORWARD_DECLARE_CLASS(QWebSocketServer)
2015-08-10 22:46:01 +02:00
namespace RepoIndex {
2015-08-10 22:46:01 +02:00
class Config;
class Manager;
}
namespace RepoIndex {
2015-08-10 22:46:01 +02:00
class Connection;
class Server : public QObject
{
Q_OBJECT
public:
Server(RepoIndex::Manager &alpmManager, const RepoIndex::Config &config, QObject *parent = nullptr);
2015-08-10 22:46:01 +02:00
~Server();
2020-03-09 18:45:47 +01:00
Q_SIGNALS:
2015-08-10 22:46:01 +02:00
void closed();
void connectionEstablished(Connection *connection);
2020-03-08 14:12:22 +01:00
private Q_SLOTS:
2015-08-10 22:46:01 +02:00
void incomingConnection();
private:
QWebSocketServer *m_server;
RepoIndex::Manager &m_alpmManager;
2015-08-10 22:46:01 +02:00
};
}
#endif // SERVER_H