KD SOAP 2.0.0
Loading...
Searching...
No Matches
KDSoapServerObjectInterface.h
1/****************************************************************************
2**
3** This file is part of the KD Soap library.
4**
5** SPDX-FileCopyrightText: 2010-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: LicenseRef-KDAB-KDSoap-AGPL3-Modified OR LicenseRef-KDAB-KDSoap OR LicenseRef-KDAB-KDSoap-US
8**
9** Licensees holding valid commercial KD Soap licenses may use this file in
10** accordance with the KD Soap Commercial License Agreement provided with
11** the Software.
12**
13** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14**
15****************************************************************************/
16#ifndef KDSOAPSERVEROBJECTINTERFACE_H
17#define KDSOAPSERVEROBJECTINTERFACE_H
18
19#include "KDSoapServerGlobal.h"
20#include <KDSoapClient/KDSoapMessage.h>
21#include "KDSoapDelayedResponseHandle.h"
22
23#include <QtCore/QObject>
24#include <QtCore/QByteArray>
25#include <QtCore/QVector>
26#include <QIODevice>
27
28class KDSoapServerSocket;
29
30QT_BEGIN_NAMESPACE
31class QAbstractSocket;
32QT_END_NAMESPACE
33
65class KDSOAPSERVER_EXPORT KDSoapServerObjectInterface
66{
67public:
76
90 virtual void processRequest(const KDSoapMessage &request, KDSoapMessage &response, const QByteArray &soapAction);
91
104 virtual QIODevice *processFileRequest(const QString &path, QByteArray &contentType);
105
124 virtual void processRequestWithPath(const KDSoapMessage &request, KDSoapMessage &response, const QByteArray &soapAction, const QString &path);
125
126 struct KDSOAPSERVER_EXPORT HttpResponseHeaderItem
127 {
128 HttpResponseHeaderItem();
129 HttpResponseHeaderItem(const QByteArray &name, const QByteArray &value);
130 QByteArray m_value;
131 QByteArray m_name;
132 };
133
134 typedef QVector<HttpResponseHeaderItem> HttpResponseHeaderItems;
135
142 virtual HttpResponseHeaderItems additionalHttpResponseHeaderItems() const;
143
150 void doneProcessingRequestWithPath(const KDSoapServerObjectInterface &otherInterface);
151
157 KDSoapHeaders requestHeaders() const;
158
162 QByteArray soapAction() const;
163
167 void setResponseHeaders(const KDSoapHeaders &headers);
168
176 void setResponseNamespace(const QString &ns);
177
189 void setFault(const QString &faultCode, const QString &faultString, const QString &faultActor = QString(), const QString &detail = QString());
190
202 void setFault(const QString &faultCode, const QString &faultString, const QString &faultActor, const KDSoapValue &detail);
203
207 bool hasFault() const;
208
214 QAbstractSocket *serverSocket() const;
215
224 KDSoapDelayedResponseHandle prepareDelayedResponse(); // only valid during processRequest()
230 bool isDelayedResponse() const; // only valid during processRequest()
231
238 void sendDelayedResponse(const KDSoapDelayedResponseHandle &responseHandle, const KDSoapMessage &response);
239
246 void writeHTTP(const QByteArray &httpReply);
247
256 void writeXML(const QByteArray &reply, bool isFault = false);
257
258private:
259 friend class KDSoapServerSocket;
260 void setServerSocket(KDSoapServerSocket *serverSocket); // only valid during processRequest()
261 void setRequestHeaders(const KDSoapHeaders &headers, const QByteArray &soapAction);
262 KDSoapHeaders responseHeaders() const;
263 QString responseNamespace() const;
264 void storeFaultAttributes(KDSoapMessage &message) const;
265 class Private;
266 Private *const d;
267};
268
269QT_BEGIN_NAMESPACE
270Q_DECLARE_INTERFACE(KDSoapServerObjectInterface, "com.kdab.KDSoap.ServerObjectInterface/1.0")
271QT_END_NAMESPACE
272
273#endif // KDSOAPSERVEROBJECTINTERFACE_H
Definition: KDSoapDelayedResponseHandle.h:33
Definition: KDSoapMessage.h:192
Definition: KDSoapMessage.h:35
Definition: KDSoapServerObjectInterface.h:66
Definition: KDSoapValue.h:66

© 2010-2021 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 Thu Apr 9 2026 09:46:32 for KD SOAP by doxygen 1.9.6