QXmpp Version:0.7.6

- Main Page
- Modules
- Classes
- Files

- File List

All Classes Functions Variables Enumerations Enumerator Properties Groups
QXmppBookmarkSet.h
1 /*
2 * Copyright (C) 2008-2012 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
6 *
7 * Source:
8 * http://code.google.com/p/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 <QList>
28 #include <QUrl>
29
30 #include "QXmppStanza.h"
31
35 class QXMPP_EXPORT QXmppBookmarkConference
36 {
37 public:
38 QXmppBookmarkConference();
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
52 private:
53 bool m_autoJoin;
54 QString m_jid;
55 QString m_name;
56 QString m_nickName;
57 };
58
62 class QXMPP_EXPORT QXmppBookmarkUrl
63 {
64 public:
65 QString name() const;
66 void setName(const QString &name);
67
68 QUrl url() const;
69 void setUrl(const QUrl &url);
70
71 private:
72 QString m_name;
73 QUrl m_url;
74 };
75
79 class QXMPP_EXPORT QXmppBookmarkSet
80 {
81 public:
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
94 private:
95 QList<QXmppBookmarkConference> m_conferences;
96 QList<QXmppBookmarkUrl> m_urls;
97 };
98
99 #endif