QXmpp
Version:0.9.3
|
00001 /* 00002 * Copyright (C) 2008-2014 The QXmpp developers 00003 * 00004 * Authors: 00005 * Manjeet Dahiya 00006 * Jeremy Lainé 00007 * 00008 * Source: 00009 * https://github.com/qxmpp-project/qxmpp 00010 * 00011 * This file is a part of QXmpp library. 00012 * 00013 * This library is free software; you can redistribute it and/or 00014 * modify it under the terms of the GNU Lesser General Public 00015 * License as published by the Free Software Foundation; either 00016 * version 2.1 of the License, or (at your option) any later version. 00017 * 00018 * This library is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 * Lesser General Public License for more details. 00022 * 00023 */ 00024 00025 #ifndef QXMPPIBBIQ_H 00026 #define QXMPPIBBIQ_H 00027 00028 #include "QXmppIq.h" 00029 00030 class QXmppIbbOpenIq: public QXmppIq 00031 { 00032 public: 00033 QXmppIbbOpenIq(); 00034 00035 long blockSize() const; 00036 void setBlockSize( long block_size ); 00037 00038 QString sid() const; 00039 void setSid( const QString &sid ); 00040 00041 static bool isIbbOpenIq(const QDomElement &element); 00042 00043 protected: 00045 void parseElementFromChild(const QDomElement &element); 00046 void toXmlElementFromChild(QXmlStreamWriter *writer) const; 00048 00049 private: 00050 long m_block_size; 00051 QString m_sid; 00052 }; 00053 00054 class QXmppIbbCloseIq: public QXmppIq 00055 { 00056 public: 00057 QXmppIbbCloseIq(); 00058 00059 QString sid() const; 00060 void setSid( const QString &sid ); 00061 00062 static bool isIbbCloseIq(const QDomElement &element); 00063 00064 protected: 00066 void parseElementFromChild(const QDomElement &element); 00067 void toXmlElementFromChild(QXmlStreamWriter *writer) const; 00069 00070 private: 00071 QString m_sid; 00072 }; 00073 00074 class QXMPP_EXPORT QXmppIbbDataIq : public QXmppIq 00075 { 00076 public: 00077 QXmppIbbDataIq(); 00078 00079 quint16 sequence() const; 00080 void setSequence( quint16 seq ); 00081 00082 QString sid() const; 00083 void setSid( const QString &sid ); 00084 00085 QByteArray payload() const; 00086 void setPayload( const QByteArray &data ); 00087 00088 static bool isIbbDataIq(const QDomElement &element); 00089 00090 protected: 00092 void parseElementFromChild(const QDomElement &element); 00093 void toXmlElementFromChild(QXmlStreamWriter *writer) const; 00095 00096 private: 00097 quint16 m_seq; 00098 QString m_sid; 00099 QByteArray m_payload; 00100 }; 00101 00102 #endif // QXMPPIBBIQS_H