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
00036 namespace Auto {
00037
00045 XAPIAN_VISIBILITY_DEFAULT
00046 Database open_stub(const std::string &file);
00047
00055 XAPIAN_VISIBILITY_DEFAULT
00056 WritableDatabase open_stub(const std::string &file, int action);
00057
00058 }
00059
00060 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
00061 namespace InMemory {
00062
00068 XAPIAN_VISIBILITY_DEFAULT
00069 WritableDatabase open();
00070
00071 }
00072 #endif
00073
00074 #ifdef XAPIAN_HAS_CHERT_BACKEND
00075 namespace Chert {
00076
00081 XAPIAN_VISIBILITY_DEFAULT
00082 Database open(const std::string &dir);
00083
00102 XAPIAN_VISIBILITY_DEFAULT
00103 WritableDatabase
00104 open(const std::string &dir, int action, int block_size = 8192);
00105
00106 }
00107 #endif
00108
00109 #ifdef XAPIAN_HAS_FLINT_BACKEND
00110 namespace Flint {
00111
00116 XAPIAN_VISIBILITY_DEFAULT
00117 Database open(const std::string &dir);
00118
00137 XAPIAN_VISIBILITY_DEFAULT
00138 WritableDatabase
00139 open(const std::string &dir, int action, int block_size = 8192);
00140
00141 }
00142 #endif
00143
00144 #ifdef XAPIAN_HAS_REMOTE_BACKEND
00145 namespace Remote {
00146
00166 XAPIAN_VISIBILITY_DEFAULT
00167 Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 10000);
00168
00187 XAPIAN_VISIBILITY_DEFAULT
00188 WritableDatabase open_writable(const std::string &host, unsigned int port, Xapian::timeout timeout = 0, Xapian::timeout connect_timeout = 10000);
00189
00204 XAPIAN_VISIBILITY_DEFAULT
00205 Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000);
00206
00220 XAPIAN_VISIBILITY_DEFAULT
00221 WritableDatabase open_writable(const std::string &program, const std::string &args, Xapian::timeout timeout = 0);
00222
00223 }
00224 #endif
00225
00226 }
00227
00228 #endif