QXmpp
Version:0.9.3
|
00001 /* 00002 * Copyright (C) 2008-2014 The QXmpp developers 00003 * 00004 * Author: 00005 * Jeremy Lainé 00006 * 00007 * Source: 00008 * https://github.com/qxmpp-project/qxmpp 00009 * 00010 * This file is a part of QXmpp library. 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 */ 00023 00024 #ifndef QXMPPBOOKMARKSET_H 00025 #define QXMPPBOOKMARKSET_H 00026 00027 #include <QList> 00028 #include <QUrl> 00029 00030 #include "QXmppStanza.h" 00031 00035 class QXMPP_EXPORT QXmppBookmarkConference 00036 { 00037 public: 00038 QXmppBookmarkConference(); 00039 00040 bool autoJoin() const; 00041 void setAutoJoin(bool autoJoin); 00042 00043 QString jid() const; 00044 void setJid(const QString &jid); 00045 00046 QString name() const; 00047 void setName(const QString &name); 00048 00049 QString nickName() const; 00050 void setNickName(const QString &nickName); 00051 00052 private: 00053 bool m_autoJoin; 00054 QString m_jid; 00055 QString m_name; 00056 QString m_nickName; 00057 }; 00058 00062 class QXMPP_EXPORT QXmppBookmarkUrl 00063 { 00064 public: 00065 QString name() const; 00066 void setName(const QString &name); 00067 00068 QUrl url() const; 00069 void setUrl(const QUrl &url); 00070 00071 private: 00072 QString m_name; 00073 QUrl m_url; 00074 }; 00075 00079 class QXMPP_EXPORT QXmppBookmarkSet 00080 { 00081 public: 00082 QList<QXmppBookmarkConference> conferences() const; 00083 void setConferences(const QList<QXmppBookmarkConference> &conferences); 00084 00085 QList<QXmppBookmarkUrl> urls() const; 00086 void setUrls(const QList<QXmppBookmarkUrl> &urls); 00087 00089 static bool isBookmarkSet(const QDomElement &element); 00090 void parse(const QDomElement &element); 00091 void toXml(QXmlStreamWriter *writer) const; 00093 00094 private: 00095 QList<QXmppBookmarkConference> m_conferences; 00096 QList<QXmppBookmarkUrl> m_urls; 00097 }; 00098 00099 #endif