QXmpp  Version: 1.10.4
QXmppBookmarkSet.h
1 // SPDX-FileCopyrightText: 2012 Jeremy LainĂ© <jeremy.laine@m4x.org>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPBOOKMARKSET_H
6 #define QXMPPBOOKMARKSET_H
7 
8 #include "QXmppStanza.h"
9 
10 #include <QList>
11 #include <QUrl>
12 
16 class QXMPP_EXPORT QXmppBookmarkConference
17 {
18 public:
20 
21  bool autoJoin() const;
22  void setAutoJoin(bool autoJoin);
23 
24  QString jid() const;
25  void setJid(const QString &jid);
26 
27  QString name() const;
28  void setName(const QString &name);
29 
30  QString nickName() const;
31  void setNickName(const QString &nickName);
32 
33 private:
34  bool m_autoJoin;
35  QString m_jid;
36  QString m_name;
37  QString m_nickName;
38 };
39 
43 class QXMPP_EXPORT QXmppBookmarkUrl
44 {
45 public:
46  QString name() const;
47  void setName(const QString &name);
48 
49  QUrl url() const;
50  void setUrl(const QUrl &url);
51 
52 private:
53  QString m_name;
54  QUrl m_url;
55 };
56 
60 class QXMPP_EXPORT QXmppBookmarkSet
61 {
62 public:
63  QList<QXmppBookmarkConference> conferences() const;
64  void setConferences(const QList<QXmppBookmarkConference> &conferences);
65 
66  QList<QXmppBookmarkUrl> urls() const;
67  void setUrls(const QList<QXmppBookmarkUrl> &urls);
68 
70  static bool isBookmarkSet(const QDomElement &element);
71  void parse(const QDomElement &element);
72  void toXml(QXmlStreamWriter *writer) const;
74 
75 private:
76  QList<QXmppBookmarkConference> m_conferences;
77  QList<QXmppBookmarkUrl> m_urls;
78 };
79 
80 #endif
The QXmppBookmarkConference class represents a bookmark for a conference room, as defined by XEP-0048...
Definition: QXmppBookmarkSet.h:16
The QXmppBookmarkUrl class represents a bookmark for a web page, as defined by XEP-0048: Bookmarks...
Definition: QXmppBookmarkSet.h:43
The QXmppbookmarkSets class represents a set of bookmarks, as defined by XEP-0048: Bookmarks...
Definition: QXmppBookmarkSet.h:60