hanoiServer is done

This commit is contained in:
Andrei Yankovich 2020-10-26 14:21:51 +03:00
parent 0814a433f3
commit d11f2e2b15
7 changed files with 32 additions and 26 deletions

View File

@ -1 +0,0 @@
#include "user.h"

View File

@ -1,9 +0,0 @@
#ifndef USER_H
#define USER_H
#include <networkmember.h>
typedef QH::PKG::NetworkMember User;
#endif // USER_H

View File

@ -10,6 +10,7 @@
#include <QNetworkInterface>
#include <QCoreApplication>
#include <userdata.h>
#include <user.h>
#include "config.h"
HanoiServer::HanoiServer() {

View File

@ -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();

View File

@ -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);
}

View File

@ -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

2
Heart

@ -1 +1 @@
Subproject commit 63919c75545cf178d0eb852de052d73526223662
Subproject commit 5877473c2ac57320259bbf6e8a61a2caa8096a43