3
* Copyright (C) 2006 Remko Troncon
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30
#include "protocol/discoinfoquerier.h"
32
#include "capsregistry.h"
33
#include "xmpp_features.h"
40
class CapsManager : public QObject
45
CapsManager(const XMPP::Jid&, CapsRegistry* registry, Protocol::DiscoInfoQuerier* discoInfoQuerier);
49
void setEnabled(bool);
51
void updateCaps(const Jid& jid, const QString& node, const QString& ver, const QString& ext);
52
void disableCaps(const Jid& jid);
53
bool capsEnabled(const Jid& jid) const;
54
XMPP::Features features(const Jid& jid) const;
55
QString clientName(const Jid& jid) const;
56
QString clientVersion(const Jid& jid) const;
60
* This signal is emitted when the feature list of a given JID have changed.
62
void capsChanged(const Jid& jid);
65
CapsSpec getCapsSpecForNode(const XMPP::Jid& jid, const QString& disco_node, bool& ok) const;
68
void getDiscoInfo_success(const XMPP::Jid& jid, const QString& node, const XMPP::DiscoItem& item);
69
void getDiscoInfo_error(const XMPP::Jid& jid, const QString& node, int error_code, const QString& error_string);
71
void capsRegistered(const CapsSpec&);
75
QPointer<CapsRegistry> registry_;
76
QPointer<Protocol::DiscoInfoQuerier> discoInfoQuerier_;
78
QMap<QString,CapsSpec> capsSpecs_;
79
QMap<CapsSpec,QList<QString> > capsJids_;