3 * @brief Header for SWIG interface file for Xapian.
5 /* Copyright
(C
) 2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017 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 the remote backend has been disabled in xapian-core
(manually or
36 // automatically
) we include a stub definition here so the bindings can still
40 #ifndef XAPIAN_HAS_REMOTE_BACKEND
42 static Database open
(const string
&, unsigned int, unsigned = 0, unsigned = 0) {
43 throw FeatureUnavailableError
("Remote backend not supported");
46 static WritableDatabase open_writable
(const string
&, unsigned int, unsigned = 0, unsigned = 0, int = 0) {
47 throw FeatureUnavailableError
("Remote backend not supported");
50 static Database open
(const string
&, const string &, unsigned = 0) {
51 throw FeatureUnavailableError
("Remote backend not supported");
54 static WritableDatabase open_writable
(const string
&, const string &, unsigned = 0, int = 0) {
55 throw FeatureUnavailableError
("Remote backend not supported");
67 %include std_string_view.i
69 // Disable errors about not including headers individually.
70 #define XAPIAN_IN_XAPIAN_H
72 // Define these away for SWIG's parser.
73 #define XAPIAN_DEPRECATED
(D
) D
74 #define XAPIAN_DEPRECATED_EX
(D
) D
75 #define XAPIAN_DEPRECATED_CLASS
76 #define XAPIAN_DEPRECATED_CLASS_EX
77 #define XAPIAN_VISIBILITY_DEFAULT
78 #define XAPIAN_VISIBILITY_INTERNAL
79 #define XAPIAN_CONST_FUNCTION
80 #define XAPIAN_PURE_FUNCTION
82 // This works around buggy behaviour in SWIG's preprocessor
, and only works
83 // because we currently only use XAPIAN_NONNULL
() with an empty argument
:
85 // https
://github.com
/swig
/swig
/pull
/1111
87 // The correct version is
:
88 // #define XAPIAN_NONNULL
(L
)
89 #define XAPIAN_NONNULL
()
91 // Ignore these which SWIG seems to add pointless type entries for due them
92 // being used in the SWIG typemap for std
::pair.