webui fix and serverinfo (#699)

* initial commit of webconfig

* update example config with webconfig and fix format of file
update debian postinst script for install example config

* fix compiling
add new web server command "serverinfo" to use in webapp to retrieve json port

* change web default port to 8099
This commit is contained in:
redPanther
2016-06-13 22:54:08 +02:00
committed by brindosch
parent f0884ec25b
commit eb64e7e528
7 changed files with 74 additions and 46 deletions

View File

@@ -2,7 +2,9 @@
#define WEBCONFIG_H
#include <QObject>
#include <QString>
#include <string>
#include <utils/jsonschema/JsonFactory.h>
class StaticFileServing;
@@ -10,17 +12,23 @@ class WebConfig : public QObject {
Q_OBJECT
public:
explicit WebConfig (std::string baseUrl, quint16 port, QObject * parent = NULL);
WebConfig (std::string baseUrl, quint16 port, quint16 jsonPort, QObject * parent = NULL);
WebConfig (const Json::Value &config, QObject * parent = NULL);
virtual ~WebConfig (void);
void start();
void stop();
private:
QObject * _parent;
QObject* _parent;
QString _baseUrl;
quint16 _port;
StaticFileServing * _server;
quint16 _jsonPort;
StaticFileServing* _server;
const std::string WEBCONFIG_DEFAULT_PATH = "/usr/share/hyperion/webconfig";
const quint16 WEBCONFIG_DEFAULT_PORT = 8099;
};
#endif // WEBCONFIG_H