aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppMixItem.h
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2019-01-04 20:49:09 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2019-05-04 10:31:43 +0200
commit537e325e2d44e696993b78ae2b8dd8437433c2b9 (patch)
treebc4604c1d0894764d25e9237942cd1f13a0cdd17 /src/base/QXmppMixItem.h
parent754cc5a70479a54659dbc93ccb5bf28e1da77ef4 (diff)
downloadqxmpp-537e325e2d44e696993b78ae2b8dd8437433c2b9.tar.gz
Implement MIX-CORE XEP-0369: Info/Participant node items
This implements the pubsub items for the MIX participants and info node as defined by XEP-0369: Mediated Information eXchange (MIX) in version 0.14.2. https://xmpp.org/extensions/xep-0369.html#participants-node https://xmpp.org/extensions/xep-0369.html#info-node
Diffstat (limited to 'src/base/QXmppMixItem.h')
-rw-r--r--src/base/QXmppMixItem.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/src/base/QXmppMixItem.h b/src/base/QXmppMixItem.h
new file mode 100644
index 00000000..d4f046c1
--- /dev/null
+++ b/src/base/QXmppMixItem.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2008-2019 The QXmpp developers
+ *
+ * Author:
+ * Linus Jahn <lnj@kaidan.im>
+ *
+ * Source:
+ * https://github.com/qxmpp-project/qxmpp
+ *
+ * This file is a part of QXmpp library.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ */
+
+#ifndef QXMPPMIXITEM_H
+#define QXMPPMIXITEM_H
+
+#include "QXmppElement.h"
+
+class QXmppMixInfoItemPrivate;
+class QXmppMixParticipantItemPrivate;
+
+/// \brief The QXmppMixInfoItem class represents a PubSub item of a MIX
+/// channel containing channel information as defined by XEP-0369: Mediated
+/// Information eXchange (MIX).
+///
+/// \ingroup Stanzas
+
+class QXMPP_EXPORT QXmppMixInfoItem
+{
+public:
+ QXmppMixInfoItem();
+
+ QString name() const;
+ void setName(const QString&);
+
+ QString description() const;
+ void setDescription(const QString&);
+
+ QStringList contactJids() const;
+ void setContactJids(const QStringList&);
+
+ void parse(const QXmppElement& itemContent);
+ QXmppElement toElement() const;
+
+ static bool isMixChannelInfo(const QDomElement&);
+
+private:
+ QXmppMixInfoItemPrivate *d;
+};
+
+/// \brief The QXmppMixParticipantItem class represents a PubSub item of a MIX
+/// channel participant as defined by XEP-0369: Mediated Information eXchange
+/// (MIX).
+///
+/// \ingroup Stanzas
+
+class QXMPP_EXPORT QXmppMixParticipantItem
+{
+public:
+ QXmppMixParticipantItem();
+
+ QString nick() const;
+ void setNick(const QString&);
+
+ QString jid() const;
+ void setJid(const QString&);
+
+ void parse(const QXmppElement& itemContent);
+ QXmppElement toElement() const;
+
+ static bool isMixParticipantItem(const QDomElement&);
+
+private:
+ QXmppMixParticipantItemPrivate *d;
+};
+
+#endif // QXMPPMIXITEM_H