KD SOAP
 All Classes Functions Enumerations Enumerator Pages
KDSoapClientInterface.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2013 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Soap library.
5 **
6 ** Licensees holding valid commercial KD Soap licenses may use this file in
7 ** accordance with the KD Soap Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU Lesser General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 #ifndef KDSOAPCLIENTINTERFACE_H
23 #define KDSOAPCLIENTINTERFACE_H
24 
25 #include <QtCore/QtGlobal>
26 #include <QtCore/QString>
27 #include "KDSoapMessage.h"
28 #include "KDSoapPendingCall.h"
29 
31 class KDSoapSslHandler;
32 class KDSoapClientInterfacePrivate;
33 QT_BEGIN_NAMESPACE
34 class QSslConfiguration;
35 class QNetworkCookieJar;
36 class QNetworkProxy;
37 QT_END_NAMESPACE
38 
61 class KDSOAP_EXPORT KDSoapClientInterface
62 {
63 public:
68  enum SoapVersion {
70  SOAP1_1 = 1,
72  SOAP1_2 = 2
73  };
74 
85  explicit KDSoapClientInterface(const QString& endPoint, const QString& messageNamespace);
91 
134  KDSoapPendingCall asyncCall(const QString& method, const KDSoapMessage &message,
135  const QString& soapAction = QString(),
136  const KDSoapHeaders& headers = KDSoapHeaders());
137 
150  KDSoapMessage call(const QString& method, const KDSoapMessage &message,
151  const QString& soapAction = QString(),
152  const KDSoapHeaders& headers = KDSoapHeaders());
153 
165  void callNoReply(const QString& method, const KDSoapMessage &message,
166  const QString& soapAction = QString(),
167  const KDSoapHeaders& headers = KDSoapHeaders());
168 
173  void setAuthentication(const KDSoapAuthentication& authentication);
174 
180  void setHeader(const QString& name, const KDSoapMessage& header);
181 
187  void setSoapVersion(SoapVersion version);
188 
192  SoapVersion soapVersion();
193 
198  QString endPoint() const;
199 
206  void setEndPoint(const QString& endPoint);
207 
214  QNetworkCookieJar* cookieJar() const;
215 
222  void setCookieJar(QNetworkCookieJar* jar);
223 
229  QNetworkProxy proxy() const;
230 
236  void setProxy( const QNetworkProxy & proxy );
237 
251  enum Style {
253  DocumentStyle
254  };
255 
260  void setStyle(Style style);
261 
266  Style style() const;
267 
273  KDSoapHeaders lastResponseHeaders() const;
274 
279  void ignoreSslErrors();
280 
291  KDSoapSslHandler* sslHandler() const;
292 
293 #ifndef QT_NO_OPENSSL
294 
298  QSslConfiguration sslConfiguration() const;
299 
304  void setSslConfiguration(const QSslConfiguration &config);
305 #endif
306 
307 private:
308  friend class KDSoapThreadTask;
309 
310  KDSoapClientInterfacePrivate * const d;
311 };
312 
313 #endif // KDSOAPCLIENTINTERFACE_H

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