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 XAPIAN_DEPRECATED(Database open(const std::string &path));
00054 inline Database open(const std::string &path) {
00055 return Database(path);
00056 }
00057
00067 XAPIAN_DEPRECATED(WritableDatabase open(const std::string &path, int action));
00068 inline WritableDatabase open(const std::string &path, int action) {
00069 return WritableDatabase(path, action);
00070 }
00071
00072 }
00073
00074 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
00075 namespace InMemory {
00076
00081 WritableDatabase open();
00082
00083 }
00084 #endif
00085
00086 #ifdef XAPIAN_HAS_MUSCAT36_BACKEND
00087 namespace Muscat36 {
00088
00096 Database open_da(const std::string &R, const std::string &T, bool heavy_duty = true);
00097
00110 Database open_da(const std::string &R, const std::string &T, const std::string &values, bool heavy_duty = true);
00111
00120 Database open_db(const std::string &DB, size_t cache_size = 30);
00121
00135 Database open_db(const std::string &DB, const std::string &values, size_t cache_size = 30);
00136
00137 }
00138 #endif
00139
00140 #ifdef XAPIAN_HAS_QUARTZ_BACKEND
00141 namespace Quartz {
00142
00147 Database open(const std::string &dir);
00148
00167 WritableDatabase
00168 open(const std::string &dir, int action, int block_size = 8192);
00169
00170 }
00171 #endif
00172
00173 #ifdef XAPIAN_HAS_FLINT_BACKEND
00174 namespace Flint {
00175
00180 Database open(const std::string &dir);
00181
00200 WritableDatabase
00201 open(const std::string &dir, int action, int block_size = 8192);
00202
00203 }
00204 #endif
00205
00206 #ifdef XAPIAN_HAS_REMOTE_BACKEND
00207 namespace Remote {
00208
00226 Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 0);
00227
00241 Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000);
00242
00243 }
00244 #endif
00245
00246 }
00247
00248 #endif