21#ifndef KXML_RPC_CLIENT_H
22#define KXML_RPC_CLIENT_H
24#include "kxmlrpcclient_export.h"
54class KXMLRPCCLIENT_EXPORT
Client :
public QObject
64 explicit Client(QObject *parent =
nullptr);
72 explicit Client(
const QUrl &url, QObject *parent =
nullptr);
140 void call(
const QString &method,
141 const QList<QVariant> &args,
143 const char *messageSlot,
145 const char *faultSlot,
146 const QVariant &
id = QVariant());
160 void call(
const QString &method,
163 const char *messageSlot,
165 const char *faultSlot,
166 const QVariant &
id = QVariant());
181 call(
const QString &method,
int arg, QObject *msgObj,
const char *messageSlot, QObject *faultObj,
const char *faultSlot,
const QVariant &
id = QVariant());
196 call(
const QString &method,
bool arg, QObject *msgObj,
const char *messageSlot, QObject *faultObj,
const char *faultSlot,
const QVariant &
id = QVariant());
210 void call(
const QString &method,
213 const char *messageSlot,
215 const char *faultSlot,
216 const QVariant &
id = QVariant());
230 void call(
const QString &method,
233 const char *messageSlot,
235 const char *faultSlot,
236 const QVariant &
id = QVariant());
250 void call(
const QString &method,
251 const QByteArray &arg,
253 const char *messageSlot,
255 const char *faultSlot,
256 const QVariant &
id = QVariant());
270 void call(
const QString &method,
271 const QDateTime &arg,
273 const char *messageSlot,
275 const char *faultSlot,
276 const QVariant &
id = QVariant());
290 void call(
const QString &method,
291 const QStringList &arg,
293 const char *messageSlot,
295 const char *faultSlot,
296 const QVariant &
id = QVariant());
299 ClientPrivate *
const d;
302 void call(
const QString &method,
305 const char *messageSlot,
307 const char *faultSlot,
308 const QVariant &
id = QVariant());
310 Q_PRIVATE_SLOT(d,
void queryFinished(Query *))
329 const char *messageSlot,
331 const char *faultSlot,
334 QList<QVariant> args;
335 const int numArgs = arg.count();
336 args.reserve(numArgs);
337 for (
int i = 0; i < numArgs; ++i) {
338 args << QVariant(arg[i]);
341 return call(method, args, faultObj, faultSlot, msgObj, messageSlot,
id);
A class that represents a connection to a XML-RPC server.
Definition client.h:55
void call(const QString &method, const QVariant &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given argument.
void call(const QString &method, const QDateTime &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given date as the argument.
~Client() override
Destroys the XML-RPC Client.
void setDigestAuthEnabled(bool enabled)
Enables/disables HTTP-Digest authentication.
void setUrl(const QUrl &url)
Sets the url the Client will connect to.
void call(const QString &method, const QString &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given string as the argument.
QUrl url() const
Returns the current url the XML-RPC Client will connect to.
Client(const QUrl &url, QObject *parent=nullptr)
Constructs a XML-RPC Client, which will connect to url.
void call(const QString &method, double arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given double as the argument.
void call(const QString &method, const QByteArray &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given byte array as the argument.
void call(const QString &method, bool arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given bool as the argument.
void call(const QString &method, int arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given int as the argument.
bool isDigestAuthEnabled() const
Returns true if HTTP-Digest authentication is enabled, false if not.
void call(const QString &method, const QStringList &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given string list as the argument.
QString userAgent() const
Returns the user agent string currently used by the Client.
void call(const QString &method, const QList< QVariant > &args, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
Calls the given method on a XML-RPC server, with the given argument list.
void setUserAgent(const QString &userAgent)
Sets the userAgent string the Client will use to identify itself.
Client(QObject *parent=nullptr)
Constructs a XML-RPC Client.
Names for XmlRpc related classes.
Definition client.h:34