KD SOAP
 All Classes Functions Enumerations Enumerator Pages
KDSoapMessage.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2014 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 #include "KDSoapValue.h"
29 QT_BEGIN_NAMESPACE
30 class QString;
31 QT_END_NAMESPACE
32 class KDSoapMessageData;
33 class KDSoapHeaders;
34 
38 class KDSOAP_EXPORT KDSoapMessage : public KDSoapValue
39 {
40 public:
44  KDSoapMessage();
48  ~KDSoapMessage();
49 
53  KDSoapMessage(const KDSoapMessage& other);
57  KDSoapMessage &operator=(const KDSoapMessage &other);
58 
62  KDSoapMessage &operator=(const KDSoapValue &other);
63 
67  bool operator==(const KDSoapMessage &other) const;
68 
72  bool operator!=(const KDSoapMessage &other) const;
73 
78  void setUse(Use use);
82  Use use() const;
83 
100  void addArgument(const QString& argumentName, const QVariant& argumentValue, const QString& typeNameSpace = QString(), const QString& typeName = QString());
101 
117  void addArgument(const QString& argumentName, const KDSoapValueList& argumentValueList, const QString& typeNameSpace = QString(), const QString& typeName = QString());
118 
123  KDSoapValueList& arguments();
124 
129  const KDSoapValueList& arguments() const;
130 
138  bool isFault() const;
139 
143  QString faultAsString() const;
144 
149  void setFault(bool fault);
150 
151 private:
152  bool isNull() const;
153  friend class KDSoapPendingCall;
154  friend class KDSoapServerSocket;
155  friend class KDSoapMessageWriter;
156  QSharedDataPointer<KDSoapMessageData> d;
157 };
158 
163 class KDSOAP_EXPORT KDSoapHeaders : public QList<KDSoapMessage> //krazy:exclude=dpointer
164 {
165 public:
169  KDSoapMessage header(const QString& name) const;
170 
174  KDSoapMessage header(const QString& name, const QString& namespaceUri) const;
175 };
176 
180 KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDSoapMessage &msg);
181 
182 Q_DECLARE_METATYPE(KDSoapMessage)
183 
184 #endif // KDSOAPMESSAGE_H

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