TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.2 KiB

  1. /*******************************************************************
  2. KNotes -- Notes for the KDE project
  3. Copyright (c) 2003, Daniel Martin <>
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. In addition, as a special exception, the copyright holders give
  16. permission to link the code of this program with any edition of
  17. the TQt library by Trolltech AS, Norway (or with modified versions
  18. of TQt that use the same license as TQt), and distribute linked
  19. combinations including the two. You must obey the GNU General
  20. Public License in all respects for all of the code used other than
  21. TQt. If you modify this file, you may extend this exception to
  22. your version of the file, but you are not obligated to do so. If
  23. you do not wish to do so, delete this exception statement from
  24. your version.
  25. *******************************************************************/
  26. #ifndef KNOTESNETRECV_H
  27. #define KNOTESNETRECV_H
  28. #include <tqobject.h>
  29. class TQTimer;
  30. namespace KNetwork {
  31. class TDEBufferedSocket;
  32. }
  33. class KNotesNetworkReceiver : public TQObject
  34. {
  35. Q_OBJECT
  36. public:
  37. KNotesNetworkReceiver( KNetwork::TDEBufferedSocket * );
  38. ~KNotesNetworkReceiver();
  39. signals:
  40. void sigNoteReceived( const TQString &, const TQString & );
  41. private slots:
  42. void slotDataAvailable();
  43. void slotReceptionTimeout();
  44. void slotConnectionClosed();
  45. void slotError( int err );
  46. private:
  47. TQTimer *m_timer; // to avoid memory and connection floods
  48. TQByteArray *m_buffer;
  49. KNetwork::TDEBufferedSocket *m_sock;
  50. TQString m_titleAddon;
  51. };
  52. #endif