// -*- C++ -*-
/* This file is part of
-* ======================================================
+* ======================================================
*
* LyX, The Document Processor
*
-* Copyright (C) 1995 Matthias Ettrich
-* Copyright (C) 1995-1998 The LyX Team.
+* Copyright 1995 Matthias Ettrich
+* Copyright 1995-2000 The LyX Team.
*
-*======================================================*/
+* ====================================================== */
-#ifndef _LYXSERVER_H_
-#define _LYXSERVER_H_
+#ifndef LYXSERVER_H
+#define LYXSERVER_H
#ifdef __GNUG__
#pragma interface
typedef void (*ClientCallbackfct)(LyXServer *, string const &);
/// Construct with pipe-basename and callback to receive messages
- LyXComm(string const &pip, LyXServer * cli, ClientCallbackfct ccb = 0)
- :pipename(pip), client(cli), clientcb(ccb)
+ LyXComm(string const & pip, LyXServer * cli, ClientCallbackfct ccb = 0)
+ : pipename(pip), client(cli), clientcb(ccb)
{
ready = false;
openConnection();
/// Send message
void send(string const &);
+
+ /// We receive messages via XForms through this callback
+ static void callback(int fd, void *v);
+
private:
/// Open pipes
void openConnection();
/// Close pipes
void closeConnection();
- /// We receive messages via XForms through this callback
- static void callback(int fd, void *v);
-
/// This is -1 if not open
int infd;
// bufferview. We just have to find a way to handle situations like if
// lyxserver is using a buffer that is being edited with a bufferview.
// With a common buffer list this is not a problem, maybe. (Alejandro)
- LyXServer(LyXFunc *f, string const &pip)
+ LyXServer(LyXFunc * f, string const & pip)
: numclients(0), func(f), pipes(pip, (this), callback)
{ }
///
string clients[MAX_CLIENTS];
int numclients;
///
- LyXFunc *func;
+ LyXFunc * func;
///
LyXComm pipes;
};