PageRenderTime 58ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/gadu_protocol/socket-notifiers/gadu-token-socket-notifiers.h

https://gitlab.com/mziab/kadu
C Header | 57 lines | 25 code | 13 blank | 19 comment | 0 complexity | 9a1ae9acb213a5359e3133c05703a34c MD5 | raw file
Possible License(s): LGPL-2.1, GPL-3.0, BSD-3-Clause, CC-BY-3.0, GPL-2.0
  1. /*
  2. * %kadu copyright begin%
  3. * Copyright 2011 Bartosz Brachaczek (b.brachaczek@gmail.com)
  4. * Copyright 2011 Rafał Przemysław Malinowski (rafal.przemyslaw.malinowski@gmail.com)
  5. * %kadu copyright end%
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef GADU_TOKEN_SOCKET_NOTIFIERS_H
  21. #define GADU_TOKEN_SOCKET_NOTIFIERS_H
  22. #include <QtGui/QPixmap>
  23. #include <libgadu.h>
  24. #include "gadu-socket-notifiers.h"
  25. class GaduTokenSocketNotifiers : public GaduSocketNotifiers
  26. {
  27. Q_OBJECT
  28. struct gg_http *H;
  29. void finished(const QString &tokenId, const QPixmap &tokenPixmap);
  30. protected:
  31. virtual bool checkRead();
  32. virtual bool checkWrite();
  33. virtual void socketEvent();
  34. virtual int timeout();
  35. virtual bool handleSoftTimeout();
  36. virtual void connectionTimeout();
  37. public:
  38. GaduTokenSocketNotifiers(QObject *parent = 0)
  39. : GaduSocketNotifiers(parent), H(0) {}
  40. void watchFor(struct gg_http *h);
  41. signals:
  42. void done(const QString &, const QPixmap &);
  43. };
  44. #endif // GADU_TOKEN_SOCKET_NOTIFIERS_H