swift
Loading...
Searching...
No Matches
rehost.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_CORE_FSD_REHOST_H
7#define SWIFT_CORE_FSD_REHOST_H
8
9#include "enums.h"
10#include "messagebase.h"
11
12namespace swift::core::fsd
13{
16 {
17 public:
19 Rehost(const QString &sender, const QString &hostname);
20
22 QStringList toTokens() const;
23
25 static Rehost fromTokens(const QStringList &tokens);
26
28 static QString pdu() { return "$XX"; }
29
34
35 private:
36 Rehost() = default;
37 };
38
40 inline bool operator==(const Rehost &lhs, const Rehost &rhs) { return lhs.m_hostname == rhs.m_hostname; }
41
43 inline bool operator!=(const Rehost &lhs, const Rehost &rhs) { return !(lhs == rhs); }
44} // namespace swift::core::fsd
45
46#endif // SWIFT_CORE_FSD_REHOST_H
bool operator!=(const AddAtc &lhs, const AddAtc &rhs)
Not equal operator.
Definition addatc.h:68
bool operator==(const AddAtc &lhs, const AddAtc &rhs)
Equal operator.
Definition addatc.h:60
MessageBase()=default
Default Constructor.
The server requests us to connect to a different server.
Definition rehost.h:16
QString m_hostname
Properties.
Definition rehost.h:32
Rehost(const QString &sender, const QString &hostname)
Constructor.
Definition rehost.cpp:15
QStringList toTokens() const
Message converted to tokens.
Definition rehost.cpp:17
static QString pdu()
PDU identifier.
Definition rehost.h:28
static Rehost fromTokens(const QStringList &tokens)
Construct from tokens.
Definition rehost.cpp:19
#define SWIFT_CORE_EXPORT
Export a class or function from the library.