guhdbusservice -> nymeadbusservice
This commit is contained in:
parent
da9fe61044
commit
f50770f36f
@ -75,7 +75,7 @@ HEADERS += nymeacore.h \
|
|||||||
OpenSSL/OpenSSLConnection.hpp \
|
OpenSSL/OpenSSLConnection.hpp \
|
||||||
janusconnector.h \
|
janusconnector.h \
|
||||||
pushbuttondbusservice.h \
|
pushbuttondbusservice.h \
|
||||||
guhdbusservice.h \
|
nymeadbusservice.h \
|
||||||
hardwaremanagerimplementation.h \
|
hardwaremanagerimplementation.h \
|
||||||
hardware/plugintimermanagerimplementation.h \
|
hardware/plugintimermanagerimplementation.h \
|
||||||
hardware/radio433/radio433brennenstuhl.h \
|
hardware/radio433/radio433brennenstuhl.h \
|
||||||
@ -154,7 +154,7 @@ SOURCES += nymeacore.cpp \
|
|||||||
OpenSSL/OpenSSLConnection.cpp \
|
OpenSSL/OpenSSLConnection.cpp \
|
||||||
janusconnector.cpp \
|
janusconnector.cpp \
|
||||||
pushbuttondbusservice.cpp \
|
pushbuttondbusservice.cpp \
|
||||||
guhdbusservice.cpp \
|
nymeadbusservice.cpp \
|
||||||
hardwaremanagerimplementation.cpp \
|
hardwaremanagerimplementation.cpp \
|
||||||
hardware/plugintimermanagerimplementation.cpp \
|
hardware/plugintimermanagerimplementation.cpp \
|
||||||
hardware/radio433/radio433brennenstuhl.cpp \
|
hardware/radio433/radio433brennenstuhl.cpp \
|
||||||
|
|||||||
@ -19,15 +19,15 @@
|
|||||||
* *
|
* *
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
#include "guhdbusservice.h"
|
#include "nymeadbusservice.h"
|
||||||
#include "usermanager.h"
|
#include "usermanager.h"
|
||||||
#include "loggingcategories.h"
|
#include "loggingcategories.h"
|
||||||
|
|
||||||
namespace guhserver {
|
namespace guhserver {
|
||||||
|
|
||||||
QDBusConnection GuhDBusService::s_connection = QDBusConnection::systemBus();
|
QDBusConnection NymeaDBusService::s_connection = QDBusConnection::systemBus();
|
||||||
|
|
||||||
GuhDBusService::GuhDBusService(const QString &objectPath, UserManager *parent) : QObject(parent)
|
NymeaDBusService::NymeaDBusService(const QString &objectPath, UserManager *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
bool status = s_connection.registerService("io.guh.nymead");
|
bool status = s_connection.registerService("io.guh.nymead");
|
||||||
if (!status) {
|
if (!status) {
|
||||||
@ -42,17 +42,17 @@ GuhDBusService::GuhDBusService(const QString &objectPath, UserManager *parent) :
|
|||||||
m_isValid = true;
|
m_isValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GuhDBusService::isValid()
|
bool NymeaDBusService::isValid()
|
||||||
{
|
{
|
||||||
return m_isValid;
|
return m_isValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDBusConnection GuhDBusService::connection() const
|
QDBusConnection NymeaDBusService::connection() const
|
||||||
{
|
{
|
||||||
return s_connection;
|
return s_connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuhDBusService::setBusType(QDBusConnection::BusType busType)
|
void NymeaDBusService::setBusType(QDBusConnection::BusType busType)
|
||||||
{
|
{
|
||||||
if (busType == QDBusConnection::SessionBus) {
|
if (busType == QDBusConnection::SessionBus) {
|
||||||
s_connection = QDBusConnection::sessionBus();
|
s_connection = QDBusConnection::sessionBus();
|
||||||
@ -19,8 +19,8 @@
|
|||||||
* *
|
* *
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
#ifndef GUHDBUSSERVICE_H
|
#ifndef NYMEADBUSSERVICE_H
|
||||||
#define GUHDBUSSERVICE_H
|
#define NYMEADBUSSERVICE_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
@ -31,13 +31,13 @@ namespace guhserver {
|
|||||||
|
|
||||||
class UserManager;
|
class UserManager;
|
||||||
|
|
||||||
class GuhDBusService : public QObject, public QDBusContext
|
class NymeaDBusService : public QObject, public QDBusContext
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_CLASSINFO("D-Bus Interface", "io.guh.nymead")
|
Q_CLASSINFO("D-Bus Interface", "io.guh.nymead")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GuhDBusService(const QString &objectPath, UserManager *parent = nullptr);
|
explicit NymeaDBusService(const QString &objectPath, UserManager *parent = nullptr);
|
||||||
|
|
||||||
static void setBusType(QDBusConnection::BusType busType);
|
static void setBusType(QDBusConnection::BusType busType);
|
||||||
|
|
||||||
@ -54,4 +54,4 @@ private:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GUHDBUSSERVICE_H
|
#endif // NYMEADBUSSERVICE_H
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
namespace guhserver {
|
namespace guhserver {
|
||||||
|
|
||||||
PushButtonDBusService::PushButtonDBusService(const QString &objectPath, UserManager *parent) : GuhDBusService(objectPath, parent),
|
PushButtonDBusService::PushButtonDBusService(const QString &objectPath, UserManager *parent) : NymeaDBusService(objectPath, parent),
|
||||||
m_userManager(parent)
|
m_userManager(parent)
|
||||||
{
|
{
|
||||||
if (!isValid()) {
|
if (!isValid()) {
|
||||||
|
|||||||
@ -25,11 +25,11 @@
|
|||||||
#include <QDBusObjectPath>
|
#include <QDBusObjectPath>
|
||||||
|
|
||||||
#include "usermanager.h"
|
#include "usermanager.h"
|
||||||
#include "guhdbusservice.h"
|
#include "nymeadbusservice.h"
|
||||||
|
|
||||||
namespace guhserver {
|
namespace guhserver {
|
||||||
|
|
||||||
class PushButtonDBusService : public GuhDBusService
|
class PushButtonDBusService : public NymeaDBusService
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
#include "nymeacore.h"
|
#include "nymeacore.h"
|
||||||
#include "guhservice.h"
|
#include "guhservice.h"
|
||||||
#include "nymeasettings.h"
|
#include "nymeasettings.h"
|
||||||
#include "guhdbusservice.h"
|
#include "nymeadbusservice.h"
|
||||||
#include "guhapplication.h"
|
#include "guhapplication.h"
|
||||||
#include "loggingcategories.h"
|
#include "loggingcategories.h"
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ int main(int argc, char *argv[])
|
|||||||
QLoggingCategory::installFilter(loggingCategoryFilter);
|
QLoggingCategory::installFilter(loggingCategoryFilter);
|
||||||
|
|
||||||
if (parser.isSet(dbusOption)) {
|
if (parser.isSet(dbusOption)) {
|
||||||
GuhDBusService::setBusType(QDBusConnection::SessionBus);
|
NymeaDBusService::setBusType(QDBusConnection::SessionBus);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool startForeground = parser.isSet(foregroundOption);
|
bool startForeground = parser.isSet(foregroundOption);
|
||||||
|
|||||||
Reference in New Issue
Block a user