QXmpp Version: 1.4.0
Loading...
Searching...
No Matches
QXmppBookmarkSet.h
1/*
2 * Copyright (C) 2008-2021 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
6 *
7 * Source:
8 * https://github.com/qxmpp-project/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24#ifndef QXMPPBOOKMARKSET_H
25#define QXMPPBOOKMARKSET_H
26
27#include "QXmppStanza.h"
28
29#include <QList>
30#include <QUrl>
31
35class QXMPP_EXPORT QXmppBookmarkConference
36{
37public:
39
40 bool autoJoin() const;
41 void setAutoJoin(bool autoJoin);
42
43 QString jid() const;
44 void setJid(const QString &jid);
45
46 QString name() const;
47 void setName(const QString &name);
48
49 QString nickName() const;
50 void setNickName(const QString &nickName);
51
52private:
53 bool m_autoJoin;
54 QString m_jid;
55 QString m_name;
56 QString m_nickName;
57};
58
62class QXMPP_EXPORT QXmppBookmarkUrl
63{
64public:
65 QString name() const;
66 void setName(const QString &name);
67
68 QUrl url() const;
69 void setUrl(const QUrl &url);
70
71private:
72 QString m_name;
73 QUrl m_url;
74};
75
79class QXMPP_EXPORT QXmppBookmarkSet
80{
81public:
82 QList<QXmppBookmarkConference> conferences() const;
83 void setConferences(const QList<QXmppBookmarkConference> &conferences);
84
85 QList<QXmppBookmarkUrl> urls() const;
86 void setUrls(const QList<QXmppBookmarkUrl> &urls);
87
89 static bool isBookmarkSet(const QDomElement &element);
90 void parse(const QDomElement &element);
91 void toXml(QXmlStreamWriter *writer) const;
93
94private:
95 QList<QXmppBookmarkConference> m_conferences;
96 QList<QXmppBookmarkUrl> m_urls;
97};
98
99#endif
The QXmppBookmarkConference class represents a bookmark for a conference room, as defined by XEP-0048...
Definition: QXmppBookmarkSet.h:36
The QXmppbookmarkSets class represents a set of bookmarks, as defined by XEP-0048: Bookmarks.
Definition: QXmppBookmarkSet.h:80
The QXmppBookmarkUrl class represents a bookmark for a web page, as defined by XEP-0048: Bookmarks.
Definition: QXmppBookmarkSet.h:63