PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/src/QXmppIncomingClient.h

http://qxmpp.googlecode.com/
C Header | 73 lines | 29 code | 14 blank | 30 comment | 0 complexity | 0ddf32bb86092aa3b36ad7ab6b4e46a2 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 QXMPPINCOMINGCLIENT_H
  24. #define QXMPPINCOMINGCLIENT_H
  25. #include "QXmppStream.h"
  26. class QXmppIncomingClientPrivate;
  27. class QXmppPasswordChecker;
  28. /// \brief Interface for password checkers.
  29. ///
  30. /// \brief The QXmppIncomingClient class represents an incoming XMPP stream
  31. /// from an XMPP client.
  32. ///
  33. class QXmppIncomingClient : public QXmppStream
  34. {
  35. Q_OBJECT
  36. public:
  37. QXmppIncomingClient(QSslSocket *socket, const QString &domain, QObject *parent = 0);
  38. ~QXmppIncomingClient();
  39. bool isConnected() const;
  40. QString jid() const;
  41. void setInactivityTimeout(int secs);
  42. void setPasswordChecker(QXmppPasswordChecker *checker);
  43. signals:
  44. /// This signal is emitted when an element is received.
  45. void elementReceived(const QDomElement &element);
  46. protected:
  47. /// \cond
  48. void handleStream(const QDomElement &element);
  49. void handleStanza(const QDomElement &element);
  50. /// \endcond
  51. private slots:
  52. void onDigestReply();
  53. void onPasswordReply();
  54. void onTimeout();
  55. private:
  56. Q_DISABLE_COPY(QXmppIncomingClient)
  57. QXmppIncomingClientPrivate* const d;
  58. };
  59. #endif