00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef XAPIAN_INCLUDED_DBFACTORY_H
00023
#define XAPIAN_INCLUDED_DBFACTORY_H
00024
00025
#include <string>
00026
00027
#include <xapian/types.h>
00028
#include <xapian/database.h>
00029
#include <xapian/version.h>
00030
00031
namespace Xapian {
00032
00033
namespace Auto {
00034
00042 Database open_stub(
const std::string &file);
00043
00053
inline Database open(
const std::string &path) {
00054
return Database(path);
00055 }
00056
00066
inline WritableDatabase open(
const std::string &path,
int action) {
00067
return WritableDatabase(path, action);
00068 }
00069
00070 }
00071
00072
#ifdef XAPIAN_HAS_INMEMORY_BACKEND
00073
namespace InMemory {
00074
00079 WritableDatabase open();
00080
00081 }
00082
#endif
00083
00084
#ifdef XAPIAN_HAS_MUSCAT36_BACKEND
00085
namespace Muscat36 {
00086
00094 Database open_da(
const std::string &R,
const std::string &T,
bool heavy_duty =
true);
00095
00108 Database open_da(
const std::string &R,
const std::string &T,
const std::string &values,
bool heavy_duty =
true);
00109
00118 Database open_db(
const std::string &DB, size_t cache_size = 30);
00119
00133 Database open_db(
const std::string &DB,
const std::string &values, size_t cache_size = 30);
00134
00135 }
00136
#endif
00137
00138
#ifdef XAPIAN_HAS_QUARTZ_BACKEND
00139
namespace Quartz {
00140
00145 Database open(
const std::string &dir);
00146
00165 WritableDatabase
00166 open(
const std::string &dir,
int action,
int block_size = 8192);
00167
00168 }
00169
#endif
00170
00171
#ifdef XAPIAN_HAS_FLINT_BACKEND
00172
namespace Flint {
00173
00178 Database open(
const std::string &dir);
00179
00198 WritableDatabase
00199 open(
const std::string &dir,
int action,
int block_size = 8192);
00200
00201 }
00202
#endif
00203
00204
#ifdef XAPIAN_HAS_REMOTE_BACKEND
00205
namespace Remote {
00206
00224 Database open(
const std::string &host,
unsigned int port, Xapian::timeout
timeout = 10000, Xapian::timeout connect_timeout = 0);
00225
00239 Database open(
const std::string &program,
const std::string &args, Xapian::timeout
timeout = 10000);
00240
00241 }
00242
#endif
00243
00244 }
00245
00246
#endif