#include <progclient.h>
Inheritance diagram for ProgClient:
Public Member Functions | |
ProgClient (const std::string &progname, const std::string &arg, int msecs_timeout, bool writable) | |
Constructor. | |
~ProgClient () | |
Destructor. | |
Private Member Functions | |
void | operator= (const ProgClient &) |
Don't allow assignment. | |
ProgClient (const ProgClient &) | |
Don't allow copying. | |
Static Private Member Functions | |
static int | run_program (const std::string &progname, const std::string &args, pid_t &pid) |
Start the child process. | |
static std::string | get_progcontext (const std::string &progname, const std::string &args) |
Generate context string for Xapian::Error exception objects. | |
Private Attributes | |
pid_t | pid |
Process id of the child process. |
ProgClient spawns a child process to connect to the server - for example, an ssh command to run the server on a remote host. Communication with the child process is via a pipe.
Definition at line 34 of file progclient.h.
ProgClient::ProgClient | ( | const ProgClient & | ) | [private] |
Don't allow copying.
ProgClient::ProgClient | ( | const std::string & | progname, | |
const std::string & | arg, | |||
int | msecs_timeout, | |||
bool | writable | |||
) |
Constructor.
progname | The program used to create the connection. | |
args | Any arguments to the program. | |
msecs_timeout | Timeout for communication (in milliseconds). | |
writable | Is this a WritableDatabase? |
ProgClient::~ProgClient | ( | ) |
Destructor.
Definition at line 239 of file progclient.cc.
References RemoteDatabase::do_close(), and pid.
void ProgClient::operator= | ( | const ProgClient & | ) | [private] |
Don't allow assignment.
static int ProgClient::run_program | ( | const std::string & | progname, | |
const std::string & | args, | |||
pid_t & | pid | |||
) | [static, private] |
Start the child process.
progname | The program used to create the connection. | |
args | Any arguments to the program. | |
pid | Reference to store the pid of the child process in. |
static std::string ProgClient::get_progcontext | ( | const std::string & | progname, | |
const std::string & | args | |||
) | [static, private] |
Generate context string for Xapian::Error exception objects.
progname | The program used to create the connection. | |
args | Any arguments to the program. |
pid_t ProgClient::pid [private] |
Process id of the child process.
Definition at line 43 of file progclient.h.
Referenced by ~ProgClient().