KD SOAP
 All Classes Functions Enumerations Enumerator Pages
KDSoapClientInterface_p.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_P_H
24 #define KDSOAPCLIENTINTERFACE_P_H
25 
26 #include <QtNetwork/QSslConfiguration>
27 #include <QtNetwork/QNetworkAccessManager>
28 #include <QtNetwork/QNetworkCookieJar>
29 #include <QtCore/QXmlStreamWriter>
30 
31 #include "KDSoapClientInterface.h"
32 #include "KDSoapClientThread_p.h"
33 #include "KDSoapAuthentication.h"
34 QT_BEGIN_NAMESPACE
35 class QBuffer;
36 QT_END_NAMESPACE
37 class KDSoapMessage;
38 class KDSoapNamespacePrefixes;
39 
40 class KDSoapClientInterfacePrivate : public QObject
41 {
42  Q_OBJECT
43 public:
44  KDSoapClientInterfacePrivate();
45  ~KDSoapClientInterfacePrivate();
46 
47  // Warning: this accessManager is only used by asyncCall and callNoReply.
48  // For blocking calls, the thread has its own accessManager.
49  QNetworkAccessManager* m_accessManager;
50  QString m_endPoint;
51  QString m_messageNamespace;
52  KDSoapClientThread m_thread;
53  KDSoapAuthentication m_authentication;
54  QMap<QString, KDSoapMessage> m_persistentHeaders;
55  QMap<QByteArray, QByteArray> m_httpHeaders;
58  bool m_ignoreSslErrors;
59  KDSoapHeaders m_lastResponseHeaders;
60 #ifndef QT_NO_OPENSSL
61  QList<QSslError> m_ignoreErrorsList;
62  QSslConfiguration m_sslConfiguration;
63 #endif
64  KDSoapSslHandler* m_sslHandler;
65 
66  QNetworkAccessManager* accessManager();
67  QNetworkRequest prepareRequest(const QString &method, const QString& action);
68  QBuffer* prepareRequestBuffer(const QString& method, const KDSoapMessage& message, const KDSoapHeaders& headers);
69  void writeElementContents(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValue& element, KDSoapMessage::Use use);
70  void writeChildren(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValueList& args, KDSoapMessage::Use use);
71  void writeAttributes(QXmlStreamWriter& writer, const QList<KDSoapValue>& attributes);
72  void setupReply(QNetworkReply* reply);
73 
74 private Q_SLOTS:
75  void _kd_slotAuthenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator);
76 };
77 
78 #endif // KDSOAPCLIENTINTERFACE_P_H

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