QXmpp: QXmppEntityTimeIq.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
QXmppEntityTimeIq.h
1// SPDX-FileCopyrightText: 2010 Manjeet Dahiya <manjeetdahiya@gmail.com>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPENTITYTIMEIQ_H
6#define QXMPPENTITYTIMEIQ_H
7
8#include "QXmppIq.h"
9
10#include <QDateTime>
11
18 class QXMPP_EXPORT QXmppEntityTimeIq : public QXmppIq
19{
20public:
21 int tzo() const;
22 void setTzo(int tzo);
23
24 QDateTime utc() const;
25 void setUtc(const QDateTime &utc);
26
28 static constexpr std::tuple PayloadXmlTag = { u"time", QXmpp::Private::ns_entity_time };
29 [[deprecated("Use QXmpp::isIqElement()")]]
30 static bool isEntityTimeIq(const QDomElement &element);
31 [[deprecated("Use QXmpp::isIqElement()")]]
32 static bool checkIqType(const QString &tagName, const QString &xmlns);
33
34protected:
35 void parseElementFromChild(const QDomElement &element) override;
36 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
38
39private:
40 int m_tzo;
41 QDateTime m_utc;
42};
43
44#endif // QXMPPENTITYTIMEIQ_H
QXmppEntityTimeIq
QXmppEntityTimeIq represents an entity time request/response as defined in XEP-0202: Entity Time.
Definition QXmppEntityTimeIq.h:19
QXmppEntityTimeIq::tzo
int tzo() const
Definition QXmppEntityTimeIq.cpp:33
QXmppEntityTimeIq::setUtc
void setUtc(const QDateTime &utc)
Definition QXmppEntityTimeIq.cpp:61
QXmppEntityTimeIq::utc
QDateTime utc() const
Definition QXmppEntityTimeIq.cpp:51
QXmppEntityTimeIq::setTzo
void setTzo(int tzo)
Definition QXmppEntityTimeIq.cpp:43
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39