]> git.lyx.org Git - lyx.git/blobdiff - src/lyxserver.h
fix starting up which binary is really a symlink; make sure insetinclude file browser...
[lyx.git] / src / lyxserver.h
index 9390f5e23d012e17a03c3b31e1a183222b0f3ce3..4952411b1fd1da8cbf1d9e9592d99ee719805d81 100644 (file)
@@ -5,7 +5,7 @@
 *           LyX, The Document Processor
 *        
 *           Copyright 1995 Matthias Ettrich
-*           Copyright 1995-2000 The LyX Team.
+*           Copyright 1995-2001 The LyX Team.
 *
 * ====================================================== */
 
@@ -49,6 +49,9 @@ public:
                closeConnection();
        }
 
+       /// clean up in emergency
+       void emergencyCleanup();
        /// Send message
        void send(string const &);
 
@@ -56,12 +59,28 @@ public:
        static void callback(int fd, void *v);
 
 private:
+       /// the filename of the in pipe
+       string const inPipeName() {
+               return pipename + ".in";
+       }
+
+       /// the filename of the out pipe
+       string const outPipeName() {
+               return pipename + ".out";
+       }
+
        /// Open pipes
        void openConnection();
        
        /// Close pipes
        void closeConnection();
 
+       /// start a pipe
+       int startPipe(string const &, bool);
+       /// finish a pipe
+       void endPipe(int &, string const &);
        /// This is -1 if not open
        int infd;
 
@@ -103,6 +122,12 @@ public:
        ~LyXServer();
        ///
        void notifyClient(string const &);
+       
+       /// whilst crashing etc.
+       void emergencyCleanup() {
+               pipes.emergencyCleanup();
+       }
 private:
        ///
        static void callback(LyXServer *, string const & msg);