xapian-core  1.4.20
backendmanager_remote.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2008 Lemur Consulting Ltd
5  * Copyright (C) 2018 Olly Betts
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H
23 #define XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H
24 
25 #include "backendmanager.h"
26 
27 #include <string>
28 #include <vector>
29 
33  void operator=(const BackendManagerRemote &);
34 
37 
38  protected:
40 
41  public:
42  explicit BackendManagerRemote(BackendManager* sub_manager_)
43  : BackendManager(std::string()),
44  sub_manager(sub_manager_) {}
45 
47  std::string get_writable_database_args(const std::string & name,
48  const std::string & file);
49 
53  std::string get_writable_database_args(const std::string& path,
54  unsigned int timeout);
55 
57  std::string get_remote_database_args(const std::vector<std::string> & files,
58  unsigned int timeout);
59 
61  std::string get_remote_database_args(const std::string& name,
62  unsigned int timeout);
63 
66 
69 
71  std::string get_generated_database_path(const std::string& name);
72 
74  Xapian::WritableDatabase get_generated_database(const std::string& name);
75 };
76 
77 #endif // XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H
Xapian::WritableDatabase get_generated_database(const std::string &name)
Get generated database.
BackendManagerRemote(const BackendManagerRemote &)
Don&#39;t allow copying.
unsigned timeout
A timeout value in milliseconds.
Definition: types.h:100
STL namespace.
std::string get_writable_database_args(const std::string &name, const std::string &file)
Get the args for opening a remote database indexing a single file.
std::string get_writable_database_again_args()
Get the args for opening the last opened WritableDatabase again.
Base class for backend handling in test harness.
std::string get_writable_database_as_database_args()
Get the args for opening the last opened WritableDatabase.
This class provides read/write access to a database.
Definition: database.h:785
BackendManager * sub_manager
BackendManagerRemote(BackendManager *sub_manager_)
std::string get_generated_database_path(const std::string &name)
Get generated database path from sub_manager.
void operator=(const BackendManagerRemote &)
Don&#39;t allow assignment.
Definition: header.h:151
BackendManager subclass for remote databases.
std::string get_remote_database_args(const std::vector< std::string > &files, unsigned int timeout)
Get the args for opening a remote database with the specified timeout.