4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * \author João Luis M. Assirati
11 * Full author contact details are available in file CREDITS.
14 #ifndef SOCKET_CALLBACK_H
15 #define SOCKET_CALLBACK_H
18 #include <QSocketNotifier>
20 #include <boost/function.hpp>
26 * socket_callback - a simple wrapper for asynchronous socket notification
28 * This is used by the lyxsocket to notice the socket is ready to be
31 * FIXME: this code apparently will not work on Windows.
34 class SocketCallback : public QObject
39 /// connect a connection notification from the LyXServerSocket
40 SocketCallback(QObject * parent, int fd, boost::function<void()> func);
47 QSocketNotifier * sn_;
48 /// The callback function
49 boost::function<void()> func_;
55 #endif // SOCKET_CALLBACK_H