defines GUH_* -> NYMEA_*
This commit is contained in:
parent
22533fb23c
commit
39fc071ed6
@ -189,7 +189,7 @@ QByteArray DebugServerHandler::createDebugXmlDocument()
|
|||||||
writer.writeStartElement("tr");
|
writer.writeStartElement("tr");
|
||||||
//: The server version description in the server infromation section of the debug interface
|
//: The server version description in the server infromation section of the debug interface
|
||||||
writer.writeTextElement("th", QCoreApplication::translate("main", "Server version"));
|
writer.writeTextElement("th", QCoreApplication::translate("main", "Server version"));
|
||||||
writer.writeTextElement("td", GUH_VERSION_STRING);
|
writer.writeTextElement("td", NYMEA_VERSION_STRING);
|
||||||
writer.writeEndElement(); // tr
|
writer.writeEndElement(); // tr
|
||||||
|
|
||||||
writer.writeStartElement("tr");
|
writer.writeStartElement("tr");
|
||||||
|
|||||||
@ -163,7 +163,7 @@ void UpnpDiscoveryImplementation::respondToSearchRequest(QHostAddress host, int
|
|||||||
"EXT:\r\n"
|
"EXT:\r\n"
|
||||||
"CONTENT-LENGTH:0\r\n"
|
"CONTENT-LENGTH:0\r\n"
|
||||||
"LOCATION: " + locationString.toUtf8() + "\r\n"
|
"LOCATION: " + locationString.toUtf8() + "\r\n"
|
||||||
"SERVER: guh/" + QByteArray(GUH_VERSION_STRING) + " UPnP/1.1 \r\n"
|
"SERVER: guh/" + QByteArray(NYMEA_VERSION_STRING) + " UPnP/1.1 \r\n"
|
||||||
"ST:upnp:rootdevice\r\n"
|
"ST:upnp:rootdevice\r\n"
|
||||||
"USN:uuid:" + uuid + "::urn:schemas-upnp-org:device:Basic:1\r\n"
|
"USN:uuid:" + uuid + "::urn:schemas-upnp-org:device:Basic:1\r\n"
|
||||||
"\r\n");
|
"\r\n");
|
||||||
@ -381,7 +381,7 @@ void UpnpDiscoveryImplementation::sendByeByeMessage()
|
|||||||
"NT:urn:schemas-upnp-org:device:Basic:1\r\n"
|
"NT:urn:schemas-upnp-org:device:Basic:1\r\n"
|
||||||
"USN:uuid:" + uuid + "::urn:schemas-upnp-org:device:Basic:1\r\n"
|
"USN:uuid:" + uuid + "::urn:schemas-upnp-org:device:Basic:1\r\n"
|
||||||
"NTS: ssdp:byebye\r\n"
|
"NTS: ssdp:byebye\r\n"
|
||||||
"SERVER: guh/" + QByteArray(GUH_VERSION_STRING) + " UPnP/1.1 \r\n"
|
"SERVER: guh/" + QByteArray(NYMEA_VERSION_STRING) + " UPnP/1.1 \r\n"
|
||||||
"\r\n");
|
"\r\n");
|
||||||
|
|
||||||
sendToMulticast(byebyeMessage);
|
sendToMulticast(byebyeMessage);
|
||||||
@ -427,7 +427,7 @@ void UpnpDiscoveryImplementation::sendAliveMessage()
|
|||||||
"NT:urn:schemas-upnp-org:device:Basic:1\r\n"
|
"NT:urn:schemas-upnp-org:device:Basic:1\r\n"
|
||||||
"USN:uuid:" + uuid + "::urn:schemas-upnp-org:device:Basic:1\r\n"
|
"USN:uuid:" + uuid + "::urn:schemas-upnp-org:device:Basic:1\r\n"
|
||||||
"NTS: ssdp:alive\r\n"
|
"NTS: ssdp:alive\r\n"
|
||||||
"SERVER: guh/" + QByteArray(GUH_VERSION_STRING) + " UPnP/1.1 \r\n"
|
"SERVER: guh/" + QByteArray(NYMEA_VERSION_STRING) + " UPnP/1.1 \r\n"
|
||||||
"\r\n");
|
"\r\n");
|
||||||
|
|
||||||
sendToMulticast(aliveMessage);
|
sendToMulticast(aliveMessage);
|
||||||
|
|||||||
@ -156,7 +156,7 @@ HttpReply::HttpReply(QObject *parent) :
|
|||||||
|
|
||||||
// set known headers
|
// set known headers
|
||||||
setHeader(HttpReply::ContentTypeHeader, "text/plain; charset=\"utf-8\";");
|
setHeader(HttpReply::ContentTypeHeader, "text/plain; charset=\"utf-8\";");
|
||||||
setHeader(HttpHeaderType::ServerHeader, "guh/" + QByteArray(GUH_VERSION_STRING));
|
setHeader(HttpHeaderType::ServerHeader, "guh/" + QByteArray(NYMEA_VERSION_STRING));
|
||||||
setHeader(HttpHeaderType::DateHeader, GuhCore::instance()->timeManager()->currentDateTime().toString("ddd, dd MMM yyyy hh:mm:ss").toUtf8());
|
setHeader(HttpHeaderType::DateHeader, GuhCore::instance()->timeManager()->currentDateTime().toString("ddd, dd MMM yyyy hh:mm:ss").toUtf8());
|
||||||
setHeader(HttpHeaderType::CacheControlHeader, "no-cache");
|
setHeader(HttpHeaderType::CacheControlHeader, "no-cache");
|
||||||
setHeader(HttpHeaderType::ConnectionHeader, "Keep-Alive");
|
setHeader(HttpHeaderType::ConnectionHeader, "Keep-Alive");
|
||||||
@ -179,7 +179,7 @@ HttpReply::HttpReply(const HttpReply::HttpStatusCode &statusCode, const HttpRepl
|
|||||||
|
|
||||||
// set known / default headers
|
// set known / default headers
|
||||||
setHeader(HttpReply::ContentTypeHeader, "text/plain; charset=\"utf-8\";");
|
setHeader(HttpReply::ContentTypeHeader, "text/plain; charset=\"utf-8\";");
|
||||||
setHeader(HttpHeaderType::ServerHeader, "guh/" + QByteArray(GUH_VERSION_STRING));
|
setHeader(HttpHeaderType::ServerHeader, "guh/" + QByteArray(NYMEA_VERSION_STRING));
|
||||||
setHeader(HttpHeaderType::DateHeader, GuhCore::instance()->timeManager()->currentDateTime().toString("ddd, dd MMM yyyy hh:mm:ss").toUtf8());
|
setHeader(HttpHeaderType::DateHeader, GuhCore::instance()->timeManager()->currentDateTime().toString("ddd, dd MMM yyyy hh:mm:ss").toUtf8());
|
||||||
setHeader(HttpHeaderType::CacheControlHeader, "no-cache");
|
setHeader(HttpHeaderType::CacheControlHeader, "no-cache");
|
||||||
setHeader(HttpHeaderType::ConnectionHeader, "Keep-Alive");
|
setHeader(HttpHeaderType::ConnectionHeader, "Keep-Alive");
|
||||||
|
|||||||
@ -243,7 +243,7 @@ JsonReply* JsonRPCServer::Version(const QVariantMap ¶ms) const
|
|||||||
Q_UNUSED(params)
|
Q_UNUSED(params)
|
||||||
|
|
||||||
QVariantMap data;
|
QVariantMap data;
|
||||||
data.insert("version", GUH_VERSION_STRING);
|
data.insert("version", NYMEA_VERSION_STRING);
|
||||||
data.insert("protocol version", JSON_PROTOCOL_VERSION);
|
data.insert("protocol version", JSON_PROTOCOL_VERSION);
|
||||||
return createReply(data);
|
return createReply(data);
|
||||||
}
|
}
|
||||||
@ -432,7 +432,7 @@ QVariantMap JsonRPCServer::createWelcomeMessage(TransportInterface *interface) c
|
|||||||
handshake.insert("id", 0);
|
handshake.insert("id", 0);
|
||||||
handshake.insert("server", "guhIO");
|
handshake.insert("server", "guhIO");
|
||||||
handshake.insert("name", GuhCore::instance()->configuration()->serverName());
|
handshake.insert("name", GuhCore::instance()->configuration()->serverName());
|
||||||
handshake.insert("version", GUH_VERSION_STRING);
|
handshake.insert("version", NYMEA_VERSION_STRING);
|
||||||
handshake.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
handshake.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
||||||
handshake.insert("language", GuhCore::instance()->configuration()->locale().name());
|
handshake.insert("language", GuhCore::instance()->configuration()->locale().name());
|
||||||
handshake.insert("protocol version", JSON_PROTOCOL_VERSION);
|
handshake.insert("protocol version", JSON_PROTOCOL_VERSION);
|
||||||
|
|||||||
@ -134,7 +134,7 @@ void TcpServer::resetAvahiService()
|
|||||||
// Note: reversed order
|
// Note: reversed order
|
||||||
QHash<QString, QString> txt;
|
QHash<QString, QString> txt;
|
||||||
txt.insert("jsonrpcVersion", JSON_PROTOCOL_VERSION);
|
txt.insert("jsonrpcVersion", JSON_PROTOCOL_VERSION);
|
||||||
txt.insert("serverVersion", GUH_VERSION_STRING);
|
txt.insert("serverVersion", NYMEA_VERSION_STRING);
|
||||||
txt.insert("manufacturer", "guh GmbH");
|
txt.insert("manufacturer", "guh GmbH");
|
||||||
txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
||||||
txt.insert("name", GuhCore::instance()->configuration()->serverName());
|
txt.insert("name", GuhCore::instance()->configuration()->serverName());
|
||||||
|
|||||||
@ -529,7 +529,7 @@ void WebServer::resetAvahiService()
|
|||||||
// Note: reversed order
|
// Note: reversed order
|
||||||
QHash<QString, QString> txt;
|
QHash<QString, QString> txt;
|
||||||
txt.insert("jsonrpcVersion", JSON_PROTOCOL_VERSION);
|
txt.insert("jsonrpcVersion", JSON_PROTOCOL_VERSION);
|
||||||
txt.insert("serverVersion", GUH_VERSION_STRING);
|
txt.insert("serverVersion", NYMEA_VERSION_STRING);
|
||||||
txt.insert("manufacturer", "guh GmbH");
|
txt.insert("manufacturer", "guh GmbH");
|
||||||
txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
||||||
txt.insert("name", GuhCore::instance()->configuration()->serverName());
|
txt.insert("name", GuhCore::instance()->configuration()->serverName());
|
||||||
@ -667,7 +667,7 @@ QByteArray WebServer::createServerXmlDocument(QHostAddress address)
|
|||||||
writer.writeTextElement("manufacturerURL", "http://guh.io");
|
writer.writeTextElement("manufacturerURL", "http://guh.io");
|
||||||
writer.writeTextElement("modelDescription", "IoT server");
|
writer.writeTextElement("modelDescription", "IoT server");
|
||||||
writer.writeTextElement("modelName", "nymead");
|
writer.writeTextElement("modelName", "nymead");
|
||||||
writer.writeTextElement("modelNumber", GUH_VERSION_STRING);
|
writer.writeTextElement("modelNumber", NYMEA_VERSION_STRING);
|
||||||
writer.writeTextElement("modelURL", "http://guh.io"); // (optional)
|
writer.writeTextElement("modelURL", "http://guh.io"); // (optional)
|
||||||
writer.writeTextElement("UDN", "uuid:" + uuid);
|
writer.writeTextElement("UDN", "uuid:" + uuid);
|
||||||
|
|
||||||
|
|||||||
@ -114,7 +114,7 @@ QHash<QString, QString> WebSocketServer::createTxtRecord()
|
|||||||
// Note: reversed order
|
// Note: reversed order
|
||||||
QHash<QString, QString> txt;
|
QHash<QString, QString> txt;
|
||||||
txt.insert("jsonrpcVersion", JSON_PROTOCOL_VERSION);
|
txt.insert("jsonrpcVersion", JSON_PROTOCOL_VERSION);
|
||||||
txt.insert("serverVersion", GUH_VERSION_STRING);
|
txt.insert("serverVersion", NYMEA_VERSION_STRING);
|
||||||
txt.insert("manufacturer", "guh GmbH");
|
txt.insert("manufacturer", "guh GmbH");
|
||||||
txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString());
|
||||||
txt.insert("name", GuhCore::instance()->configuration()->serverName());
|
txt.insert("name", GuhCore::instance()->configuration()->serverName());
|
||||||
|
|||||||
@ -221,17 +221,17 @@ DeviceManager::~DeviceManager()
|
|||||||
QStringList DeviceManager::pluginSearchDirs()
|
QStringList DeviceManager::pluginSearchDirs()
|
||||||
{
|
{
|
||||||
QStringList searchDirs;
|
QStringList searchDirs;
|
||||||
QByteArray envPath = qgetenv("GUH_PLUGINS_PATH");
|
QByteArray envPath = qgetenv("NYMEA_PLUGINS_PATH");
|
||||||
if (!envPath.isEmpty()) {
|
if (!envPath.isEmpty()) {
|
||||||
searchDirs << QString(envPath).split(':');
|
searchDirs << QString(envPath).split(':');
|
||||||
}
|
}
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/guh/plugins";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/guh/plugins";
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/";
|
||||||
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/";
|
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/";
|
||||||
searchDirs << QString("%1").arg(GUH_PLUGINS_PATH);
|
searchDirs << QString("%1").arg(NYMEA_PLUGINS_PATH);
|
||||||
QString snapDir = QString::fromUtf8(qgetenv("SNAP"));
|
QString snapDir = QString::fromUtf8(qgetenv("SNAP"));
|
||||||
if (!snapDir.isEmpty()) {
|
if (!snapDir.isEmpty()) {
|
||||||
searchDirs << QString("%1%2").arg(snapDir).arg(GUH_PLUGINS_PATH);
|
searchDirs << QString("%1%2").arg(snapDir).arg(NYMEA_PLUGINS_PATH);
|
||||||
}
|
}
|
||||||
return searchDirs;
|
return searchDirs;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QtGlobal>
|
#include <QtCore/QtGlobal>
|
||||||
|
|
||||||
#if defined(LIBGUH_LIBRARY)
|
#if defined(LIBNYMEA_LIBRARY)
|
||||||
# define LIBGUH_EXPORT Q_DECL_EXPORT
|
# define LIBGUH_EXPORT Q_DECL_EXPORT
|
||||||
#else
|
#else
|
||||||
# define LIBGUH_EXPORT Q_DECL_IMPORT
|
# define LIBGUH_EXPORT Q_DECL_IMPORT
|
||||||
|
|||||||
@ -4,7 +4,7 @@ TARGET = nymea
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
|
|
||||||
QT += network bluetooth
|
QT += network bluetooth
|
||||||
DEFINES += LIBGUH_LIBRARY
|
DEFINES += LIBNYMEA_LIBRARY
|
||||||
|
|
||||||
QMAKE_LFLAGS += -fPIC
|
QMAKE_LFLAGS += -fPIC
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ SOURCES += devicemanager.cpp \
|
|||||||
plugintimer.cpp \
|
plugintimer.cpp \
|
||||||
hardwaremanager.cpp \
|
hardwaremanager.cpp \
|
||||||
|
|
||||||
# install plugininfo python script for libguh-dev
|
# install plugininfo python script for libnymea-dev
|
||||||
generateplugininfo.files = $$top_srcdir/plugins/guh-generateplugininfo
|
generateplugininfo.files = $$top_srcdir/plugins/guh-generateplugininfo
|
||||||
generateplugininfo.path = /usr/bin
|
generateplugininfo.path = /usr/bin
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ INSTALLS += generateplugininfo
|
|||||||
|
|
||||||
# install header file with relative subdirectory
|
# install header file with relative subdirectory
|
||||||
for(header, HEADERS) {
|
for(header, HEADERS) {
|
||||||
path = /usr/include/guh/$${dirname(header)}
|
path = /usr/include/nymea/$${dirname(header)}
|
||||||
eval(headers_$${path}.files += $${header})
|
eval(headers_$${path}.files += $${header})
|
||||||
eval(headers_$${path}.path = $${path})
|
eval(headers_$${path}.path = $${path})
|
||||||
eval(INSTALLS *= headers_$${path})
|
eval(INSTALLS *= headers_$${path})
|
||||||
|
|||||||
14
nymea.pri
14
nymea.pri
@ -1,18 +1,18 @@
|
|||||||
# Parse and export GUH_VERSION_STRING
|
# Parse and export NYMEA_VERSION_STRING
|
||||||
GUH_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
||||||
|
|
||||||
# Install path for plugins
|
# Install path for plugins
|
||||||
GUH_PLUGINS_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/guh/plugins/
|
NYMEA_PLUGINS_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/nymea/plugins/
|
||||||
|
|
||||||
# define protocol versions
|
# define protocol versions
|
||||||
JSON_PROTOCOL_VERSION_MAJOR=1
|
JSON_PROTOCOL_VERSION_MAJOR=1
|
||||||
JSON_PROTOCOL_VERSION_MINOR=2
|
JSON_PROTOCOL_VERSION_MINOR=2
|
||||||
REST_API_VERSION=1
|
REST_API_VERSION=1
|
||||||
|
|
||||||
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\" \
|
DEFINES += NYMEA_VERSION_STRING=\\\"$${NYMEA_VERSION_STRING}\\\" \
|
||||||
JSON_PROTOCOL_VERSION=\\\"$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}\\\" \
|
JSON_PROTOCOL_VERSION=\\\"$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}\\\" \
|
||||||
REST_API_VERSION=\\\"$${REST_API_VERSION}\\\" \
|
REST_API_VERSION=\\\"$${REST_API_VERSION}\\\" \
|
||||||
GUH_PLUGINS_PATH=\\\"$${GUH_PLUGINS_PATH}\\\"
|
NYMEA_PLUGINS_PATH=\\\"$${NYMEA_PLUGINS_PATH}\\\"
|
||||||
|
|
||||||
QT *= network websockets bluetooth dbus
|
QT *= network websockets bluetooth dbus
|
||||||
|
|
||||||
@ -62,9 +62,9 @@ coverage {
|
|||||||
generate-coverage-html.commands = \
|
generate-coverage-html.commands = \
|
||||||
"@echo Collecting coverage data"; \
|
"@echo Collecting coverage data"; \
|
||||||
"lcov --directory $${top_srcdir} --capture --output-file coverage.info --no-checksum --compat-libtool"; \
|
"lcov --directory $${top_srcdir} --capture --output-file coverage.info --no-checksum --compat-libtool"; \
|
||||||
"lcov --extract coverage.info \"*/server/*.cpp\" --extract coverage.info \"*/libguh-core/*.cpp\" --extract coverage.info \"*/libguh/*.cpp\" -o coverage.info"; \
|
"lcov --extract coverage.info \"*/server/*.cpp\" --extract coverage.info \"*/libnymea-core/*.cpp\" --extract coverage.info \"*/libnymea/*.cpp\" -o coverage.info"; \
|
||||||
"lcov --remove coverage.info \"moc_*.cpp\" --remove coverage.info \"*/test/*\" -o coverage.info"; \
|
"lcov --remove coverage.info \"moc_*.cpp\" --remove coverage.info \"*/test/*\" -o coverage.info"; \
|
||||||
"LANG=C genhtml --prefix $${top_srcdir} --output-directory coverage-html --title \"guh coverage\" --legend --show-details coverage.info"
|
"LANG=C genhtml --prefix $${top_srcdir} --output-directory coverage-html --title \"nymea coverage\" --legend --show-details coverage.info"
|
||||||
|
|
||||||
clean-coverage-html.depends = clean-gcda
|
clean-coverage-html.depends = clean-gcda
|
||||||
clean-coverage-html.commands = \
|
clean-coverage-html.commands = \
|
||||||
|
|||||||
12
nymea.pro
12
nymea.pro
@ -33,20 +33,20 @@ lrelease.commands = lrelease $$_FILE_; \
|
|||||||
rsync -a $$top_srcdir/translations/*.qm $$top_builddir/translations/;
|
rsync -a $$top_srcdir/translations/*.qm $$top_builddir/translations/;
|
||||||
|
|
||||||
# Install translation files
|
# Install translation files
|
||||||
translations.path = /usr/share/guh/translations
|
translations.path = /usr/share/nymea/translations
|
||||||
translations.files = $$[QT_SOURCE_TREE]/translations/*.qm
|
translations.files = $$[QT_SOURCE_TREE]/translations/*.qm
|
||||||
translations.depends = lrelease
|
translations.depends = lrelease
|
||||||
INSTALLS += translations
|
INSTALLS += translations
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += licensecheck doc test lupdate lrelease
|
QMAKE_EXTRA_TARGETS += licensecheck doc test lupdate lrelease
|
||||||
|
|
||||||
# Inform about guh build
|
# Inform about nymea build
|
||||||
message(============================================)
|
message(============================================)
|
||||||
message("Qt version:" $$[QT_VERSION])
|
message("Qt version:" $$[QT_VERSION])
|
||||||
message("Building guh version $${GUH_VERSION_STRING}")
|
message("Building nymea version $${NYMEA_VERSION_STRING}")
|
||||||
message("JSON-RPC API version $${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}")
|
message("JSON-RPC API version $${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}")
|
||||||
message("REST API version $${REST_API_VERSION}")
|
message("REST API version $${REST_API_VERSION}")
|
||||||
message("Plugin path $${GUH_PLUGINS_PATH}")
|
message("Plugin path $${NYMEA_PLUGINS_PATH}")
|
||||||
message("Source directory: $${top_srcdir}")
|
message("Source directory: $${top_srcdir}")
|
||||||
message("Build directory: $${top_builddir}")
|
message("Build directory: $${top_builddir}")
|
||||||
|
|
||||||
@ -69,8 +69,8 @@ ccache {
|
|||||||
|
|
||||||
# Build tests
|
# Build tests
|
||||||
disabletesting {
|
disabletesting {
|
||||||
message("Building guh without tests")
|
message("Building nymea without tests")
|
||||||
} else {
|
} else {
|
||||||
message("Building guh with tests")
|
message("Building nymea with tests")
|
||||||
SUBDIRS += tests
|
SUBDIRS += tests
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,5 +34,5 @@ PRE_TARGETDEPS += compiler_plugininfo_make_all compiler_externplugininfo_make_al
|
|||||||
QMAKE_EXTRA_COMPILERS += plugininfo externplugininfo
|
QMAKE_EXTRA_COMPILERS += plugininfo externplugininfo
|
||||||
|
|
||||||
# Install plugin
|
# Install plugin
|
||||||
target.path = $$GUH_PLUGINS_PATH
|
target.path = $$NYMEA_PLUGINS_PATH
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|||||||
@ -49,7 +49,7 @@ GuhService::GuhService(int argc, char **argv):
|
|||||||
{
|
{
|
||||||
application()->setOrganizationName("guh");
|
application()->setOrganizationName("guh");
|
||||||
application()->setApplicationName("nymead");
|
application()->setApplicationName("nymead");
|
||||||
application()->setApplicationVersion(GUH_VERSION_STRING);
|
application()->setApplicationVersion(NYMEA_VERSION_STRING);
|
||||||
close(STDIN_FILENO);
|
close(STDIN_FILENO);
|
||||||
close(STDOUT_FILENO);
|
close(STDOUT_FILENO);
|
||||||
close(STDERR_FILENO);
|
close(STDERR_FILENO);
|
||||||
@ -71,7 +71,8 @@ void GuhService::start()
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
qCDebug(dcApplication) << "nymead" << GUH_VERSION_STRING << "started as daemon.";
|
|
||||||
|
qCDebug(dcApplication) << "nymead" << NYMEA_VERSION_STRING << "started as daemon.";
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
GuhCore::instance();
|
GuhCore::instance();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,7 +106,7 @@ int main(int argc, char *argv[])
|
|||||||
GuhApplication application(argc, argv);
|
GuhApplication application(argc, argv);
|
||||||
application.setOrganizationName("guh");
|
application.setOrganizationName("guh");
|
||||||
application.setApplicationName("nymead");
|
application.setApplicationName("nymead");
|
||||||
application.setApplicationVersion(GUH_VERSION_STRING);
|
application.setApplicationVersion(NYMEA_VERSION_STRING);
|
||||||
|
|
||||||
// logging filers for core and libnymea
|
// logging filers for core and libnymea
|
||||||
s_loggingFilters.insert("Application", true);
|
s_loggingFilters.insert("Application", true);
|
||||||
@ -167,7 +167,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
applicationDescription.append(QString("nymead %1 %2 2014-2018 guh GmbH\n"
|
applicationDescription.append(QString("nymead %1 %2 2014-2018 guh GmbH\n"
|
||||||
"Released under the GNU GENERAL PUBLIC LICENSE Version 2.\n\n"
|
"Released under the GNU GENERAL PUBLIC LICENSE Version 2.\n\n"
|
||||||
"API version: %3\n").arg(GUH_VERSION_STRING).arg(QChar(0xA9)).arg(JSON_PROTOCOL_VERSION));
|
"API version: %3\n").arg(NYMEA_VERSION_STRING).arg(QChar(0xA9)).arg(JSON_PROTOCOL_VERSION));
|
||||||
|
|
||||||
parser.setApplicationDescription(applicationDescription);
|
parser.setApplicationDescription(applicationDescription);
|
||||||
|
|
||||||
@ -257,11 +257,11 @@ int main(int argc, char *argv[])
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
qCDebug(dcApplication) << "nymead" << GUH_VERSION_STRING << "started with user ID" << userId;
|
qCDebug(dcApplication) << "nymead" << NYMEA_VERSION_STRING << "started with user ID" << userId;
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
} else {
|
} else {
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
qCDebug(dcApplication) << "nymead" << GUH_VERSION_STRING << "started as root.";
|
qCDebug(dcApplication) << "nymead" << NYMEA_VERSION_STRING << "started as root.";
|
||||||
qCDebug(dcApplication) << "=====================================";
|
qCDebug(dcApplication) << "=====================================";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -140,7 +140,7 @@ void TestJSONRPC::testHandshake()
|
|||||||
|
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(spy.first().at(1).toByteArray());
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(spy.first().at(1).toByteArray());
|
||||||
QVariantMap handShake = jsonDoc.toVariant().toMap();
|
QVariantMap handShake = jsonDoc.toVariant().toMap();
|
||||||
QString guhVersionString(GUH_VERSION_STRING);
|
QString guhVersionString(NYMEA_VERSION_STRING);
|
||||||
QVERIFY2(handShake.value("version").toString() == guhVersionString, "Handshake version doesn't match Guh version.");
|
QVERIFY2(handShake.value("version").toString() == guhVersionString, "Handshake version doesn't match Guh version.");
|
||||||
|
|
||||||
// Check whether pushButtonAuth is disabled
|
// Check whether pushButtonAuth is disabled
|
||||||
|
|||||||
@ -48,10 +48,10 @@ void TestVersioning::version()
|
|||||||
|
|
||||||
QString version = response.toMap().value("params").toMap().value("version").toString();
|
QString version = response.toMap().value("params").toMap().value("version").toString();
|
||||||
QVariant protocolVersion = response.toMap().value("params").toMap().value("protocol version");
|
QVariant protocolVersion = response.toMap().value("params").toMap().value("protocol version");
|
||||||
qDebug() << "Got version:" << version << "( Expected:" << GUH_VERSION_STRING << ")";
|
qDebug() << "Got version:" << version << "( Expected:" << NYMEA_VERSION_STRING << ")";
|
||||||
|
|
||||||
QVERIFY2(!version.isEmpty(), "Version is empty.");
|
QVERIFY2(!version.isEmpty(), "Version is empty.");
|
||||||
QCOMPARE(version, QString(GUH_VERSION_STRING));
|
QCOMPARE(version, QString(NYMEA_VERSION_STRING));
|
||||||
|
|
||||||
QVERIFY2(!protocolVersion.toString().isEmpty(), "Protocol version is empty.");
|
QVERIFY2(!protocolVersion.toString().isEmpty(), "Protocol version is empty.");
|
||||||
QVERIFY2(protocolVersion.canConvert(QVariant::Int), "Protocol version is not an integer.");
|
QVERIFY2(protocolVersion.canConvert(QVariant::Int), "Protocol version is not an integer.");
|
||||||
|
|||||||
@ -98,7 +98,7 @@ void TestWebSocketServer::testHandshake()
|
|||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(spy.first().first().toByteArray());
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(spy.first().first().toByteArray());
|
||||||
QVariantMap handShake = jsonDoc.toVariant().toMap();
|
QVariantMap handShake = jsonDoc.toVariant().toMap();
|
||||||
|
|
||||||
QString guhVersionString(GUH_VERSION_STRING);
|
QString guhVersionString(NYMEA_VERSION_STRING);
|
||||||
QString jsonProtocolVersionString(JSON_PROTOCOL_VERSION);
|
QString jsonProtocolVersionString(JSON_PROTOCOL_VERSION);
|
||||||
QCOMPARE(handShake.value("version").toString(), guhVersionString);
|
QCOMPARE(handShake.value("version").toString(), guhVersionString);
|
||||||
QCOMPARE(handShake.value("protocol version").toString(), jsonProtocolVersionString);
|
QCOMPARE(handShake.value("protocol version").toString(), jsonProtocolVersionString);
|
||||||
|
|||||||
Reference in New Issue
Block a user