guhservice -> nymeaservice
This commit is contained in:
parent
f50770f36f
commit
ba3e527a05
@ -30,7 +30,7 @@
|
|||||||
will provide a backtrace on a segmentation fault (SIGSEGV).
|
will provide a backtrace on a segmentation fault (SIGSEGV).
|
||||||
|
|
||||||
|
|
||||||
\sa GuhService
|
\sa NymeaService
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "guhapplication.h"
|
#include "guhapplication.h"
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
#include "unistd.h"
|
#include "unistd.h"
|
||||||
#include "nymeacore.h"
|
#include "nymeacore.h"
|
||||||
#include "guhservice.h"
|
#include "nymeaservice.h"
|
||||||
#include "nymeasettings.h"
|
#include "nymeasettings.h"
|
||||||
#include "nymeadbusservice.h"
|
#include "nymeadbusservice.h"
|
||||||
#include "guhapplication.h"
|
#include "guhapplication.h"
|
||||||
@ -285,7 +285,7 @@ int main(int argc, char *argv[])
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GuhService service(argc, argv);
|
NymeaService service(argc, argv);
|
||||||
int ret = service.exec();
|
int ret = service.exec();
|
||||||
if (s_logFile.isOpen()) {
|
if (s_logFile.isOpen()) {
|
||||||
s_logFile.close();
|
s_logFile.close();
|
||||||
|
|||||||
@ -20,13 +20,13 @@
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class guhserver::GuhService
|
\class guhserver::NymeaService
|
||||||
\brief The daemon service reprenetation of the guh server.
|
\brief The daemon service reprenetation of the guh server.
|
||||||
|
|
||||||
\ingroup core
|
\ingroup core
|
||||||
\inmodule server
|
\inmodule server
|
||||||
|
|
||||||
The \l{GuhService} represents the forked nymead.
|
The \l{NymeaService} represents the forked nymead.
|
||||||
|
|
||||||
\sa QtService
|
\sa QtService
|
||||||
*/
|
*/
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
#include "guhservice.h"
|
#include "nymeaservice.h"
|
||||||
#include "nymeacore.h"
|
#include "nymeacore.h"
|
||||||
#include "nymeasettings.h"
|
#include "nymeasettings.h"
|
||||||
#include "loggingcategories.h"
|
#include "loggingcategories.h"
|
||||||
@ -45,7 +45,7 @@
|
|||||||
namespace guhserver {
|
namespace guhserver {
|
||||||
|
|
||||||
/*! Constructs the forked nymead application with the given argument count \a argc and argument vector \a argv. */
|
/*! Constructs the forked nymead application with the given argument count \a argc and argument vector \a argv. */
|
||||||
GuhService::GuhService(int argc, char **argv):
|
NymeaService::NymeaService(int argc, char **argv):
|
||||||
QtService<QCoreApplication>(argc, argv, "nymea - IoT server")
|
QtService<QCoreApplication>(argc, argv, "nymea - IoT server")
|
||||||
{
|
{
|
||||||
application()->setOrganizationName("nymea");
|
application()->setOrganizationName("nymea");
|
||||||
@ -59,12 +59,12 @@ GuhService::GuhService(int argc, char **argv):
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*! Destroyes the forked nymead application. */
|
/*! Destroyes the forked nymead application. */
|
||||||
GuhService::~GuhService()
|
NymeaService::~NymeaService()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Starts the forked nymead application. */
|
/*! Starts the forked nymead application. */
|
||||||
void GuhService::start()
|
void NymeaService::start()
|
||||||
{
|
{
|
||||||
// check if config directory for logfile exists
|
// check if config directory for logfile exists
|
||||||
if (!QDir().mkpath(NymeaSettings::settingsPath())) {
|
if (!QDir().mkpath(NymeaSettings::settingsPath())) {
|
||||||
@ -18,20 +18,20 @@
|
|||||||
* *
|
* *
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
#ifndef GUHSERVICE_H
|
#ifndef NYMEASERVICE_H
|
||||||
#define GUHSERVICE_H
|
#define NYMEASERVICE_H
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include "qtservice/qtservice.h"
|
#include "qtservice/qtservice.h"
|
||||||
|
|
||||||
namespace guhserver {
|
namespace guhserver {
|
||||||
|
|
||||||
class GuhService : public QtService<QCoreApplication>
|
class NymeaService : public QtService<QCoreApplication>
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GuhService(int argc, char **argv);
|
explicit NymeaService(int argc, char **argv);
|
||||||
~GuhService();
|
~NymeaService();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void start();
|
void start();
|
||||||
@ -39,4 +39,4 @@ protected:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GUHSERVICE_H
|
#endif // NYMEASERVICE_H
|
||||||
@ -18,10 +18,10 @@ LIBS += -L$$top_builddir/libnymea/ -lnymea \
|
|||||||
include(qtservice/qtservice.pri)
|
include(qtservice/qtservice.pri)
|
||||||
|
|
||||||
SOURCES += main.cpp \
|
SOURCES += main.cpp \
|
||||||
guhservice.cpp \
|
nymeaservice.cpp \
|
||||||
guhapplication.cpp
|
guhapplication.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
guhservice.h \
|
nymeaservice.h \
|
||||||
guhapplication.h
|
guhapplication.h
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user