diff --git a/HanoiTowers/Protockol/src/user.cpp b/HanoiTowers/Protockol/src/user.cpp deleted file mode 100644 index 1f83c34..0000000 --- a/HanoiTowers/Protockol/src/user.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "user.h" diff --git a/HanoiTowers/Protockol/src/user.h b/HanoiTowers/Protockol/src/user.h deleted file mode 100644 index f36e8d4..0000000 --- a/HanoiTowers/Protockol/src/user.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef USER_H -#define USER_H - -#include <networkmember.h> - -typedef QH::PKG::NetworkMember User; - - -#endif // USER_H diff --git a/HanoiTowers/Server/hanoiserver.cpp b/HanoiTowers/Server/hanoiserver.cpp index ea97269..c41f79f 100644 --- a/HanoiTowers/Server/hanoiserver.cpp +++ b/HanoiTowers/Server/hanoiserver.cpp @@ -10,6 +10,7 @@ #include <QNetworkInterface> #include <QCoreApplication> #include <userdata.h> +#include <user.h> #include "config.h" HanoiServer::HanoiServer() { diff --git a/HanoiTowers/Server/hanoiserver.h b/HanoiTowers/Server/hanoiserver.h index 29614f3..551063f 100644 --- a/HanoiTowers/Server/hanoiserver.h +++ b/HanoiTowers/Server/hanoiserver.h @@ -5,11 +5,11 @@ #define DEFAULT_HANOI_PORT 7770 #include <quasarapp.h> -#include <databasenode.h> +#include <singleserver.h> -class HanoiServer : public QH::DataBaseNode +class HanoiServer : public QH::SingleServer { -// Q_OBJECT + Q_OBJECT public: HanoiServer(); diff --git a/HanoiTowers/client/hanoiclient.cpp b/HanoiTowers/client/hanoiclient.cpp index 1d583ae..376561f 100644 --- a/HanoiTowers/client/hanoiclient.cpp +++ b/HanoiTowers/client/hanoiclient.cpp @@ -8,17 +8,24 @@ #include "hanoiclient.h" #include <qmlnotifyservice.h> -HanoiClient::HanoiClient(){ -// connectClient(); +HanoiClient::HanoiClient() { + initSqlDb(); -// connect(this, &HanoiClient::requestError, -// this, &HanoiClient::handleError); } -//void HanoiClient::handleError(const QString &error) { -// QmlNotificationService::NotificationService::getService()->setNotify( -// tr("Jnline error"), error, "", -// QmlNotificationService::NotificationData::Error); -//} +QH::ParserResult HanoiClient::parsePackage(const QH::Package &pkg, + const QH::AbstractNodeInfo *sender) { + +} + +QStringList HanoiClient::SQLSources() const { + +} + +void HanoiClient::handleError(const QString &error) { + QmlNotificationService::NotificationService::getService()->setNotify( + tr("Jnline error"), error, "", + QmlNotificationService::NotificationData::Error); +} diff --git a/HanoiTowers/client/hanoiclient.h b/HanoiTowers/client/hanoiclient.h index 7dfaf06..83c64af 100644 --- a/HanoiTowers/client/hanoiclient.h +++ b/HanoiTowers/client/hanoiclient.h @@ -14,14 +14,22 @@ #define REMOTE_HOST "127.0.0.1" #endif #define REMOTE_PORT 7770 +#include <databasenode.h> -class HanoiClient/*: public NP::Client*/ +class HanoiClient: public QH::DataBaseNode { + Q_OBJECT public: HanoiClient(); -//private slots: -// void handleError(const QString& error); + QH::ParserResult parsePackage(const QH::Package &pkg, + const QH::AbstractNodeInfo *sender) override; + + QStringList SQLSources() const override; + + +private slots: + void handleError(const QString& error); }; #endif // HANOICLIENT_H diff --git a/Heart b/Heart index 63919c7..5877473 160000 --- a/Heart +++ b/Heart @@ -1 +1 @@ -Subproject commit 63919c75545cf178d0eb852de052d73526223662 +Subproject commit 5877473c2ac57320259bbf6e8a61a2caa8096a43