1 /** @file backendmanager_remote.h
2 * @brief BackendManager subclass for remote databases.
4 /* Copyright (C) 2008 Lemur Consulting Ltd
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H
22 #define XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H
24 #include "backendmanager.h"
29 /// BackendManager subclass for remote databases.
30 class BackendManagerRemote
: public BackendManager
{
31 /// Don't allow assignment.
32 void operator=(const BackendManagerRemote
&);
34 /// Don't allow copying.
35 BackendManagerRemote(const BackendManagerRemote
&);
37 /// The path of the last writable database used.
38 std::string last_wdb_name
;
41 /// The type of the remote database to use.
42 std::string remote_type
;
45 BackendManagerRemote(const std::string
& remote_type_
);
47 /// Get the args for opening a remote database indexing a single file.
48 std::string
get_writable_database_args(const std::string
& name
,
49 const std::string
& file
);
51 /// Get the args for opening a remote database with the specified timeout.
52 std::string
get_remote_database_args(const std::vector
<std::string
> & files
,
53 unsigned int timeout
);
55 /// Get the args for opening the last opened WritableDatabase.
56 std::string
get_writable_database_as_database_args();
58 /// Get the args for opening the last opened WritableDatabase again.
59 std::string
get_writable_database_again_args();
62 #endif // XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H