pgadmin4/runtime/Server.h
Dave Page 457a842cec Find a random port number to use for the application server to avoid conflicts
with any other apps that may have already bound to the default port used by CP.
2013-10-04 21:48:01 +01:00

46 lines
815 B
C++

//////////////////////////////////////////////////////////////////////////
//
// 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:
Server(quint16 port);
~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;
quint16 m_port;
};
#endif // SERVER_H