swift
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 
12 namespace 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 
32  QString m_hostname;
34 
35  private:
36  Rehost();
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
FSD message base class.
Definition: messagebase.h:58
The server requests us to connect to a different server.
Definition: rehost.h:16
QString m_hostname
Properties.
Definition: rehost.h:32
static QString pdu()
PDU identifier.
Definition: rehost.h:28
#define SWIFT_CORE_EXPORT
Export a class or function from the library.