QXmppIbbIq.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright (C) 2008-2012 The QXmpp developers
  3. *
  4. * Authors:
  5. * Manjeet Dahiya
  6. * Jeremy Lainé
  7. *
  8. * Source:
  9. * http://code.google.com/p/qxmpp
  10. *
  11. * This file is a part of QXmpp library.
  12. *
  13. * This library is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU Lesser General Public
  15. * License as published by the Free Software Foundation; either
  16. * version 2.1 of the License, or (at your option) any later version.
  17. *
  18. * This library is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  21. * Lesser General Public License for more details.
  22. *
  23. */
  24. #ifndef QXMPPIBBIQ_H
  25. #define QXMPPIBBIQ_H
  26. #include "QXmppIq.h"
  27. class QXmppIbbOpenIq: public QXmppIq
  28. {
  29. public:
  30. QXmppIbbOpenIq();
  31. long blockSize() const;
  32. void setBlockSize( long block_size );
  33. QString sid() const;
  34. void setSid( const QString &sid );
  35. static bool isIbbOpenIq(const QDomElement &element);
  36. protected:
  37. /// \cond
  38. void parseElementFromChild(const QDomElement &element);
  39. void toXmlElementFromChild(QXmlStreamWriter *writer) const;
  40. /// \endcond
  41. private:
  42. long m_block_size;
  43. QString m_sid;
  44. };
  45. class QXmppIbbCloseIq: public QXmppIq
  46. {
  47. public:
  48. QXmppIbbCloseIq();
  49. QString sid() const;
  50. void setSid( const QString &sid );
  51. static bool isIbbCloseIq(const QDomElement &element);
  52. protected:
  53. /// \cond
  54. void parseElementFromChild(const QDomElement &element);
  55. void toXmlElementFromChild(QXmlStreamWriter *writer) const;
  56. /// \endcond
  57. private:
  58. QString m_sid;
  59. };
  60. class QXMPP_EXPORT QXmppIbbDataIq : public QXmppIq
  61. {
  62. public:
  63. QXmppIbbDataIq();
  64. quint16 sequence() const;
  65. void setSequence( quint16 seq );
  66. QString sid() const;
  67. void setSid( const QString &sid );
  68. QByteArray payload() const;
  69. void setPayload( const QByteArray &data );
  70. static bool isIbbDataIq(const QDomElement &element);
  71. protected:
  72. /// \cond
  73. void parseElementFromChild(const QDomElement &element);
  74. void toXmlElementFromChild(QXmlStreamWriter *writer) const;
  75. /// \endcond
  76. private:
  77. quint16 m_seq;
  78. QString m_sid;
  79. QByteArray m_payload;
  80. };
  81. #endif // QXMPPIBBIQS_H