3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * \author João Luis M. Assirati
10 * Full author contact details are available in file CREDITS.
16 #include "lyxsocket.h"
17 #include "socket_callback.h"
20 socket_callback::socket_callback(LyXServerSocket * server)
23 sn_.reset(new QSocketNotifier(server->fd(), QSocketNotifier::Read, this));
24 connect(sn_.get(), SIGNAL(activated(int)), this, SLOT(server_received()));
27 socket_callback::socket_callback(LyXDataSocket * data)
30 sn_.reset(new QSocketNotifier(data->fd(), QSocketNotifier::Read, this));
31 connect(sn_.get(), SIGNAL(activated(int)), this, SLOT(data_received()));
35 void socket_callback::server_received()
37 server_->serverCallback();
40 void socket_callback::data_received()
42 data_->server()->dataCallback(data_);