KDSoapClientInterface_p.h

00001 /****************************************************************************
00002 ** Copyright (C) 2010-2010 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 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 
00023 #ifndef KDSOAPCLIENTINTERFACE_P_H
00024 #define KDSOAPCLIENTINTERFACE_P_H
00025 
00026 #include <QNetworkAccessManager>
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     bool m_ignoreSslErrors;
00052 
00053     QNetworkRequest prepareRequest(const QString &method, const QString& action);
00054     QBuffer* prepareRequestBuffer(const QString& method, const KDSoapMessage& message, const KDSoapHeaders& headers);
00055     void writeElementContents(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValue& element, KDSoapMessage::Use use);
00056     void writeChildren(KDSoapNamespacePrefixes& namespacePrefixes, QXmlStreamWriter& writer, const KDSoapValueList& args, KDSoapMessage::Use use);
00057     void writeAttributes(QXmlStreamWriter& writer, const QList<KDSoapValue>& attributes);
00058     void setupReply(QNetworkReply* reply);
00059 
00060 private Q_SLOTS:
00061     void _kd_slotAuthenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator);
00062 };
00063 
00064 #endif // KDSOAPCLIENTINTERFACE_P_H
 All Classes Functions Enumerations Enumerator Friends

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