xapian-core  1.4.26
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:
43  const std::string& dbtype_)
44  : BackendManager(std::string(), dbtype_),
45  sub_manager(sub_manager_) {}
46 
48  std::string get_writable_database_args(const std::string & name,
49  const std::string & file);
50 
54  std::string get_writable_database_args(const std::string& path,
55  unsigned int timeout);
56 
58  std::string get_remote_database_args(const std::vector<std::string> & files,
59  unsigned int timeout);
60 
62  std::string get_remote_database_args(const std::string& name,
63  unsigned int timeout);
64 
67 
70 
72  std::string get_generated_database_path(const std::string& name);
73 
75  Xapian::WritableDatabase get_generated_database(const std::string& name);
76 };
77 
78 #endif // XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H
Xapian::WritableDatabase get_generated_database(const std::string &name)
Get generated database.
BackendManagerRemote(BackendManager *sub_manager_, const std::string &dbtype_)
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:789
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.