QXmpp Version: 1.10.0
QXmppOmemoDeviceElement_p.h
1// SPDX-FileCopyrightText: 2021 Germán Márquez Mejía <mancho@olomono.de>
2// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
3//
4// SPDX-License-Identifier: LGPL-2.1-or-later
5
6#ifndef QXMPPOMEMODEVICEELEMENT_H
7#define QXMPPOMEMODEVICEELEMENT_H
8
9#include "QXmppGlobal.h"
10
11class QDomElement;
12class QXmlStreamWriter;
13
14class QXMPP_AUTOTEST_EXPORT QXmppOmemoDeviceElement
15{
16public:
17 bool operator==(const QXmppOmemoDeviceElement &other) const;
18
19 uint32_t id() const;
20 void setId(uint32_t id);
21
22 QString label() const;
23 void setLabel(const QString &label);
24
26 void parse(const QDomElement &element);
27 void toXml(QXmlStreamWriter *writer) const;
29
30 static bool isOmemoDeviceElement(const QDomElement &element);
31
32private:
33 uint32_t m_id = 0;
34 QString m_label;
35};
36
37Q_DECLARE_TYPEINFO(QXmppOmemoDeviceElement, Q_MOVABLE_TYPE);
38
39#endif // QXMPPOMEMODEVICEELEMENT_H