close #274
This commit is contained in:
parent
7ee67da613
commit
97e892b87e
@ -5,15 +5,12 @@
|
|||||||
The guh server provides two different API's:
|
The guh server provides two different API's:
|
||||||
\list
|
\list
|
||||||
\li \l{JSON-RPC API}{JSON-RPC}
|
\li \l{JSON-RPC API}{JSON-RPC}
|
||||||
\li \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST}
|
\li \l{https://github.com/guh/guh/wiki/REST-API}{REST}
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
|
||||||
The \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST API} is accessable on the \l{guhserver::WebServer}{WebServer}. The JSON-RPC API can be accessed from the \l {guhserver::TcpServer}{TcpServer} and the \l {guhserver::WebSocketServer}{WebSocketServer} interface. The command line interface \b {\tt guh-cli} communicates with the \l {guhserver::TcpServer}{TcpServer} and \l {JSON-RPC API}. The \b {\tt guh-webinterface} uses the \l{guhserver::WebServer}{WebServer} with the \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST-API} and catches notifications from the \l {guhserver::WebSocketServer}{WebSocketServer}.
|
The \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST API} is accessable on the \l{guhserver::WebServer}{WebServer}. The JSON-RPC API can be accessed from the \l {guhserver::TcpServer}{TcpServer} and the \l {guhserver::WebSocketServer}{WebSocketServer} interface. The command line interface \b {\tt guh-cli} communicates with the \l {guhserver::TcpServer}{TcpServer} and \l {JSON-RPC API}. The \b {\tt guh-webinterface} uses the \l{guhserver::WebServer}{WebServer} with the \l{https://github.com/guh/guh/wiki/REST-Api-documentation}{REST-API} and catches notifications from the \l {guhserver::WebSocketServer}{WebSocketServer}.
|
||||||
|
|
||||||
\image api-overview.png
|
\image api-overview.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -31,10 +31,16 @@
|
|||||||
\sa QtService
|
\sa QtService
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h>
|
#include "unistd.h"
|
||||||
|
#include "stdio.h"
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
#include "guhservice.h"
|
#include "guhservice.h"
|
||||||
|
#include "guhsettings.h"
|
||||||
#include "loggingcategories.h"
|
#include "loggingcategories.h"
|
||||||
|
|
||||||
|
|
||||||
namespace guhserver {
|
namespace guhserver {
|
||||||
|
|
||||||
/*! Constructs the forked guhd application with the given argument count \a argc and argument vector \a argv. */
|
/*! Constructs the forked guhd application with the given argument count \a argc and argument vector \a argv. */
|
||||||
@ -59,6 +65,11 @@ GuhService::~GuhService()
|
|||||||
/*! Starts the forked guhd application. */
|
/*! Starts the forked guhd application. */
|
||||||
void GuhService::start()
|
void GuhService::start()
|
||||||
{
|
{
|
||||||
|
// check if config directory for logfile exists
|
||||||
|
if (!QDir().mkpath(GuhSettings::settingsPath())) {
|
||||||
|
fprintf(stdout, "Could not create guh settings directory %s", qPrintable(GuhSettings::settingsPath()));
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
qCDebug(dcApplication) << "guhd" << GUH_VERSION_STRING << "started as daemon.";
|
qCDebug(dcApplication) << "guhd" << GUH_VERSION_STRING << "started as daemon.";
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
|
|||||||
@ -191,7 +191,6 @@ int main(int argc, char *argv[])
|
|||||||
fprintf(stdout, "Could not create guh settings directory %s", qPrintable(GuhSettings::settingsPath()));
|
fprintf(stdout, "Could not create guh settings directory %s", qPrintable(GuhSettings::settingsPath()));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
qCDebug(dcApplication) << "guhd" << GUH_VERSION_STRING << "started with user ID" << userId;
|
qCDebug(dcApplication) << "guhd" << GUH_VERSION_STRING << "started with user ID" << userId;
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
|
|||||||
Reference in New Issue
Block a user