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/deprecated.h>
00030 #include <xapian/version.h>
00031 #include <xapian/visibility.h>
00032
00033 namespace Xapian {
00034
00035 namespace Auto {
00036
00044 XAPIAN_VISIBILITY_DEFAULT
00045 Database open_stub(const std::string &file);
00046
00047 }
00048
00049 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
00050 namespace InMemory {
00051
00056 XAPIAN_VISIBILITY_DEFAULT
00057 WritableDatabase open();
00058
00059 }
00060 #endif
00061
00062 #ifdef XAPIAN_HAS_QUARTZ_BACKEND
00063 namespace Quartz {
00064
00071 XAPIAN_VISIBILITY_DEFAULT
00072 XAPIAN_DEPRECATED(Database open(const std::string &dir));
00073
00094 XAPIAN_VISIBILITY_DEFAULT
00095 XAPIAN_DEPRECATED(WritableDatabase
00096 open(const std::string &dir, int action, int block_size = 8192));
00097
00098 }
00099 #endif
00100
00101 #ifdef XAPIAN_HAS_FLINT_BACKEND
00102 namespace Flint {
00103
00108 XAPIAN_VISIBILITY_DEFAULT
00109 Database open(const std::string &dir);
00110
00129 XAPIAN_VISIBILITY_DEFAULT
00130 WritableDatabase
00131 open(const std::string &dir, int action, int block_size = 8192);
00132
00133 }
00134 #endif
00135
00136 #ifdef XAPIAN_HAS_REMOTE_BACKEND
00137 namespace Remote {
00138
00158 XAPIAN_VISIBILITY_DEFAULT
00159 Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 10000);
00160
00179 XAPIAN_VISIBILITY_DEFAULT
00180 WritableDatabase open_writable(const std::string &host, unsigned int port, Xapian::timeout timeout = 0, Xapian::timeout connect_timeout = 10000);
00181
00196 XAPIAN_VISIBILITY_DEFAULT
00197 Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000);
00198
00212 XAPIAN_VISIBILITY_DEFAULT
00213 WritableDatabase open_writable(const std::string &program, const std::string &args, Xapian::timeout timeout = 0);
00214
00215 }
00216 #endif
00217
00218 }
00219
00220 #endif