]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/io_callback.h
dont use pragma impementation and interface anymore
[lyx.git] / src / frontends / qt2 / io_callback.h
1 // -*- C++ -*-
2 /**
3  * \file io_callback.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef IO_CALLBACK_H
14 #define IO_CALLBACK_H
15
16
17 #include <qobject.h>
18 #include <qsocketnotifier.h>
19 #include <boost/scoped_ptr.hpp>
20
21 class LyXComm;
22
23 /**
24  * io_callback - a simple wrapper for asynchronous pipe notification
25  *
26  * This is used by the lyxserver to notice the pipe is ready to be
27  * read.
28  *
29  * FIXME: this code apparently will not work on Windows.
30  */
31 class io_callback : public QObject {
32         Q_OBJECT
33 public:
34         /// connect a read ready notification for fd to the LyXComm
35         io_callback(int fd, LyXComm * comm);
36 public slots:
37         void data_received();
38 private:
39         /// our notifier
40         boost::scoped_ptr<QSocketNotifier> sn_;
41
42         LyXComm * comm_;
43 };
44
45 #endif // IO_CALLBACK_H