PageRenderTime 35ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/src/QXmppIncomingServer.h

http://qxmpp.googlecode.com/
C Header | 69 lines | 27 code | 13 blank | 29 comment | 0 complexity | ef8a4c373cb348c4037e1243d9e3fcb7 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /*
  2. * Copyright (C) 2008-2011 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 QXMPPINCOMINGSERVER_H
  24. #define QXMPPINCOMINGSERVER_H
  25. #include "QXmppStream.h"
  26. class QXmppDialback;
  27. class QXmppIncomingServerPrivate;
  28. class QXmppOutgoingServer;
  29. /// \brief The QXmppIncomingServer class represents an incoming XMPP stream
  30. /// from an XMPP server.
  31. ///
  32. class QXmppIncomingServer : public QXmppStream
  33. {
  34. Q_OBJECT
  35. public:
  36. QXmppIncomingServer(QSslSocket *socket, const QString &domain, QObject *parent);
  37. ~QXmppIncomingServer();
  38. bool isConnected() const;
  39. QString localStreamId() const;
  40. signals:
  41. /// This signal is emitted when a dialback verify request is received.
  42. void dialbackRequestReceived(const QXmppDialback &result);
  43. /// This signal is emitted when an element is received.
  44. void elementReceived(const QDomElement &element);
  45. protected:
  46. /// \cond
  47. void handleStanza(const QDomElement &stanzaElement);
  48. void handleStream(const QDomElement &streamElement);
  49. /// \endcond
  50. private slots:
  51. void slotDialbackResponseReceived(const QXmppDialback &dialback);
  52. private:
  53. Q_DISABLE_COPY(QXmppIncomingServer)
  54. QXmppIncomingServerPrivate* const d;
  55. };
  56. #endif