yacreader/YACReaderLibrary/server/startup.h
Felix Kauselmann 4a654c38c0 Headless server: Add support for setting a port from commandline
Manual editing of a config file for setting a port is not ideal.
Solution: add a set-port command to save a port and also a
--port option to allow setting a temporary port during startup
2020-08-29 18:21:06 +02:00

39 lines
523 B
C++

/**
@file
@author Stefan Frings
*/
#ifndef STARTUP_H
#define STARTUP_H
#include <QString>
namespace stefanfrings {
class HttpListener;
}
/**
Helper class to install and run the application as a windows
service.
*/
class Startup
{
private:
//QTcpServer
stefanfrings::HttpListener *listener;
public:
/** Constructor */
Startup();
/** Start the server */
void start(quint16 port = 0);
/** Stop the server */
void stop();
QString getPort();
protected:
};
#endif // STARTUP_H