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