KDSOAP

KDSoapClientInterface_p.h

00001 /****************************************************************************
00002 ** Copyright (C) 2010-2011 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Soap library.
00005 **
00006 ** Licensees holding valid commercial KD Soap licenses may use this file in
00007 ** accordance with the KD Soap Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 #ifndef KDSOAPCLIENTINTERFACE_P_H
00023 #define KDSOAPCLIENTINTERFACE_P_H
00024 
00025 #include <QNetworkAccessManager>
00026 #include <QXmlStreamWriter>
00027 
00028 #include "KDSoapClientInterface.h"
00029 #include "KDSoapClientThread_p.h"
00030 #include "KDSoapAuthentication.h"
00031 class QBuffer;
00032 class KDSoapMessage;
00033 class KDSoapNamespacePrefixes;
00034 
00035 class KDSoapClientInterface::Private : public QObject
00036 {
00037     Q_OBJECT
00038 public:
00039     Private();
00040 
00041     // Warning: this accessManager is only used by asyncCall and callNoReply.
00042     // For blocking calls, the thread has its own accessManager.
00043     QNetworkAccessManager m_accessManager;
00044     QString m_endPoint;
00045     QString m_messageNamespace;
00046     KDSoapClientThread m_thread;
00047     KDSoapAuthentication m_authentication;
00048     QMap<QString, KDSoapMessage> m_persistentHeaders;
00049     SoapVersion m_version;
00050     Style m_style;
00051     bool m_ignoreSslErrors;
00052     KDSoapHeaders m_lastResponseHeaders;
00053 
00054     QNetworkRequest prepareRequest(const QString &method, const QString& action);
00055     QBuffer* prepareRequestBuffer(const QString& method, const KDSoapMessage& message, const KDSoapHeaders& headers);
00056     void writeElementContents(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValue& element, KDSoapMessage::Use use);
00057     void writeChildren(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValueList& args, KDSoapMessage::Use use);
00058     void writeAttributes(QXmlStreamWriter& writer, const QList<KDSoapValue>& attributes);
00059     void setupReply(QNetworkReply* reply);
00060 
00061 private Q_SLOTS:
00062     void _kd_slotAuthenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator);
00063 };
00064 
00065 #endif // KDSOAPCLIENTINTERFACE_P_H
 All Classes Functions Enumerations Enumerator

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