2002-02-27 09:59:52 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-21 21:21:28 +00:00
|
|
|
/**
|
2002-02-27 09:59:52 +00:00
|
|
|
* \file ControlForks.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-02-27 09:59:52 +00:00
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2002-02-27 09:59:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLFORKS_H
|
|
|
|
#define CONTROLFORKS_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ControlDialog_impl.h"
|
|
|
|
#include "LString.h"
|
2002-05-29 16:21:03 +00:00
|
|
|
|
|
|
|
#include <boost/signals/connection.hpp>
|
|
|
|
|
2002-02-27 09:59:52 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
/** A controller for dialogs that display the child processes forked by LyX.
|
|
|
|
Also provides an interface enabling them to be killed prematurely.
|
|
|
|
*/
|
|
|
|
class ControlForks : public ControlDialogBI {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
ControlForks(LyXView &, Dialogs &);
|
|
|
|
///
|
|
|
|
std::vector<pid_t> const getPIDs() const;
|
|
|
|
///
|
|
|
|
string const getCommand(pid_t) const;
|
|
|
|
///
|
|
|
|
void kill(pid_t);
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
virtual void apply();
|
|
|
|
/// disconnect from the ForkedcallsController
|
|
|
|
virtual void clearParams();
|
|
|
|
/// connect to the ForkedcallsController
|
|
|
|
virtual void setParams();
|
|
|
|
/// Connection to the ForkedcallsController signal
|
2002-05-29 16:21:03 +00:00
|
|
|
boost::signals::connection childrenChanged_;
|
2002-02-27 09:59:52 +00:00
|
|
|
/// The list of PIDs to kill
|
|
|
|
std::vector<string> pids_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLFORKS_H
|