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/deprecated.h>
00029 #include <xapian/version.h>
00030 #include <xapian/visibility.h>
00031
00032 namespace Xapian {
00033
00034 class Database;
00035 class WritableDatabase;
00036
00037 namespace Auto {
00038
00046 XAPIAN_VISIBILITY_DEFAULT
00047 Database open_stub(const std::string &file);
00048
00049 }
00050
00051 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
00052 namespace InMemory {
00053
00058 XAPIAN_VISIBILITY_DEFAULT
00059 WritableDatabase open();
00060
00061 }
00062 #endif
00063
00064 #ifdef XAPIAN_HAS_QUARTZ_BACKEND
00065 namespace Quartz {
00066
00073 XAPIAN_VISIBILITY_DEFAULT
00074 XAPIAN_DEPRECATED(Database open(const std::string &dir));
00075
00096 XAPIAN_VISIBILITY_DEFAULT
00097 XAPIAN_DEPRECATED(WritableDatabase
00098 open(const std::string &dir, int action, int block_size = 8192));
00099
00100 }
00101 #endif
00102
00103 #ifdef XAPIAN_HAS_FLINT_BACKEND
00104 namespace Flint {
00105
00110 XAPIAN_VISIBILITY_DEFAULT
00111 Database open(const std::string &dir);
00112
00131 XAPIAN_VISIBILITY_DEFAULT
00132 WritableDatabase
00133 open(const std::string &dir, int action, int block_size = 8192);
00134
00135 }
00136 #endif
00137
00138 #ifdef XAPIAN_HAS_REMOTE_BACKEND
00139 namespace Remote {
00140
00160 XAPIAN_VISIBILITY_DEFAULT
00161 Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 10000);
00162
00181 XAPIAN_VISIBILITY_DEFAULT
00182 WritableDatabase open_writable(const std::string &host, unsigned int port, Xapian::timeout timeout = 0, Xapian::timeout connect_timeout = 10000);
00183
00198 XAPIAN_VISIBILITY_DEFAULT
00199 Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000);
00200
00214 XAPIAN_VISIBILITY_DEFAULT
00215 WritableDatabase open_writable(const std::string &program, const std::string &args, Xapian::timeout timeout = 0);
00216
00217 }
00218 #endif
00219
00220 }
00221
00222 #endif