6 #ifndef SWIFT_MISC_NETWORK_SERVER_H
7 #define SWIFT_MISC_NETWORK_SERVER_H
24 namespace swift::misc::network
33 IndexName = CPropertyIndexRef::GlobalIndexCServer,
40 IndexIsAcceptingConnections,
60 void setAddress(
const QString &address);
72 bool hasName()
const {
return !m_name.isEmpty(); }
75 void setName(
const QString &name);
78 bool matchesName(
const QString &name)
const;
81 bool matchesAddressPort(
const CServer &server)
const;
84 bool matchesAddress(
const QString &address)
const;
90 void setDescription(
const QString &description);
102 void setEcosystem(
const CEcosystem &ecosystem);
111 bool isValidForLogin()
const;
114 bool hasAddressAndPort()
const;
125 m_fsdSetup.addSendReceiveDetails(sendReceive);
131 m_fsdSetup.removeSendReceiveDetails(sendReceive);
144 bool isConnected()
const;
153 QString getServerSessionId(
bool onlyConnected)
const;
165 QString convertToQString(
bool i18n =
false)
const;
168 static const CServer &fscFsdServer();
171 static const CServer &esTowerView();
180 bool m_isAcceptingConnections =
true;
Non-owning reference to a CPropertyIndex with a subset of its features.
Status messages, e.g. from Core -> GUI.
Mix of the most commonly used mixin classes.
ColumnIndex
Base class enums.
Ecosystem of server belonging together.
Value object for a FSD setup.
Value object encapsulating information of a FSD server.
void markAsDisconnected()
Mark as diconnected.
QDateTime getConnectedSince() const
Connected since.
const QString & getDescription() const
Get description.
bool hasName() const
Has name?
void addSendReceiveDetails(CFsdSetup::SendReceiveDetails sendReceive)
Add send / receive details.
int getPort() const
Get port.
CServer()=default
Default constructor.
const QString & getName() const
Get name.
const CFsdSetup & getFsdSetup() const
Get FSD setup.
void setIsAcceptingConnections(bool value)
Set whether server is accepting connections (allows to disable server temporarily or generally)
void setUser(const CUser &user)
Set user.
const QString & getAddress() const
Get address.
void setPort(int port)
Set port.
const CEcosystem & getEcosystem() const
Get the ecosystem.
void removeSendReceiveDetails(CFsdSetup::SendReceiveDetails sendReceive)
Remove send / receive details.
bool isAcceptingConnections() const
Server is accepting connections (allows to disable server temporarily or generally)
const CUser & getUser() const
Get user.
void setConnectedSinceNow()
Mark as connected since now.
void setFsdSetup(const CFsdSetup &setup)
Set FSD setup.
Value object encapsulating information of a user.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...