include/xapian/dbfactory.h

Go to the documentation of this file.
00001 
00004 /* Copyright (C) 2005,2006,2007,2008 Olly Betts
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of the
00009  * License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00019  * USA
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 /* XAPIAN_INCLUDED_DBFACTORY_H */

Documentation for Xapian (version 1.1.2).
Generated on 23 Jul 2009 by Doxygen 1.5.2.