KD SOAP  1.10.0
KDSoapMessage.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Soap library.
4 **
5 ** SPDX-FileCopyrightText: 2010-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only 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 KDSOAPMESSAGE_H
17 #define KDSOAPMESSAGE_H
18 
19 #include <QtCore/QSharedDataPointer>
20 #include <QtCore/QVariant>
21 
22 #include "KDSoapValue.h"
23 #include "KDSoapMessageAddressingProperties.h"
24 
25 QT_BEGIN_NAMESPACE
26 class QString;
27 QT_END_NAMESPACE
28 class KDSoapMessageData;
29 class KDSoapHeaders;
30 
34 class KDSOAP_EXPORT KDSoapMessage : public KDSoapValue
35 {
36 public:
40  KDSoapMessage();
44  ~KDSoapMessage();
45 
49  KDSoapMessage(const KDSoapMessage &other);
53  KDSoapMessage &operator=(const KDSoapMessage &other);
54 
58  KDSoapMessage &operator=(const KDSoapValue &other);
59 
63  bool operator==(const KDSoapMessage &other) const;
64 
68  bool operator!=(const KDSoapMessage &other) const;
69 
74  void setUse(Use use);
78  Use use() const;
79 
96  void addArgument(const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace = QString(), const QString &typeName = QString());
97 
113  void addArgument(const QString &argumentName, const KDSoapValueList &argumentValueList, const QString &typeNameSpace = QString(), const QString &typeName = QString());
114 
119  KDSoapValueList &arguments();
120 
125  const KDSoapValueList &arguments() const;
126 
134  bool isFault() const;
135 
139  QString faultAsString() const;
140 
145  void setFault(bool fault);
146 
153  void createFaultMessage(const QString &faultCode, const QString &faultText, KDSoap::SoapVersion soapVersion);
154 
161  void setMessageAddressingProperties(const KDSoapMessageAddressingProperties &map);
162 
168  bool hasMessageAddressingProperties() const;
169 
175  KDSoapMessageAddressingProperties messageAddressingProperties() const;
176 private:
177  bool isNull() const;
178  friend class KDSoapPendingCall;
179  friend class KDSoapServerSocket;
180  friend class KDSoapMessageWriter;
181  QSharedDataPointer<KDSoapMessageData> d;
182 };
183 
188 class KDSOAP_EXPORT KDSoapHeaders : public QList<KDSoapMessage> //krazy:exclude=dpointer
189 {
190 public:
194  KDSoapMessage header(const QString &name) const;
195 
199  KDSoapMessage header(const QString &name, const QString &namespaceUri) const;
200 };
201 
205 KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDSoapMessage &msg);
206 
207 Q_DECLARE_METATYPE(KDSoapMessage)
208 Q_DECLARE_METATYPE(KDSoapHeaders)
209 
210 #endif // KDSOAPMESSAGE_H
KDSoapValue & operator=(const KDSoapValue &other)
Definition: KDSoapValue.h:109
Use
Definition: KDSoapValue.h:278
Definition: KDSoapValue.h:69
Definition: KDSoapPendingCall.h:44
bool operator==(const KDSoapValue &other) const
Definition: KDSoapValue.cpp:150
Definition: KDSoapMessage.h:188
Definition: KDSoapMessageAddressingProperties.h:76
Definition: KDSoapMessage.h:34
bool isNull() const
Definition: KDSoapValue.cpp:74
bool operator!=(const KDSoapValue &other) const
Definition: KDSoapValue.cpp:155
Definition: KDSoapValue.h:330

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/