X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FServer.cpp;h=6a6ed2f837a8be8a57a48dbe5248d01368a32624;hb=604a3341d9bd6b6bee6f042292f28b89027ca2b5;hp=4efa37948b3aecfc26db90a70ece75348a2f4555;hpb=a1e991a82ea76d66aaca4e781df920d20bed59b0;p=lyx.git diff --git a/src/Server.cpp b/src/Server.cpp index 4efa37948b..6a6ed2f837 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -34,7 +34,7 @@ received LyX will inform the client that it's listening its messages, and 'bye' will inform that lyx is closing. - See development/server_monitor.c for an example client. + See development/lyxserver/server_monitor.cpp for an example client. Purpose: implement a client/server lib for LyX */ @@ -44,8 +44,8 @@ #include "DispatchResult.h" #include "FuncRequest.h" +#include "LyX.h" #include "LyXAction.h" -#include "LyXFunc.h" #include "frontends/Application.h" @@ -55,7 +55,7 @@ #include "support/lstrings.h" #include "support/os.h" -#include +#include "support/bind.h" #ifdef _WIN32 #include @@ -840,7 +840,7 @@ int LyXComm::startPipe(string const & file, bool write) if (!write) { theApp()->registerSocketCallback(fd, - boost::bind(&LyXComm::read_ready, this)); + bind(&LyXComm::read_ready, this)); } return fd; @@ -988,8 +988,8 @@ void ServerCallback(Server * server, string const & msg) server->callback(msg); } -Server::Server(LyXFunc * f, string const & pipes) - : numclients_(0), func_(f), pipes_(pipes, this, &ServerCallback) +Server::Server(string const & pipes) + : numclients_(0), pipes_(pipes, this, &ServerCallback) {} @@ -1110,12 +1110,12 @@ void Server::callback(string const & msg) // The correct solution would be to have a // specialized (non-gui) BufferView. But how do // we do it now? Probably we should just let it - // connect to the lyxfunc in the single LyXView we + // connect to the lyxfunc in the single GuiView we // support currently. (Lgb) FuncRequest const fr(lyxaction.lookupFunc(cmd), arg); DispatchResult dr; - func_->dispatch(fr, dr); + theApp()->dispatch(fr, dr); string const rval = to_utf8(dr.message()); // all commands produce an INFO or ERROR message