KDSOAP
|
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 KDSOAPSERVERSOCKET_P_H 00023 #define KDSOAPSERVERSOCKET_P_H 00024 00025 #include <QtGlobal> 00026 00027 #ifndef QT_NO_OPENSSL 00028 #include <QSslSocket> 00029 #else 00030 #include <QTcpSocket> 00031 #endif 00032 00033 #include <QMap> 00034 class QObject; 00035 class KDSoapSocketList; 00036 class KDSoapMessage; 00037 class KDSoapHeaders; 00038 00039 class KDSoapServerSocket 00040 #ifndef QT_NO_OPENSSL 00041 : public QSslSocket 00042 #else 00043 : public QTcpSocket 00044 #endif 00045 { 00046 Q_OBJECT 00047 public: 00048 KDSoapServerSocket(KDSoapSocketList* owner, QObject* serverObject); 00049 ~KDSoapServerSocket(); 00050 00051 private Q_SLOTS: 00052 void slotReadyRead(); 00053 00054 private: 00055 void makeCall(const KDSoapMessage& requestMsg, KDSoapMessage& replyMsg, 00056 const KDSoapHeaders& requestHeaders, KDSoapHeaders& responseHeaders, 00057 const QByteArray& soapAction); 00058 void handleError(KDSoapMessage& replyMsg, const char* errorCode, const QString& error); 00059 00060 KDSoapSocketList* m_owner; 00061 QObject* m_serverObject; 00062 bool m_doDebug; 00063 QByteArray m_requestBuffer; 00064 }; 00065 00066 #endif // KDSOAPSERVERSOCKET_P_H