Heart 1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Loading...
Searching...
No Matches
workstate.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2025 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
19class HEARTSHARED_EXPORT WorkState
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
QList< HostAddress > getBanedList() const
getBanedList This method return banned list of server.
Definition workstate.cpp:91
void setActiveConnections(const QList< HostAddress > &newActiveConnections)
setActiveConnections this method sets new list of active connections.
Definition workstate.cpp:34
void setMaxConnectionCount(int value)
setMaxConnectionCount this method set a new value of limit of connections.
Definition workstate.cpp:87
const QList< HostAddress > & getConnections() const
getConnections This method return list of the current server connections.
Definition workstate.cpp:22
void setIsRun(bool value)
setIsRun This method set new value for run flag.
Definition workstate.cpp:18
bool IsRun() const
getIsRun This method return true if server is runed.
Definition workstate.cpp:14
void setBanedList(const QList< HostAddress > &banedList)
setBanedList -this method set banned list for this object.
Definition workstate.cpp:95
int getMaxConnectionCount() const
getMaxConnectionCount This method return of limit of connections.
Definition workstate.cpp:83
void setConnections(const QList< HostAddress > &connections)
setConnections This method sets connections list.
Definition workstate.cpp:26
WorkState()
WorkState.
Definition workstate.cpp:50
const QList< HostAddress > & activeConnections() const
activeConnections This method return list of actived connections.
Definition workstate.cpp:30
QString toString() const
toString This method convert state of work to string value.
Definition workstate.cpp:52
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13