File indexing completed on 2024-06-23 04:03:40

0001 /*
0002  * Copyright (C) 2001, 2002  Justin Karneges
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Lesser General Public
0006  * License as published by the Free Software Foundation; either
0007  * either version 2
0008    of the License, or (at your option) any later version.1 of the License, or (at your option) any later version.
0009  *
0010  * This library is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * Lesser General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU Lesser General Public
0016  * License along with this library; if not, write to the Free Software
0017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0018  *
0019  */
0020 
0021 #ifndef XMPP_DISCOINFOTASK_H
0022 #define XMPP_DISCOINFOTASK_H
0023 
0024 #include "xmpp_task.h"
0025 #include "xmpp_discoitem.h"
0026 
0027 namespace XMPP {
0028     class Jid;
0029 }
0030 class QString;
0031 class QDomElement;
0032 
0033 namespace XMPP
0034 {
0035     class DiscoInfoTask : public Task
0036     {
0037         Q_OBJECT
0038     public:
0039         DiscoInfoTask(Task *);
0040         ~DiscoInfoTask() override;
0041     
0042         void get(const Jid &, const QString &node = QString(), const DiscoItem::Identity = DiscoItem::Identity());
0043         void get(const DiscoItem &);
0044     
0045         const DiscoItem &item() const;
0046         const Jid& jid() const;
0047         const QString& node() const;
0048     
0049         void onGo() override;
0050         bool take(const QDomElement &) override;
0051     
0052     private:
0053         class Private;
0054         Private *d;
0055     };
0056 
0057     // Deprecated name
0058     typedef DiscoInfoTask JT_DiscoInfo;
0059 }
0060 #endif