KDSoapMessage.h

00001 /****************************************************************************
00002 ** Copyright (C) 2010-2010 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD SOAP library.
00005 **
00006 ** Licensees holding valid commercial KD Soap licenses may use this file in
00007 ** accordance with the KD Soap Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #ifndef KDSOAPMESSAGE_H
00024 #define KDSOAPMESSAGE_H
00025 
00026 #include <QSharedDataPointer>
00027 #include <QVariant>
00028 #include "KDSoapValue.h"
00029 class QString;
00030 class KDSoapMessageData;
00031 class QXmlStreamWriter;
00032 
00036 class KDSOAP_EXPORT KDSoapMessage : public KDSoapValue
00037 {
00038 public:
00042     KDSoapMessage();
00046     ~KDSoapMessage();
00047 
00051     KDSoapMessage(const KDSoapMessage& other);
00055     KDSoapMessage &operator=(const KDSoapMessage &other);
00056 
00061     enum Use
00062     {
00063       LiteralUse, 
00064       EncodedUse  
00065     };
00066 
00071     void setUse(Use use);
00075     Use use() const;
00076 
00091     void addArgument(const QString& argumentName, const QVariant& argumentValue, const QString& typeNameSpace = QString(), const QString& typeName = QString());
00092 
00106     void addArgument(const QString& argumentName, const KDSoapValueList& argumentValueList, const QString& typeNameSpace = QString(), const QString& typeName = QString());
00107 
00112     KDSoapValueList& arguments();
00113 
00118     const KDSoapValueList& arguments() const;
00119 
00124     bool isFault() const;
00125 
00129     QString faultAsString() const;
00130 
00131 private:
00132     friend class KDSoapClientInterface;
00133     friend class KDSoapPendingCall;
00134     friend QDebug operator<<(QDebug dbg, const KDSoapMessage &msg);
00135     void setFault(bool fault);
00136 
00137     QSharedDataPointer<KDSoapMessageData> d;
00138 };
00139 
00144 class KDSoapHeaders : public QList<KDSoapMessage>
00145 {
00146 };
00147 
00151 QDebug operator<<(QDebug dbg, const KDSoapMessage &msg);
00152 
00153 #endif // KDSOAPMESSAGE_H
 All Classes Functions Enumerations Enumerator Friends

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