pull/135/head
Simon Stürz 2016-02-20 15:29:01 +01:00 committed by Michael Zanetti
parent 7ee67da613
commit 97e892b87e
3 changed files with 13 additions and 6 deletions

View File

@ -5,15 +5,12 @@
The guh server provides two different API's:
\list
\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
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
*/

View File

@ -31,10 +31,16 @@
\sa QtService
*/
#include <unistd.h>
#include "unistd.h"
#include "stdio.h"
#include <QDir>
#include "guhservice.h"
#include "guhsettings.h"
#include "loggingcategories.h"
namespace guhserver {
/*! 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. */
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) << "guhd" << GUH_VERSION_STRING << "started as daemon.";
qCDebug(dcApplication) << "=====================================";

View File

@ -191,7 +191,6 @@ int main(int argc, char *argv[])
fprintf(stdout, "Could not create guh settings directory %s", qPrintable(GuhSettings::settingsPath()));
exit(EXIT_FAILURE);
}
qCDebug(dcApplication) << "=====================================";
qCDebug(dcApplication) << "guhd" << GUH_VERSION_STRING << "started with user ID" << userId;
qCDebug(dcApplication) << "=====================================";