3 * Copyright 2002 the LyX Team
4 * Read the file COPYING
7 * \author John Levon <moz@compsoc.man.ac.uk>
15 #include "lyxserver.h"
17 #include <qsocketnotifier.h>
20 * io_callback - a simple wrapper for asynchronous pipe notification
22 * This is used by the lyxserver to notice the pipe is ready to be
25 * FIXME: this code apparently will not work on Windows.
27 class io_callback : public QObject {
30 /// connect a read ready notification for fd to the LyXComm
31 io_callback(int fd, LyXComm * comm)
33 QSocketNotifier * sn = new QSocketNotifier(fd,
34 QSocketNotifier::Read, this);
35 connect(sn, SIGNAL(activated(int)), this, SLOT(data_received()));
39 void data_received() {
47 #endif // IO_CALLBACK_H