KD SOAP
 All Classes Functions Enumerations Enumerator Pages
KDSoapMessage.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2013 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Soap library.
5 **
6 ** Licensees holding valid commercial KD Soap licenses may use this file in
7 ** accordance with the KD Soap Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU Lesser General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 #ifndef KDSOAPMESSAGE_H
23 #define KDSOAPMESSAGE_H
24 
25 #include <QtCore/QSharedDataPointer>
26 #include <QtCore/QVariant>
27 #include "KDSoapValue.h"
28 QT_BEGIN_NAMESPACE
29 class QString;
30 QT_END_NAMESPACE
31 class KDSoapMessageData;
32 class KDSoapHeaders;
33 
37 class KDSOAP_EXPORT KDSoapMessage : public KDSoapValue
38 {
39 public:
43  KDSoapMessage();
47  ~KDSoapMessage();
48 
52  KDSoapMessage(const KDSoapMessage& other);
56  KDSoapMessage &operator=(const KDSoapMessage &other);
57 
61  KDSoapMessage &operator=(const KDSoapValue &other);
62 
66  bool operator==(const KDSoapMessage &other) const;
67 
71  bool operator!=(const KDSoapMessage &other) const;
72 
77  void setUse(Use use);
81  Use use() const;
82 
99  void addArgument(const QString& argumentName, const QVariant& argumentValue, const QString& typeNameSpace = QString(), const QString& typeName = QString());
100 
116  void addArgument(const QString& argumentName, const KDSoapValueList& argumentValueList, const QString& typeNameSpace = QString(), const QString& typeName = QString());
117 
122  KDSoapValueList& arguments();
123 
128  const KDSoapValueList& arguments() const;
129 
137  bool isFault() const;
138 
142  QString faultAsString() const;
143 
148  void setFault(bool fault);
149 
150 private:
151  bool isNull() const;
152  friend class KDSoapPendingCall;
153  friend class KDSoapServerSocket;
154  friend class KDSoapMessageWriter;
155  QSharedDataPointer<KDSoapMessageData> d;
156 };
157 
162 class KDSOAP_EXPORT KDSoapHeaders : public QList<KDSoapMessage>
163 {
164 public:
168  KDSoapMessage header(const QString& name) const;
169 
173  KDSoapMessage header(const QString& name, const QString& namespaceUri) const;
174 };
175 
179 KDSOAP_EXPORT QDebug operator<<(QDebug dbg, const KDSoapMessage &msg);
180 
181 Q_DECLARE_METATYPE(KDSoapMessage)
182 
183 #endif // KDSOAPMESSAGE_H

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