2
* Copyright (C) 2003 Justin Karneges
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
#ifndef XMPP_ROSTERITEM_H
21
#define XMPP_ROSTERITEM_H
24
#include <QStringList>
33
enum SubType { None, To, From, Both, Remove };
35
Subscription(SubType type=None);
39
QString toString() const;
40
bool fromString(const QString &);
49
RosterItem(const Jid &jid="");
50
virtual ~RosterItem();
52
const Jid & jid() const;
53
const QString & name() const;
54
const QStringList & groups() const;
55
const Subscription & subscription() const;
56
const QString & ask() const;
58
bool inGroup(const QString &) const;
60
virtual void setJid(const Jid &);
61
void setName(const QString &);
62
void setGroups(const QStringList &);
63
void setSubscription(const Subscription &);
64
void setAsk(const QString &);
66
bool addGroup(const QString &);
67
bool removeGroup(const QString &);
69
QDomElement toXml(QDomDocument *) const;
70
bool fromXml(const QDomElement &);
76
Subscription v_subscription;