KD SOAP
KDSoapMessage.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2016 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 setMessageAddressingProperties(const KDSoapMessageAddressingProperties &map);
161 
167  bool hasMessageAddressingProperties() const;
168 
174  KDSoapMessageAddressingProperties messageAddressingProperties() const;
175 private:
176  bool isNull() const;
177  friend class KDSoapPendingCall;
178  friend class KDSoapServerSocket;
179  friend class KDSoapMessageWriter;
180  QSharedDataPointer<KDSoapMessageData> d;
181 };
182 
187 class KDSOAP_EXPORT KDSoapHeaders : public QList<KDSoapMessage> //krazy:exclude=dpointer
188 {
189 public:
193  KDSoapMessage header(const QString &name) const;
194 
198  KDSoapMessage header(const QString &name, const QString &namespaceUri) const;
199 };
200 
204 KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDSoapMessage &msg);
205 
206 Q_DECLARE_METATYPE(KDSoapMessage)
207 
208 #endif // KDSOAPMESSAGE_H
KDSoapValue & operator=(const KDSoapValue &other)
Definition: KDSoapValue.h:101
Use
Definition: KDSoapValue.h:233
Definition: KDSoapValue.h:61
Definition: KDSoapPendingCall.h:51
bool operator==(const KDSoapValue &other) const
Definition: KDSoapValue.cpp:124
Definition: KDSoapMessage.h:187
Definition: KDSoapMessageAddressingProperties.h:82
Definition: KDSoapMessage.h:41
bool isNull() const
Definition: KDSoapValue.cpp:78
bool operator!=(const KDSoapValue &other) const
Definition: KDSoapValue.cpp:129
Definition: KDSoapValue.h:279

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-soap/