common/progclient.h

Go to the documentation of this file.
00001 
00004 /* Copyright (C) 2007 Olly Betts
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of the
00009  * License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00019  */
00020 
00021 #ifndef XAPIAN_INCLUDED_PROGCLIENT_H
00022 #define XAPIAN_INCLUDED_PROGCLIENT_H
00023 
00024 #include <sys/types.h>
00025 
00026 #include "remote-database.h"
00027 
00034 class ProgClient : public RemoteDatabase {
00036     void operator=(const ProgClient &);
00037 
00039     ProgClient(const ProgClient &);
00040 
00041 #ifndef __WIN32__
00043     pid_t pid;
00044 #endif
00045 
00059     static int run_program(const std::string &progname,
00060                            const std::string &args
00061 #ifndef __WIN32__
00062                            , pid_t &pid
00063 #endif
00064                            );
00065 
00075     static std::string get_progcontext(const std::string &progname,
00076                                        const std::string &args);
00077 
00078   public:
00086     ProgClient(const std::string &progname,
00087                const std::string &arg,
00088                int msecs_timeout,
00089                bool writable);
00090 
00092     ~ProgClient();
00093 };
00094 
00095 #endif // XAPIAN_INCLUDED_PROGCLIENT_H

Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.