QXmppVersionIq.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (C) 2008-2012 The QXmpp developers
  3. *
  4. * Author:
  5. * Jeremy Lainé
  6. *
  7. * Source:
  8. * http://code.google.com/p/qxmpp
  9. *
  10. * This file is a part of QXmpp library.
  11. *
  12. * This library is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU Lesser General Public
  14. * License as published by the Free Software Foundation; either
  15. * version 2.1 of the License, or (at your option) any later version.
  16. *
  17. * This library is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. * Lesser General Public License for more details.
  21. *
  22. */
  23. #ifndef QXMPPVERSIONIQ_H
  24. #define QXMPPVERSIONIQ_H
  25. #include "QXmppIq.h"
  26. /// \brief The QXmppVersionIq class represents an IQ for conveying a software
  27. /// version as defined by XEP-0092: Software Version.
  28. ///
  29. /// \ingroup Stanzas
  30. class QXMPP_EXPORT QXmppVersionIq : public QXmppIq
  31. {
  32. public:
  33. QString name() const;
  34. void setName(const QString &name);
  35. QString os() const;
  36. void setOs(const QString &os);
  37. QString version() const;
  38. void setVersion(const QString &version);
  39. /// \cond
  40. static bool isVersionIq(const QDomElement &element);
  41. /// \endcond
  42. protected:
  43. /// \cond
  44. void parseElementFromChild(const QDomElement &element);
  45. void toXmlElementFromChild(QXmlStreamWriter *writer) const;
  46. /// \endcond
  47. private:
  48. QString m_name;
  49. QString m_os;
  50. QString m_version;
  51. };
  52. #endif