Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
workstate.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2024 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef WORKSTATE_H
9#define WORKSTATE_H
10
11#include <hostaddress.h>
12#include <QList>
13
14namespace QH {
15
20{
21public:
22
26 WorkState();
27
32 QString toString() const;
33
38 int getMaxConnectionCount() const;
39
44 void setMaxConnectionCount(int value);
45
50 QList<HostAddress> getBanedList() const;
51
56 void setBanedList(const QList<HostAddress> &banedList);
57
62 bool IsRun() const;
63
68 void setIsRun(bool value);
69
74 const QList<HostAddress>& getConnections() const;
75
80 void setConnections(const QList<HostAddress> &connections);
81
86 const QList<HostAddress> &activeConnections() const;
87
92 void setActiveConnections(const QList<HostAddress> &newActiveConnections);
93
94private:
95 int maxConnectionCount = 0;
96 bool isRun = false;
97
98 QList<HostAddress> _banedList;
99 QList<HostAddress> _connections;
100 QList<HostAddress> _activeConnections;
101
102 QString getWorkStateString() const;
103};
104}
105#endif // WORKSTATE_H
The WorkState class is simple class with data of work state of node.
Definition workstate.h:20
#define HEARTSHARED_EXPORT
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13