QXmpp  Version:1.1.0
QXmppMixIq.h
1 /*
2  * Copyright (C) 2008-2019 The QXmpp developers
3  *
4  * Author:
5  * Linus Jahn <lnj@kaidan.im>
6  *
7  * Source:
8  * https://github.com/qxmpp-project/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPMIXIQ_H
25 #define QXMPPMIXIQ_H
26 
27 #include "QXmppIq.h"
28 #include <QSharedDataPointer>
29 
30 class QXmppMixIqPrivate;
31 
40 
41 class QXMPP_EXPORT QXmppMixIq : public QXmppIq
42 {
43 public:
44  enum Type {
45  None,
46  ClientJoin,
47  ClientLeave,
48  Join,
49  Leave,
50  UpdateSubscription,
51  SetNick,
52  Create,
53  Destroy
54  };
55 
56  QXmppMixIq();
57  QXmppMixIq(const QXmppMixIq &);
58  ~QXmppMixIq() override;
59 
61 
62  QXmppMixIq::Type actionType() const;
63  void setActionType(QXmppMixIq::Type);
64 
65  QString jid() const;
66  void setJid(const QString&);
67 
68  QString channelName() const;
69  void setChannelName(const QString&);
70 
71  QStringList nodes() const;
72  void setNodes(const QStringList&);
73 
74  QString nick() const;
75  void setNick(const QString&);
76 
78  static bool isMixIq(const QDomElement&);
80 
81 protected:
83  void parseElementFromChild(const QDomElement&) override;
84  void toXmlElementFromChild(QXmlStreamWriter*) const override;
86 
87 private:
88  QSharedDataPointer<QXmppMixIqPrivate> d;
89 };
90 
91 #endif // QXMPPMIXIQ_H
The QXmppMixIq class represents an IQ used to do actions on a MIX channel as defined by XEP-0369: Med...
Definition: QXmppMixIq.h:41
Type
This enum describes the type of IQ.
Definition: QXmppIq.h:46
The QXmppIq class is the base class for all IQs.
Definition: QXmppIq.h:42
QXmppIq & operator=(const QXmppIq &other)
Assigns other to this IQ.
Definition: QXmppIq.cpp:70