KD SOAP API Documentation: KDSoapServerSocket_p.h Source File

| KD SOAP API Documentation 2.2

Loading...
Searching...
No Matches
KDSoapServerSocket_p.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Soap project.
4**
5** SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10#ifndef KDSOAPSERVERSOCKET_P_H
11#define KDSOAPSERVERSOCKET_P_H
12
13#include <QtGlobal>
14
15#include <QTcpSocket> //may define QT_NO_SSL
16#ifndef QT_NO_SSL
17#include <QSslSocket>
18#endif
19
20#include <QMap>
21QT_BEGIN_NAMESPACE
22class QObject;
23 QT_END_NAMESPACE
24class KDSoapSocketList;
25class KDSoapServerObjectInterface;
26class KDSoapMessage;
27class KDSoapHeaders;
28
29 class KDSoapServerSocket
30#ifndef QT_NO_SSL
31 : public QSslSocket
32#else
33 : public QTcpSocket
34#endif
35{
36 Q_OBJECT
37public:
38 KDSoapServerSocket(KDSoapSocketList *owner, QObject *serverObject);
39 ~KDSoapServerSocket();
40
41 void setResponseDelayed();
42 void sendDelayedReply(KDSoapServerObjectInterface *serverObjectInterface, const KDSoapMessage &replyMsg);
43 void sendReply(KDSoapServerObjectInterface *serverObjectInterface, const KDSoapMessage &replyMsg);
44 Q_SIGNALS:
45 void socketDeleted(KDSoapServerSocket *);
46
47private Q_SLOTS:
48 void slotReadyRead();
49
50private:
51 void handleRequest(const QMap<QByteArray, QByteArray> &headers, const QByteArray &receivedData);
52 bool handleWsdlDownload();
53 bool handleFileDownload(KDSoapServerObjectInterface *serverObjectInterface, const QString &path);
54 void makeCall(KDSoapServerObjectInterface *serverObjectInterface, const KDSoapMessage &requestMsg, KDSoapMessage &replyMsg,
55 const KDSoapHeaders &requestHeaders, const QByteArray &soapAction, const QString &path);
56 void handleError(KDSoapMessage &replyMsg, const char *errorCode, const QString &error);
57 void setSocketEnabled(bool enabled);
58 void writeXML(const QByteArray &xmlResponse, bool isFault);
59 friend class KDSoapServerObjectInterface;
60
61 KDSoapSocketList *m_owner;
62 QObject *m_serverObject;
63 bool m_delayedResponse;
64 bool m_doDebug;
65 bool m_socketEnabled;
66 bool m_receivedData;
67
68 // Current request being assembled
69 bool m_useRawXML;
70 int m_bytesReceived;
71 int m_chunkStart;
72 QMap<QByteArray, QByteArray> m_httpHeaders;
73 QByteArray m_requestBuffer;
74 QByteArray m_decodedRequestBuffer; // used for chunked transfer encoding only
75
76 // Data for the current call (stored here for delayed replies)
77 QString m_messageNamespace;
78 QString m_method;
79};
80
81#endif // KDSOAPSERVERSOCKET_P_H
KDSoapHeaders
Definition KDSoapMessage.h:185
KDSoapMessage
Definition KDSoapMessage.h:29
KDSoapServerObjectInterface
Definition KDSoapServerObjectInterface.h:60
KDSoapServerSocket
Definition KDSoapServerSocket_p.h:35
KDSoapServerSocket::sendDelayedReply
void sendDelayedReply(KDSoapServerObjectInterface *serverObjectInterface, const KDSoapMessage &replyMsg)
Definition KDSoapServerSocket.cpp:515
KDSoapServerSocket::socketDeleted
void socketDeleted(KDSoapServerSocket *)
KDSoapServerSocket::~KDSoapServerSocket
~KDSoapServerSocket()
Definition KDSoapServerSocket.cpp:53
KDSoapServerSocket::sendReply
void sendReply(KDSoapServerObjectInterface *serverObjectInterface, const KDSoapMessage &replyMsg)
Definition KDSoapServerSocket.cpp:472
KDSoapServerSocket::setResponseDelayed
void setResponseDelayed()
Definition KDSoapServerSocket.cpp:522
KDSoapSocketList
Definition KDSoapSocketList_p.h:23
QAbstractSocket::error
QAbstractSocket::SocketError error() const const
QByteArray
QMap
QObject
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::Q_SIGNALS
Q_SIGNALSQ_SIGNALS
QObject::Q_SLOTS
Q_SLOTSQ_SLOTS
QObject::qobject_cast
T qobject_cast(QObject *object)
QSslSocket
QString
QTcpSocket

© 2010-2024 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/
Generated on Sun Jan 7 2024 11:47:36 for KD SOAP API Documentation by doxygen 1.9.8