• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KXMLRPC Client Library

KXmlRpc::Client

KXmlRpc::Client Class Reference

#include <client.h>

Inherits QObject.

List of all members.


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(KUrl( "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& ) ) );

Author:
Narayan Newton <narayannewton@gmail.com>

Definition at line 53 of file client.h.


Public Slots

void call (const QString &method, const QStringList &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, const QDateTime &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, const QByteArray &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, const QString &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, double arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, bool arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, int arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, const QVariant &arg, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())
void call (const QString &method, const QList< QVariant > &args, QObject *msgObj, const char *messageSlot, QObject *faultObj, const char *faultSlot, const QVariant &id=QVariant())

Public Member Functions

 Client (const KUrl &url, QObject *parent=0)
 Client (QObject *parent=0)
bool isDigestAuthEnabled () const
void setDigestAuthEnabled (bool enabled)
void setUrl (const KUrl &url)
void setUserAgent (const QString &userAgent)
KUrl url () const
QString userAgent () const
 ~Client ()

Constructor & Destructor Documentation

Client::Client ( QObject *  parent = 0  )  [explicit]

Constructs a XML-RPC Client.

Parameters:
parent the parent of this object, defaults to NULL.

Definition at line 55 of file client.cpp.

Client::Client ( const KUrl &  url,
QObject *  parent = 0 
) [explicit]

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

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

Definition at line 60 of file client.cpp.

Client::~Client (  ) 

Destroys the XML-RPC Client.

Definition at line 66 of file client.cpp.


Member Function Documentation

void 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:
method the method on the server we are going to be calling
arg the list of strings to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 209 of file client.cpp.

void 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:
method the method on the server we are going to be calling
arg the date and/or time to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 199 of file client.cpp.

void 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:
method the method on the server we are going to be calling
arg the array to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 189 of file client.cpp.

void 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:
method the method on the server we are going to be calling
arg the string to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 179 of file client.cpp.

void 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:
method the method on the server we are going to be calling
arg the double to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 169 of file client.cpp.

void 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:
method the method on the server we are going to be calling
arg the bool to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 159 of file client.cpp.

void 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:
method the method on the server we are going to be calling
arg the int to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 149 of file client.cpp.

void 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:
method the method on the server we are going to be calling
arg the argument to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 139 of file client.cpp.

void 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:
method the method on the server we are going to be calling
args the argument list to pass to the server
msgObj the object containing the data slot
messageSlot the data slot itself
faultObj the object containing the error slot
faultSlot the error slot itself
id the id for our Client object, defaults to empty

Definition at line 108 of file client.cpp.

bool Client::isDigestAuthEnabled (  )  const

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

See also:
setDigestAuthEnabled()

Definition at line 98 of file client.cpp.

void Client::setDigestAuthEnabled ( bool  enabled  ) 

Enables/disables HTTP-Digest authentication.

See also:
isDigestAuthEnabled()

Definition at line 103 of file client.cpp.

void Client::setUrl ( const KUrl &  url  ) 

Sets the url the Client will connect to.

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

Definition at line 78 of file client.cpp.

void Client::setUserAgent ( const QString &  userAgent  ) 

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

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

Definition at line 93 of file client.cpp.

KUrl Client::url (  )  const

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

See also:
setUrl()

Definition at line 83 of file client.cpp.

QString Client::userAgent (  )  const

Returns the user agent string currently used by the Client.

See also:
setUserAgent()

Definition at line 88 of file client.cpp.


The documentation for this class was generated from the following files:
  • client.h
  • client.cpp

KXMLRPC Client Library

Skip menu "KXMLRPC Client Library"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal