QXmpp Version:0.3.91
QXmppDiscoveryManager.h
00001 /*
00002  * Copyright (C) 2008-2011 The QXmpp developers
00003  *
00004  * Author:
00005  *  Manjeet Dahiya
00006  *
00007  * Source:
00008  *  http://code.google.com/p/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 QXMPPDISCOVERYMANAGER_H
00025 #define QXMPPDISCOVERYMANAGER_H
00026 
00027 #include "QXmppClientExtension.h"
00028 
00029 class QXmppDiscoveryIq;
00030 
00035 
00036 class QXmppDiscoveryManager : public QXmppClientExtension
00037 {
00038     Q_OBJECT
00039 
00040 public:
00041     QXmppDiscoveryManager();
00042 
00043     QString requestInfo(const QString& jid, const QString& node = "");
00044     QString requestItems(const QString& jid, const QString& node = "");
00045 
00046     QString clientCapabilitiesNode() const;
00047     void setClientCapabilitiesNode(const QString&);
00048 
00049     // http://xmpp.org/registrar/disco-categories.html#client
00050     QString clientCategory() const;
00051     void setClientCategory(const QString&);
00052 
00053     void setClientName(const QString&);
00054     QString clientName() const;
00055 
00056     QString clientType() const;
00057     void setClientType(const QString&);
00058 
00060     QStringList discoveryFeatures() const;
00061     bool handleStanza(const QDomElement &element);
00062     QXmppDiscoveryIq capabilities();
00064 
00065 signals:
00067     void infoReceived(const QXmppDiscoveryIq&);
00068 
00070     void itemsReceived(const QXmppDiscoveryIq&);
00071 
00072 private:
00073     QString m_clientCapabilitiesNode;
00074     QString m_clientCategory;
00075     QString m_clientType;
00076     QString m_clientName;
00077 };
00078 
00079 #endif // QXMPPDISCOVERYMANAGER_H
 All Classes Functions Enumerations Enumerator Properties