KXMLRPC Client Library
query.h
Go to the documentation of this file.
00001 /****************************************************************************** 00002 * Copyright (C) 2003 - 2004 by Frerich Raabe <raabe@kde.org> * 00003 * Tobias Koenig <tokoe@kde.org> * 00004 * Copyright (C) 2006 by Narayan Newton <narayannewton@gmail.com> * 00005 * * 00006 * This program is distributed in the hope that it will be useful, but * 00007 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * 00008 * or FITNESS FOR A PARTICULAR PURPOSE. For licensing and distribution * 00009 * details, check the accompanying file 'COPYING.BSD'. * 00010 *****************************************************************************/ 00021 #ifndef KXML_RPC_QUERY_H 00022 #define KXML_RPC_QUERY_H 00023 00024 #include "kxmlrpcclient_export.h" 00025 00026 #include <QtCore/QList> 00027 #include <QtCore/QObject> 00028 #include <QtCore/QVariant> 00029 #include <QtCore/QMap> 00030 #include <kio/job.h> 00031 00032 class QString; 00033 00035 namespace KXmlRpc { 00036 00044 class KXMLRPCCLIENT_EXPORT Query : public QObject 00045 { 00046 friend class Result; 00047 Q_OBJECT 00048 00049 public: 00056 static Query *create( const QVariant &id = QVariant(), QObject *parent = 0 ); 00057 00058 public Q_SLOTS: 00068 void call( const QString &server, const QString &method, 00069 const QList<QVariant> &args, 00070 const QMap<QString, QString> &jobMetaData ); 00071 00072 Q_SIGNALS: 00076 void message( const QList<QVariant> &result, const QVariant &id ); 00077 00081 void fault( int, const QString &, const QVariant &id ); 00082 00086 void finished( Query * ); 00087 00088 private: 00089 explicit Query( const QVariant &id, QObject *parent = 0 ); 00090 ~Query(); 00091 00092 class Private; 00093 Private *const d; 00094 00095 Q_PRIVATE_SLOT( d, void slotData( KIO::Job *, const QByteArray & ) ) 00096 Q_PRIVATE_SLOT( d, void slotResult( KJob * ) ) 00097 }; 00098 00099 } // namespace XmlRpc 00100 00101 #endif 00102