KD SOAP
 All Classes Functions Enumerations Enumerator Pages
KDSoapClientInterface.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2014 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
3 ** All rights reserved.
4 **
5 ** This file is part of the KD Soap library.
6 **
7 ** Licensees holding valid commercial KD Soap licenses may use this file in
8 ** accordance with the KD Soap Commercial License Agreement provided with
9 ** the Software.
10 **
11 **
12 ** This file may be distributed and/or modified under the terms of the
13 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
14 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
15 **
16 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 **
19 ** Contact info@kdab.com if any conditions of this licensing are not
20 ** clear to you.
21 **
22 **********************************************************************/
23 #ifndef KDSOAPCLIENTINTERFACE_H
24 #define KDSOAPCLIENTINTERFACE_H
25 
26 #include <QtCore/QtGlobal>
27 #include <QtCore/QString>
28 #include "KDSoapMessage.h"
29 #include "KDSoapPendingCall.h"
30 
31 
33 class KDSoapSslHandler;
34 class KDSoapClientInterfacePrivate;
35 QT_BEGIN_NAMESPACE
36 class QSslError;
37 class QSslConfiguration;
38 class QNetworkCookieJar;
39 class QNetworkProxy;
40 QT_END_NAMESPACE
41 
64 class KDSOAP_EXPORT KDSoapClientInterface
65 {
66 public:
71  enum SoapVersion {
73  SOAP1_1 = 1,
75  SOAP1_2 = 2
76  };
77 
88  explicit KDSoapClientInterface(const QString& endPoint, const QString& messageNamespace);
94 
137  KDSoapPendingCall asyncCall(const QString& method, const KDSoapMessage &message,
138  const QString& soapAction = QString(),
139  const KDSoapHeaders& headers = KDSoapHeaders());
140 
153  KDSoapMessage call(const QString& method, const KDSoapMessage &message,
154  const QString& soapAction = QString(),
155  const KDSoapHeaders& headers = KDSoapHeaders());
156 
168  void callNoReply(const QString& method, const KDSoapMessage &message,
169  const QString& soapAction = QString(),
170  const KDSoapHeaders& headers = KDSoapHeaders());
171 
176  void setAuthentication(const KDSoapAuthentication& authentication);
177 
183  void setHeader(const QString& name, const KDSoapMessage& header);
184 
190  void setSoapVersion(SoapVersion version);
191 
195  SoapVersion soapVersion();
196 
201  QString endPoint() const;
202 
209  void setEndPoint(const QString& endPoint);
210 
217  QNetworkCookieJar* cookieJar() const;
218 
225  void setCookieJar(QNetworkCookieJar* jar);
226 
232  QNetworkProxy proxy() const;
233 
239  void setProxy( const QNetworkProxy & proxy );
240 
246  void setRawHTTPHeaders( const QMap<QByteArray, QByteArray>& headers );
247 
261  enum Style {
263  DocumentStyle
264  };
265 
270  void setStyle(Style style);
271 
276  Style style() const;
277 
283  KDSoapHeaders lastResponseHeaders() const;
284 
289  void ignoreSslErrors();
290 
291 #ifndef QT_NO_OPENSSL
292 
301  void ignoreSslErrors(const QList<QSslError> &errors);
302 #endif
303 
314  KDSoapSslHandler* sslHandler() const;
315 
316 #ifndef QT_NO_OPENSSL
317 
321  QSslConfiguration sslConfiguration() const;
322 
327  void setSslConfiguration(const QSslConfiguration &config);
328 #endif
329 
330 private:
331  friend class KDSoapThreadTask;
332 
333  KDSoapClientInterfacePrivate * const d;
334 };
335 
336 #endif // KDSOAPCLIENTINTERFACE_H

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-soap/