22 #ifndef XAPIAN_INCLUDED_DBFACTORY_H
23 #define XAPIAN_INCLUDED_DBFACTORY_H
25 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
26 # error Never use <xapian/dbfactory.h> directly; include <xapian.h> instead.
30 # include <sys/types.h>
45 typedef unsigned useconds_t;
92 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
112 #ifdef XAPIAN_HAS_CHERT_BACKEND
149 open(
const std::string &dir,
int action,
int block_size)
157 #ifdef XAPIAN_HAS_REMOTE_BACKEND
161 #if defined __GNUC__ && defined __MINGW32__
163 # pragma GCC diagnostic push
164 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
187 Database open(
const std::string &host,
unsigned int port, useconds_t
timeout = 10000, useconds_t connect_timeout = 10000);
226 Database open(
const std::string &program,
const std::string &args, useconds_t
timeout = 10000);
245 #if defined __GNUC__ && defined __MINGW32__
246 # pragma GCC diagnostic pop
This class is used to access a database, or a group of databases.
This class provides read/write access to a database.
Constants in the Xapian namespace.
Define XAPIAN_DEPRECATED() and related macros.
API for working with Xapian databases.
Database open_stub(const std::string &file)
Construct a Database object for a stub database file.
Database open(const std::string &dir)
Construct a Database object for read-only access to a Chert database.
WritableDatabase open()
Construct a WritableDatabase object for a new, empty InMemory database.
WritableDatabase open_writable(const std::string &host, unsigned int port, useconds_t timeout=0, useconds_t connect_timeout=10000, int flags=0)
Construct a WritableDatabase object for update access to a remote database accessed via a TCP connect...
Database open(const std::string &host, unsigned int port, useconds_t timeout=10000, useconds_t connect_timeout=10000)
Construct a Database object for read-only access to a remote database accessed via a TCP connection.
The Xapian namespace contains public interfaces for the Xapian library.
const int DB_BACKEND_INMEMORY
Use the "in memory" backend.
const int DB_BACKEND_CHERT
Use the chert backend.
const int DB_BACKEND_STUB
Open a stub database file.
unsigned timeout
A timeout value in milliseconds.
#define XAPIAN_DEPRECATED(X)
Define preprocessor symbols for the library version.
Define XAPIAN_VISIBILITY_* macros.
#define XAPIAN_VISIBILITY_DEFAULT