34 #define PROG_NAME "xapian-progsrv"
35 #define PROG_DESC "Piped server for use with Xapian's remote backend"
40 static const char *
opts =
"t:w";
50 cout <<
"Usage: " PROG_NAME " [OPTIONS] DATABASE_DIRECTORY...\n\n"
52 " --timeout MSECS set timeout\n"
53 " --writable allow updates\n"
54 " --help display this help and exit\n"
55 " --version output version information and exit\n";
58 int main(
int argc,
char **argv)
60 double timeout = 60.0;
61 bool writable =
false;
62 bool syntax_error =
false;
77 cout <<
"timeout must be a non-negative integer\n";
81 timeout = temp * 1e-3;
91 if (syntax_error ||
optind == argc) {
Remote backend server base class.
void run()
Repeatedly accept messages from the client and process them.
static const char * dbnames
Wrappers to allow GNU getopt to be used cleanly from C++ code.
#define required_argument
int gnu_getopt_long(int argc_, char *const *argv_, const char *shortopts_, const struct option *longopts_, int *optind_)
Parse signed and unsigned type from string and check for trailing characters.
bool parse_unsigned(const char *p, T &res)
Xapian remote backend server base class.
int main(int argc, char **argv)
static const struct option long_opts[]