2013-06-21 17:21:11 -05:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
|
|
|
// Copyright (C) 2013, The pgAdmin Development Team
|
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
// Server.h - Thread in which the web server will run.
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef SERVER_H
|
|
|
|
#define SERVER_H
|
|
|
|
|
|
|
|
#include "pgAdmin4.h"
|
|
|
|
|
|
|
|
// QT headers
|
|
|
|
#include <QThread>
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
|
|
|
class Server : public QThread
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-10-04 11:12:10 -05:00
|
|
|
Server(quint16 port);
|
2013-06-21 17:21:11 -05:00
|
|
|
~Server();
|
|
|
|
|
|
|
|
bool Init();
|
|
|
|
QString getError() { return m_error; };
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void run();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setError(QString error) { m_error = error; };
|
|
|
|
|
|
|
|
QString m_appfile;
|
|
|
|
QString m_error;
|
2013-10-04 11:12:10 -05:00
|
|
|
|
|
|
|
quint16 m_port;
|
2013-06-21 17:21:11 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SERVER_H
|
|
|
|
|