3 * @brief Header for SWIG interface file for Xapian.
5 /* Copyright
(C
) 2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016 Olly Betts
7 * This program is free software
; you can redistribute it and
/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation
; either version
2 of the
10 * License
, or
(at your option
) any later version.
12 * This program is distributed in the hope that it will be useful
,
13 * but WITHOUT
ANY WARRANTY
; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program
; if not
, write to the Free Software
19 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301
23 // Disable any deprecation warnings for Xapian methods
/functions
/classes.
24 #define XAPIAN_DEPRECATED
(D
) D
35 // If a backend has been disabled in xapian-core
(manually or automatically
) we
36 // include a stub definition here so the bindings can still be built.
39 #ifndef XAPIAN_BINDINGS_SKIP_DEPRECATED_DB_FACTORIES
42 #ifndef XAPIAN_HAS_CHERT_BACKEND
44 static Database open
(const string
&) {
45 throw FeatureUnavailableError
("Chert backend not supported");
47 static WritableDatabase open
(const string
&, int, int = 0) {
48 throw FeatureUnavailableError
("Chert backend not supported");
53 #ifndef XAPIAN_HAS_INMEMORY_BACKEND
55 static WritableDatabase open
() {
56 throw FeatureUnavailableError
("InMemory backend not supported");
65 #ifndef XAPIAN_HAS_REMOTE_BACKEND
67 static Database open
(const string
&, unsigned int, useconds_t = 0, useconds_t = 0) {
68 throw FeatureUnavailableError
("Remote backend not supported");
71 static WritableDatabase open_writable
(const string
&, unsigned int, useconds_t = 0, useconds_t = 0, int = 0) {
72 throw FeatureUnavailableError
("Remote backend not supported");
75 static Database open
(const string
&, const string &, useconds_t = 0) {
76 throw FeatureUnavailableError
("Remote backend not supported");
79 static WritableDatabase open_writable
(const string
&, const string &, useconds_t = 0, int = 0) {
80 throw FeatureUnavailableError
("Remote backend not supported");
93 // Disable errors about not including headers individually.
94 #define XAPIAN_IN_XAPIAN_H
96 // Define these away for SWIG's parser.
97 #define XAPIAN_DEPRECATED
(D
) D
98 #define XAPIAN_DEPRECATED_EX
(D
) D
99 #define XAPIAN_DEPRECATED_CLASS
100 #define XAPIAN_DEPRECATED_CLASS_EX
101 #define XAPIAN_VISIBILITY_DEFAULT
102 #define XAPIAN_CONST_FUNCTION
103 #define XAPIAN_PURE_FUNCTION
104 #define XAPIAN_NOEXCEPT
105 #define XAPIAN_NOTHROW
(D
) D
107 // Ignore these which SWIG seems to add pointless type entries for due them
108 // being used in the SWIG typemap for std
::pair.
112 // Treat POSIX useconds_t as unsigned.
113 %apply unsigned
{ useconds_t
};