• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KXMLRPC Client Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kxmlrpcclient
client.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2003 - 2004 by Frerich Raabe <raabe@kde.org> *
3  * Tobias Koenig <tokoe@kde.org> *
4  * Copyright (C) 2006 by Narayan Newton <narayannewton@gmail.com> *
5  * *
6  * This program is distributed in the hope that it will be useful, but *
7  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
8  * or FITNESS FOR A PARTICULAR PURPOSE. For licensing and distribution *
9  * details, check the accompanying file 'COPYING.BSD'. *
10  *****************************************************************************/
24 #ifndef KXML_RPC_CLIENT_H
25 #define KXML_RPC_CLIENT_H
26 
27 #include "kxmlrpcclient_export.h"
28 
29 #include <kurl.h>
30 
31 #include <QtCore/QList>
32 #include <QtCore/QObject>
33 #include <QtCore/QVariant>
34 
36 namespace KXmlRpc {
37 
53 class KXMLRPCCLIENT_EXPORT Client : public QObject
54 {
55  Q_OBJECT
56 
57  public:
63  explicit Client( QObject *parent = 0 );
64 
71  explicit Client( const KUrl &url, QObject *parent = 0 );
72 
76  ~Client();
77 
83  KUrl url() const;
84 
92  void setUrl( const KUrl &url );
93 
99  QString userAgent() const;
100 
108  void setUserAgent( const QString &userAgent );
109 
116  bool isDigestAuthEnabled() const;
117 
124  void setDigestAuthEnabled( bool enabled );
125 
126  public Q_SLOTS:
139  void call( const QString &method, const QList<QVariant> &args,
140  QObject *msgObj, const char *messageSlot,
141  QObject *faultObj, const char *faultSlot,
142  const QVariant &id = QVariant() );
143 
156  void call( const QString &method, const QVariant &arg,
157  QObject *msgObj, const char *messageSlot,
158  QObject *faultObj, const char *faultSlot,
159  const QVariant &id = QVariant() );
160 
173  void call( const QString &method, int arg,
174  QObject *msgObj, const char *messageSlot,
175  QObject *faultObj, const char *faultSlot,
176  const QVariant &id = QVariant() );
177 
190  void call( const QString &method, bool arg,
191  QObject *msgObj, const char *messageSlot,
192  QObject *faultObj, const char *faultSlot,
193  const QVariant &id = QVariant() );
194 
207  void call( const QString &method, double arg,
208  QObject *msgObj, const char *messageSlot,
209  QObject *faultObj, const char *faultSlot,
210  const QVariant &id = QVariant() );
211 
224  void call( const QString &method, const QString &arg,
225  QObject *msgObj, const char *messageSlot,
226  QObject *faultObj, const char *faultSlot,
227  const QVariant &id = QVariant() );
228 
241  void call( const QString &method, const QByteArray &arg,
242  QObject *msgObj, const char *messageSlot,
243  QObject *faultObj, const char *faultSlot,
244  const QVariant &id = QVariant() );
245 
258  void call( const QString &method, const QDateTime &arg,
259  QObject *msgObj, const char *messageSlot,
260  QObject *faultObj, const char *faultSlot,
261  const QVariant &id = QVariant() );
262 
275  void call( const QString &method, const QStringList &arg,
276  QObject *msgObj, const char *messageSlot,
277  QObject *faultObj, const char *faultSlot,
278  const QVariant &id = QVariant() );
279 
280  private:
281  class Private;
282  Private *const d;
283 
284  template <typename T>
285  void call( const QString &method, const QList<T> &arg,
286  QObject *obj1, const char *messageSlot,
287  QObject *obj2, const char *faultSlot,
288  const QVariant &id = QVariant() );
289 
290  Q_PRIVATE_SLOT( d, void queryFinished( Query * ) )
291 };
292 
305 template <typename T>
306 void Client::call( const QString &method, const QList<T> &arg,
307  QObject *msgObj, const char *messageSlot,
308  QObject *faultObj, const char *faultSlot,
309  const QVariant &id )
310 {
311  QList<QVariant> args;
312 
313  for ( int i = 0; i < arg.count(); ++i ) {
314  args << QVariant( arg[ i ] );
315  }
316 
317  return call( method, args, faultObj, faultSlot, msgObj, messageSlot, id );
318 }
319 
320 }
321 
322 #endif
KXmlRpc::Client::call
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.
Definition: client.cpp:108
KXmlRpc::Client
A class that represents a connection to a XML-RPC server.
Definition: client.h:53
KXmlRpc::Query
Query is a class that represents an individual XML-RPC call.
Definition: query.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KXMLRPC Client Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal