QXmppIbbIq.h

    00001 /*
    00002  * Copyright (C) 2008-2011 The QXmpp developers
    00003  *
    00004  * Authors:
    00005  *  Manjeet Dahiya
    00006  *  Jeremy Lainé
    00007  *
    00008  * Source:
    00009  *  http://code.google.com/p/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 QDomElement;
    00031 class QXmlStreamWriter;
    00032
    00033 class QXmppIbbOpenIq: public QXmppIq
    00034 {
    00035 public:
    00036     QXmppIbbOpenIq();
    00037
    00038     long blockSize() const;
    00039     void setBlockSize( long block_size );
    00040
    00041     QString sid() const;
    00042     void setSid( const QString &sid );
    00043
    00044     static bool isIbbOpenIq(const QDomElement &element);
    00045
    00046 protected:
    00048     void parseElementFromChild(const QDomElement &element);
    00049     void toXmlElementFromChild(QXmlStreamWriter *writer) const;
    00051
    00052 private:
    00053     long m_block_size;
    00054     QString m_sid;
    00055 };
    00056
    00057 class QXmppIbbCloseIq: public QXmppIq
    00058 {
    00059 public:
    00060     QXmppIbbCloseIq();
    00061
    00062     QString sid() const;
    00063     void setSid( const QString &sid );
    00064
    00065     static bool isIbbCloseIq(const QDomElement &element);
    00066
    00067 protected:
    00069     void parseElementFromChild(const QDomElement &element);
    00070     void toXmlElementFromChild(QXmlStreamWriter *writer) const;
    00072
    00073 private:
    00074     QString m_sid;
    00075 };
    00076
    00077 class QXmppIbbDataIq : public QXmppIq
    00078 {
    00079 public:
    00080     QXmppIbbDataIq();
    00081
    00082     quint16 sequence() const;
    00083     void setSequence( quint16 seq );
    00084
    00085     QString sid() const;
    00086     void setSid( const QString &sid );
    00087
    00088     QByteArray payload() const;
    00089     void setPayload( const QByteArray &data );
    00090
    00091     static bool isIbbDataIq(const QDomElement &element);
    00092
    00093 protected:
    00095     void parseElementFromChild(const QDomElement &element);
    00096     void toXmlElementFromChild(QXmlStreamWriter *writer) const;
    00098
    00099 private:
    00100     quint16 m_seq;
    00101     QString m_sid;
    00102     QByteArray m_payload;
    00103 };
    00104
    00105 #endif // QXMPPIBBIQS_H

All Classes Functions Enumerations Enumerator Properties