mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
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
39 lines
523 B
C++
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
|