#ifndef SERVER_H
#define SERVER_H
-#include <boost/signals/trackable.hpp>
+#include <boost/signals2/trackable.hpp>
+
+#include <vector>
#ifdef _WIN32
#include <windows.h>
a clean string interface.
*/
#ifndef _WIN32
-class LyXComm : public boost::signals::trackable {
+class LyXComm : public boost::signals2::trackable {
#else
class LyXComm : public QObject {
Q_OBJECT
void read_ready(DWORD);
#endif
+ /// Tell whether we asked another instance of LyX to open the files
+ bool deferredLoading() { return deferred_loading_; }
+
private:
/// the filename of the in pipe
std::string const inPipeName() const;
/// Close pipes
void closeConnection();
+ /// Load files in another running instance of LyX
+ bool loadFilesInOtherInstance();
+
#ifndef _WIN32
/// start a pipe
int startPipe(std::string const &, bool);
/// The client callback function
ClientCallbackfct clientcb_;
+
+ /// Did we defer loading of files to another instance?
+ bool deferred_loading_;
};
~Server();
///
void notifyClient(std::string const &);
+ ///
+ bool deferredLoadingToOtherInstance() { return pipes_.deferredLoading(); }
/// whilst crashing etc.
void emergencyCleanup() { pipes_.emergencyCleanup(); }
/// Implementation is in LyX.cpp
Server & theServer();
+/// Implementation is in LyX.cpp
+extern std::vector<std::string> & theFilesToLoad();
+
} // namespace lyx