QXmppStreamInitiationIq_p.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 QXMPPSTREAMINITIATIONIQ_P_H
  24. #define QXMPPSTREAMINITIATIONIQ_P_H
  25. #include <QDateTime>
  26. #include "QXmppDataForm.h"
  27. #include "QXmppIq.h"
  28. #include "QXmppTransferManager.h"
  29. //
  30. // W A R N I N G
  31. // -------------
  32. //
  33. // This file is not part of the QXmpp API. It exists for the convenience
  34. // of the QXmppTransferManager class.
  35. //
  36. // This header file may change from version to version without notice,
  37. // or even be removed.
  38. //
  39. // We mean it.
  40. //
  41. class QXMPP_AUTOTEST_EXPORT QXmppStreamInitiationIq : public QXmppIq
  42. {
  43. public:
  44. enum Profile {
  45. None = 0,
  46. FileTransfer,
  47. };
  48. QXmppDataForm featureForm() const;
  49. void setFeatureForm(const QXmppDataForm &form);
  50. QXmppTransferFileInfo fileInfo() const;
  51. void setFileInfo(const QXmppTransferFileInfo &info);
  52. QString mimeType() const;
  53. void setMimeType(const QString &mimeType);
  54. QXmppStreamInitiationIq::Profile profile() const;
  55. void setProfile(QXmppStreamInitiationIq::Profile profile);
  56. QString siId() const;
  57. void setSiId(const QString &id);
  58. static bool isStreamInitiationIq(const QDomElement &element);
  59. protected:
  60. /// \cond
  61. void parseElementFromChild(const QDomElement &element);
  62. void toXmlElementFromChild(QXmlStreamWriter *writer) const;
  63. /// \endcond
  64. private:
  65. QXmppDataForm m_featureForm;
  66. QXmppTransferFileInfo m_fileInfo;
  67. QString m_mimeType;
  68. Profile m_profile;
  69. QString m_siId;
  70. };
  71. #endif