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/version.h>
00029 #include <xapian/visibility.h>
00030
00031 namespace Xapian {
00032
00033 class Database;
00034 class WritableDatabase;
00035
00037 namespace Auto {
00038
00046 XAPIAN_VISIBILITY_DEFAULT
00047 Database open_stub(const std::string &file);
00048
00065 XAPIAN_VISIBILITY_DEFAULT
00066 WritableDatabase open_stub(const std::string &file, int action);
00067
00068 }
00069
00070 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
00072 namespace InMemory {
00073
00079 XAPIAN_VISIBILITY_DEFAULT
00080 WritableDatabase open();
00081
00082 }
00083 #endif
00084
00085 #ifdef XAPIAN_HAS_BRASS_BACKEND
00087 namespace Brass {
00088
00093 XAPIAN_VISIBILITY_DEFAULT
00094 Database open(const std::string &dir);
00095
00114 XAPIAN_VISIBILITY_DEFAULT
00115 WritableDatabase
00116 open(const std::string &dir, int action, int block_size = 8192);
00117
00118 }
00119 #endif
00120
00121 #ifdef XAPIAN_HAS_CHERT_BACKEND
00123 namespace Chert {
00124
00129 XAPIAN_VISIBILITY_DEFAULT
00130 Database open(const std::string &dir);
00131
00150 XAPIAN_VISIBILITY_DEFAULT
00151 WritableDatabase
00152 open(const std::string &dir, int action, int block_size = 8192);
00153
00154 }
00155 #endif
00156
00157 #ifdef XAPIAN_HAS_FLINT_BACKEND
00159 namespace Flint {
00160
00165 XAPIAN_VISIBILITY_DEFAULT
00166 Database open(const std::string &dir);
00167
00186 XAPIAN_VISIBILITY_DEFAULT
00187 WritableDatabase
00188 open(const std::string &dir, int action, int block_size = 8192);
00189
00190 }
00191 #endif
00192
00193 #ifdef XAPIAN_HAS_REMOTE_BACKEND
00195 namespace Remote {
00196
00216 XAPIAN_VISIBILITY_DEFAULT
00217 Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 10000);
00218
00237 XAPIAN_VISIBILITY_DEFAULT
00238 WritableDatabase open_writable(const std::string &host, unsigned int port, Xapian::timeout timeout = 0, Xapian::timeout connect_timeout = 10000);
00239
00254 XAPIAN_VISIBILITY_DEFAULT
00255 Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000);
00256
00270 XAPIAN_VISIBILITY_DEFAULT
00271 WritableDatabase open_writable(const std::string &program, const std::string &args, Xapian::timeout timeout = 0);
00272
00273 }
00274 #endif
00275
00276 }
00277
00278 #endif