mirror of
https://github.com/QuasarApp/Hanoi-Towers.git
synced 2025-04-27 18:24:31 +00:00
hanoiServer is done
This commit is contained in:
parent
0814a433f3
commit
d11f2e2b15
@ -1 +0,0 @@
|
||||
#include "user.h"
|
@ -1,9 +0,0 @@
|
||||
#ifndef USER_H
|
||||
#define USER_H
|
||||
|
||||
#include <networkmember.h>
|
||||
|
||||
typedef QH::PKG::NetworkMember User;
|
||||
|
||||
|
||||
#endif // USER_H
|
@ -10,6 +10,7 @@
|
||||
#include <QNetworkInterface>
|
||||
#include <QCoreApplication>
|
||||
#include <userdata.h>
|
||||
#include <user.h>
|
||||
#include "config.h"
|
||||
|
||||
HanoiServer::HanoiServer() {
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
2
Heart
@ -1 +1 @@
|
||||
Subproject commit 63919c75545cf178d0eb852de052d73526223662
|
||||
Subproject commit 5877473c2ac57320259bbf6e8a61a2caa8096a43
|
Loading…
x
Reference in New Issue
Block a user