KXmlRpcClient 5.109.0
Public Slots | Public Member Functions | List of all members
KXmlRpc::Client

A class that represents a connection to a XML-RPC server. More...

#include <KXmlRpcClient/Client>

Public Slots

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, 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, 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.
 
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 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.
 
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.
 
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, 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, 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.
 

Public Member Functions

 Client (const QUrl &url, QObject *parent=nullptr)
 Constructs a XML-RPC Client, which will connect to url.
 
 Client (QObject *parent=nullptr)
 Constructs a XML-RPC Client.
 
 ~Client () override
 Destroys the XML-RPC Client.
 
bool isDigestAuthEnabled () const
 Returns true if HTTP-Digest authentication is enabled, false if not.
 
void setDigestAuthEnabled (bool enabled)
 Enables/disables HTTP-Digest authentication.
 
void setUrl (const QUrl &url)
 Sets the url the Client will connect to.
 
void setUserAgent (const QString &userAgent)
 Sets the userAgent string the Client will use to identify itself.
 
QUrl url () const
 Returns the current url the XML-RPC Client will connect to.
 
QString userAgent () const
 Returns the user agent string currently used by the Client.
 

Detailed Description

A class that represents a connection to a XML-RPC server.

This is the main interface to the XML-RPC client library.

KXmlRpc::Client *c = new Client(QUrl( "http://localhost" ), this);
c->setUserAgent( "Test/1.0" );
c->call( "xmlrpc.command1", "Hi!",
this, SLOT( gotData( const QList<QVariant>&, const QVariant ) ),
this, SLOT( gotError( const QString&, const QVariant& ) ) );
A class that represents a connection to a XML-RPC server.
Definition client.h:55
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.
Author
Narayan Newton naray.nosp@m.anne.nosp@m.wton@.nosp@m.gmai.nosp@m.l.com
Since
5.8

Constructor & Destructor Documentation

◆ Client() [1/2]

KXmlRpc::Client::Client ( QObject *  parent = nullptr)
explicit

Constructs a XML-RPC Client.

Parameters
parentthe parent of this object, defaults to NULL.

◆ Client() [2/2]

KXmlRpc::Client::Client ( const QUrl &  url,
QObject *  parent = nullptr 
)
explicit

Constructs a XML-RPC Client, which will connect to url.

Parameters
urlthe url of the xml-rpc server.
parentthe parent of this object, defaults to NULL.

◆ ~Client()

KXmlRpc::Client::~Client ( )
override

Destroys the XML-RPC Client.

Member Function Documentation

◆ call [1/9]

void KXmlRpc::Client::call ( const QString &  method,
bool  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given bool as the argument.

Parameters
methodthe method on the server we are going to be calling
argthe bool to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [2/9]

void KXmlRpc::Client::call ( const QString &  method,
const QByteArray &  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given byte array as the argument.

Parameters
methodthe method on the server we are going to be calling
argthe array to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [3/9]

void KXmlRpc::Client::call ( const QString &  method,
const QDateTime &  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given date as the argument.

Parameters
methodthe method on the server we are going to be calling
argthe date and/or time to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [4/9]

void KXmlRpc::Client::call ( const QString &  method,
const QList< QVariant > &  args,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given argument list.

Parameters
methodthe method on the server we are going to be calling
argsthe argument list to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [5/9]

void KXmlRpc::Client::call ( const QString &  method,
const QString &  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given string as the argument.

Parameters
methodthe method on the server we are going to be calling
argthe string to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [6/9]

void KXmlRpc::Client::call ( const QString &  method,
const QStringList &  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given string list as the argument.

Parameters
methodthe method on the server we are going to be calling
argthe list of strings to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [7/9]

void KXmlRpc::Client::call ( const QString &  method,
const QVariant &  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given argument.

Parameters
methodthe method on the server we are going to be calling
argthe argument to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [8/9]

void KXmlRpc::Client::call ( const QString &  method,
double  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given double as the argument.

Parameters
methodthe method on the server we are going to be calling
argthe double to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ call [9/9]

void KXmlRpc::Client::call ( const QString &  method,
int  arg,
QObject *  msgObj,
const char *  messageSlot,
QObject *  faultObj,
const char *  faultSlot,
const QVariant &  id = QVariant() 
)
slot

Calls the given method on a XML-RPC server, with the given int as the argument.

Parameters
methodthe method on the server we are going to be calling
argthe int to pass to the server
msgObjthe object containing the data slot
messageSlotthe data slot itself
faultObjthe object containing the error slot
faultSlotthe error slot itself
idthe id for our Client object, defaults to empty

◆ isDigestAuthEnabled()

bool KXmlRpc::Client::isDigestAuthEnabled ( ) const

Returns true if HTTP-Digest authentication is enabled, false if not.

See also
setDigestAuthEnabled()

◆ setDigestAuthEnabled()

void KXmlRpc::Client::setDigestAuthEnabled ( bool  enabled)

Enables/disables HTTP-Digest authentication.

See also
isDigestAuthEnabled()

◆ setUrl()

void KXmlRpc::Client::setUrl ( const QUrl &  url)

Sets the url the Client will connect to.

Parameters
urlthe url for the xml-rpc server we will be connecting to.
See also
url()

◆ setUserAgent()

void KXmlRpc::Client::setUserAgent ( const QString &  userAgent)

Sets the userAgent string the Client will use to identify itself.

Parameters
userAgentthe user agent string to use.
See also
userAgent()

◆ url()

QUrl KXmlRpc::Client::url ( ) const

Returns the current url the XML-RPC Client will connect to.

See also
setUrl()

◆ userAgent()

QString KXmlRpc::Client::userAgent ( ) const

Returns the user agent string currently used by the Client.

See also
setUserAgent()