KD SOAP  1.9.1
KDSoapMessage.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
3 ** All rights reserved.
4 **
5 ** This file is part of the KD Soap library.
6 **
7 ** Licensees holding valid commercial KD Soap licenses may use this file in
8 ** accordance with the KD Soap Commercial License Agreement provided with
9 ** the Software.
10 **
11 **
12 ** This file may be distributed and/or modified under the terms of the
13 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
14 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
15 **
16 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 **
19 ** Contact info@kdab.com if any conditions of this licensing are not
20 ** clear to you.
21 **
22 **********************************************************************/
23 #ifndef KDSOAPMESSAGE_H
24 #define KDSOAPMESSAGE_H
25 
26 #include <QtCore/QSharedDataPointer>
27 #include <QtCore/QVariant>
28 
29 #include "KDSoapValue.h"
30 #include "KDSoapMessageAddressingProperties.h"
31 
32 QT_BEGIN_NAMESPACE
33 class QString;
34 QT_END_NAMESPACE
35 class KDSoapMessageData;
36 class KDSoapHeaders;
37 
41 class KDSOAP_EXPORT KDSoapMessage : public KDSoapValue
42 {
43 public:
47  KDSoapMessage();
51  ~KDSoapMessage();
52 
56  KDSoapMessage(const KDSoapMessage &other);
60  KDSoapMessage &operator=(const KDSoapMessage &other);
61 
65  KDSoapMessage &operator=(const KDSoapValue &other);
66 
70  bool operator==(const KDSoapMessage &other) const;
71 
75  bool operator!=(const KDSoapMessage &other) const;
76 
81  void setUse(Use use);
85  Use use() const;
86 
103  void addArgument(const QString &argumentName, const QVariant &argumentValue, const QString &typeNameSpace = QString(), const QString &typeName = QString());
104 
120  void addArgument(const QString &argumentName, const KDSoapValueList &argumentValueList, const QString &typeNameSpace = QString(), const QString &typeName = QString());
121 
126  KDSoapValueList &arguments();
127 
132  const KDSoapValueList &arguments() const;
133 
141  bool isFault() const;
142 
146  QString faultAsString() const;
147 
152  void setFault(bool fault);
153 
160  void createFaultMessage(const QString &faultCode, const QString &faultText, KDSoap::SoapVersion soapVersion);
161 
168  void setMessageAddressingProperties(const KDSoapMessageAddressingProperties &map);
169 
175  bool hasMessageAddressingProperties() const;
176 
182  KDSoapMessageAddressingProperties messageAddressingProperties() const;
183 private:
184  bool isNull() const;
185  friend class KDSoapPendingCall;
186  friend class KDSoapServerSocket;
187  friend class KDSoapMessageWriter;
188  QSharedDataPointer<KDSoapMessageData> d;
189 };
190 
195 class KDSOAP_EXPORT KDSoapHeaders : public QList<KDSoapMessage> //krazy:exclude=dpointer
196 {
197 public:
201  KDSoapMessage header(const QString &name) const;
202 
206  KDSoapMessage header(const QString &name, const QString &namespaceUri) const;
207 };
208 
212 KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDSoapMessage &msg);
213 
214 Q_DECLARE_METATYPE(KDSoapMessage)
215 Q_DECLARE_METATYPE(KDSoapHeaders)
216 
217 #endif // KDSOAPMESSAGE_H
KDSoapValue & operator=(const KDSoapValue &other)
Definition: KDSoapValue.h:116
Use
Definition: KDSoapValue.h:285
Definition: KDSoapValue.h:76
Definition: KDSoapPendingCall.h:51
bool operator==(const KDSoapValue &other) const
Definition: KDSoapValue.cpp:157
Definition: KDSoapMessage.h:195
Definition: KDSoapMessageAddressingProperties.h:83
Definition: KDSoapMessage.h:41
bool isNull() const
Definition: KDSoapValue.cpp:81
bool operator!=(const KDSoapValue &other) const
Definition: KDSoapValue.cpp:162
Definition: KDSoapValue.h:337

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/