swift
deletepilot.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_DELETEPILOT_H
7 #define SWIFT_CORE_FSD_DELETEPILOT_H
8 
9 #include "core/fsd/messagebase.h"
10 
11 namespace swift::core::fsd
12 {
16  {
17  public:
19  DeletePilot(const QString &sender, const QString &cid);
20 
22  QStringList toTokens() const;
23 
25  static DeletePilot fromTokens(const QStringList &tokens);
26 
28  static QString pdu() { return QStringLiteral("#DP"); }
29 
30  QString m_cid;
31 
32  private:
34  DeletePilot();
35  };
36 
38  inline bool operator==(const DeletePilot &lhs, const DeletePilot &rhs)
39  {
40  return lhs.sender() == rhs.sender() && lhs.receiver() == rhs.receiver() && lhs.m_cid == rhs.m_cid;
41  }
42 
44  inline bool operator!=(const DeletePilot &lhs, const DeletePilot &rhs) { return !(lhs == rhs); }
45 } // namespace swift::core::fsd
46 
47 #endif // SWIFT_CORE_FSD_DELETEPILOT_H
bool operator!=(const AddAtc &lhs, const AddAtc &rhs)
Not equal operator.
Definition: addatc.h:68
Used to notify the server of the intention to close the connection. If a client receives this packet ...
Definition: deletepilot.h:16
static QString pdu()
PDU identifier.
Definition: deletepilot.h:28
FSD message base class.
Definition: messagebase.h:58
QString sender() const
get message sender
Definition: messagebase.h:73
QString receiver() const
Get message receiver.
Definition: messagebase.h:79
#define SWIFT_CORE_EXPORT
Export a class or function from the library.