swift
mute.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 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_MUTE_H
7 #define SWIFT_CORE_FSD_MUTE_H
8 
9 #include "core/fsd/messagebase.h"
10 
11 namespace swift::core::fsd
12 {
15  {
16  public:
18  Mute(const QString &sender, const QString &receiver, bool mute);
19 
21  QStringList toTokens() const;
22 
24  static Mute fromTokens(const QStringList &tokens);
25 
27  static QString pdu() { return "#MU"; }
28 
29  bool m_mute = false;
30 
31  private:
32  Mute() = default;
33  };
34 
36  inline bool operator==(const Mute &lhs, const Mute &rhs)
37  {
38  return lhs.sender() == rhs.sender() && lhs.receiver() == rhs.receiver() && lhs.m_mute == rhs.m_mute;
39  }
40 
42  inline bool operator!=(const Mute &lhs, const Mute &rhs) { return !(lhs == rhs); }
43 } // namespace swift::core::fsd
44 
45 #endif // SWIFT_CORE_FSD_MUTE_H
bool operator!=(const AddAtc &lhs, const AddAtc &rhs)
Not equal operator.
Definition: addatc.h:68
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
Mute the user for AFV.
Definition: mute.h:15
bool m_mute
Flag whether the user should be muted/unmuted.
Definition: mute.h:29
static QString pdu()
PDU identifier.
Definition: mute.h:27
#define SWIFT_CORE_EXPORT
Export a class or function from the library.