QXmpp: QXmppVersionIq.h Source File

QXmpp Version: 1.14.3

Loading...
Searching...
No Matches
QXmppVersionIq.h
1// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPVERSIONIQ_H
6#define QXMPPVERSIONIQ_H
7
8#include "QXmppIq.h"
9
16 class QXMPP_EXPORT QXmppVersionIq : public QXmppIq
17{
18public:
19 QString name() const;
20 void setName(const QString &name);
21
22 QString os() const;
23 void setOs(const QString &os);
24
25 QString version() const;
26 void setVersion(const QString &version);
27
29 static constexpr std::tuple PayloadXmlTag = { u"query", QXmpp::Private::ns_version };
30 [[deprecated("Use QXmpp::isIqElement()")]]
31 static bool isVersionIq(const QDomElement &element);
32 [[deprecated]]
33 static bool checkIqType(const QString &tagName, const QString &xmlNamespace);
35
36protected:
38 void parseElementFromChild(const QDomElement &element) override;
39 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
41
42private:
43 QString m_name;
44 QString m_os;
45 QString m_version;
46};
47
48#endif
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppVersionIq
The QXmppVersionIq class represents an IQ for conveying a software version as defined by XEP-0092: So...
Definition QXmppVersionIq.h:17
QXmppVersionIq::os
QString os() const
Returns the operating system.
Definition QXmppVersionIq.cpp:30
QXmppVersionIq::version
QString version() const
Returns the software version.
Definition QXmppVersionIq.cpp:42
QXmppVersionIq::setVersion
void setVersion(const QString &version)
Sets the software version.
Definition QXmppVersionIq.cpp:48
QXmppVersionIq::setOs
void setOs(const QString &os)
Sets the operating system.
Definition QXmppVersionIq.cpp:36
QXmppVersionIq::name
QString name() const
Returns the name of the software.
Definition QXmppVersionIq.cpp:18
QXmppVersionIq::setName
void setName(const QString &name)
Sets the name of the software.
Definition QXmppVersionIq.cpp:24