KDSOAP 1.2
KDSoapClientInterface_p.h
00001 /****************************************************************************
00002 ** Copyright (C) 2010-2012 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 <QNetworkCookieJar>
00027 #include <QXmlStreamWriter>
00028 
00029 #include "KDSoapClientInterface.h"
00030 #include "KDSoapClientThread_p.h"
00031 #include "KDSoapAuthentication.h"
00032 class QBuffer;
00033 class KDSoapMessage;
00034 class KDSoapNamespacePrefixes;
00035 
00036 class KDSoapClientInterface::Private : public QObject
00037 {
00038     Q_OBJECT
00039 public:
00040     Private();
00041 
00042     // Warning: this accessManager is only used by asyncCall and callNoReply.
00043     // For blocking calls, the thread has its own accessManager.
00044     QNetworkAccessManager m_accessManager;
00045     QString m_endPoint;
00046     QString m_messageNamespace;
00047     KDSoapClientThread m_thread;
00048     KDSoapAuthentication m_authentication;
00049     QMap<QString, KDSoapMessage> m_persistentHeaders;
00050     SoapVersion m_version;
00051     Style m_style;
00052     bool m_ignoreSslErrors;
00053     KDSoapHeaders m_lastResponseHeaders;
00054 
00055     QNetworkRequest prepareRequest(const QString &method, const QString& action);
00056     QBuffer* prepareRequestBuffer(const QString& method, const KDSoapMessage& message, const KDSoapHeaders& headers);
00057     void writeElementContents(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValue& element, KDSoapMessage::Use use);
00058     void writeChildren(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValueList& args, KDSoapMessage::Use use);
00059     void writeAttributes(QXmlStreamWriter& writer, const QList<KDSoapValue>& attributes);
00060     void setupReply(QNetworkReply* reply);
00061 
00062 private Q_SLOTS:
00063     void _kd_slotAuthenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator);
00064 };
00065 
00066 #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/