1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef CLIENT_H
6#define CLIENT_H
7
8#include <QObject>
9#include <QtConcurrent>
10
11#include <jsonrpccpp/client.h>
12#include <jsonrpccpp/client/connectors/tcpsocketclient.h>
13
14#include <iostream>
15
16class Client : public QObject
17{
18 Q_OBJECT
19 jsonrpc::TcpSocketClient tcpSocketClient;
20public:
21 Client(const std::string &ipToConnect, const unsigned int &port);
22
23public slots:
24 void initialzation(int pid);
25 void pullData();
26 void shutdown();
27 void exit();
28
29signals:
30 void initialzationResult(const Json::Value &result);
31 void pullDataResult(const Json::Value &result);
32 void shutdownResult(const Json::Value &result);
33};
34
35#endif // CLIENT_H
36