KD SOAP API Documentation: KDSoapServerObjectInterface.h Source File

| KD SOAP API Documentation 2.2

Loading...
Searching...
No Matches
KDSoapServerObjectInterface.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 KDSOAPSERVEROBJECTINTERFACE_H
11#define KDSOAPSERVEROBJECTINTERFACE_H
12
13#include "KDSoapDelayedResponseHandle.h"
14#include "KDSoapServerGlobal.h"
15#include <KDSoapClient/KDSoapMessage.h>
16
17#include <QIODevice>
18#include <QtCore/QByteArray>
19#include <QtCore/QObject>
20#include <QtCore/QVector>
21
22class KDSoapServerSocket;
23
24 QT_BEGIN_NAMESPACE
25class QAbstractSocket;
26 QT_END_NAMESPACE
27
59 class KDSOAPSERVER_EXPORT KDSoapServerObjectInterface
60{
61public:
65 KDSoapServerObjectInterface();
69 virtual ~KDSoapServerObjectInterface();
70
71 KDSoapServerObjectInterface(const KDSoapServerObjectInterface &) = delete;
72 KDSoapServerObjectInterface &operator=(const KDSoapServerObjectInterface &) = delete;
73
87 virtual void processRequest(const KDSoapMessage &request, KDSoapMessage &response, const QByteArray &soapAction);
88
101 virtual QIODevice *processFileRequest(const QString &path, QByteArray &contentType);
102
121 virtual void processRequestWithPath(const KDSoapMessage &request, KDSoapMessage &response, const QByteArray &soapAction, const QString &path);
122
123 struct KDSOAPSERVER_EXPORT HttpResponseHeaderItem
124 {
125 HttpResponseHeaderItem();
126 HttpResponseHeaderItem(const QByteArray &name, const QByteArray &value);
127 QByteArray m_value;
128 QByteArray m_name;
129 };
130
131 typedef QVector<HttpResponseHeaderItem> HttpResponseHeaderItems;
132
139 virtual HttpResponseHeaderItems additionalHttpResponseHeaderItems() const;
140
147 void doneProcessingRequestWithPath(const KDSoapServerObjectInterface &otherInterface);
148
154 KDSoapHeaders requestHeaders() const;
155
159 QByteArray soapAction() const;
160
164 void setResponseHeaders(const KDSoapHeaders &headers);
165
173 void setResponseNamespace(const QString &ns);
174
186 void setFault(const QString &faultCode, const QString &faultString, const QString &faultActor = QString(), const QString &detail = QString());
187
199 void setFault(const QString &faultCode, const QString &faultString, const QString &faultActor, const KDSoapValue &detail);
200
204 bool hasFault() const;
205
211 QAbstractSocket *serverSocket() const;
212
221 KDSoapDelayedResponseHandle prepareDelayedResponse(); // only valid during processRequest()
227 bool isDelayedResponse() const; // only valid during processRequest()
228
235 void sendDelayedResponse(const KDSoapDelayedResponseHandle &responseHandle, const KDSoapMessage &response);
236
243 void writeHTTP(const QByteArray &httpReply);
244
253 void writeXML(const QByteArray &reply, bool isFault = false);
254
255private:
256 friend class KDSoapServerSocket;
257 void setServerSocket(KDSoapServerSocket *serverSocket); // only valid during processRequest()
258 void setRequestHeaders(const KDSoapHeaders &headers, const QByteArray &soapAction);
259 KDSoapHeaders responseHeaders() const;
260 QString responseNamespace() const;
261 void storeFaultAttributes(KDSoapMessage &message) const;
262 class Private;
263 Private *const d;
264};
265
266QT_BEGIN_NAMESPACE
267Q_DECLARE_INTERFACE(KDSoapServerObjectInterface, "com.kdab.KDSoap.ServerObjectInterface/1.0")
268QT_END_NAMESPACE
269
270#endif // KDSOAPSERVEROBJECTINTERFACE_H
KDSoapDelayedResponseHandle.h
KDSoapMessage.h
KDSoapServerGlobal.h
KDSOAPSERVER_EXPORT
#define KDSOAPSERVER_EXPORT
Definition KDSoapServerGlobal.h:22
KDSoapDelayedResponseHandle
Definition KDSoapDelayedResponseHandle.h:27
KDSoapHeaders
Definition KDSoapMessage.h:185
KDSoapMessage
Definition KDSoapMessage.h:29
KDSoapServerObjectInterface
Definition KDSoapServerObjectInterface.h:60
KDSoapServerObjectInterface::HttpResponseHeaderItems
QVector< HttpResponseHeaderItem > HttpResponseHeaderItems
Definition KDSoapServerObjectInterface.h:131
KDSoapServerObjectInterface::isDelayedResponse
bool isDelayedResponse() const
KDSoapServerObjectInterface::KDSoapServerObjectInterface
KDSoapServerObjectInterface(const KDSoapServerObjectInterface &)=delete
KDSoapServerObjectInterface::operator=
KDSoapServerObjectInterface & operator=(const KDSoapServerObjectInterface &)=delete
KDSoapServerSocket
Definition KDSoapServerSocket_p.h:35
KDSoapValue
Definition KDSoapValue.h:60
QAbstractSocket
QByteArray
QIODevice
QObject::qobject_cast
T qobject_cast(QObject *object)
QString
QVector
KDSoapServerObjectInterface::HttpResponseHeaderItem
Definition KDSoapServerObjectInterface.h:124
KDSoapServerObjectInterface::HttpResponseHeaderItem::m_value
QByteArray m_value
Definition KDSoapServerObjectInterface.h:127
KDSoapServerObjectInterface::HttpResponseHeaderItem::m_name
QByteArray m_name
Definition KDSoapServerObjectInterface.h:128

© 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