2 * @brief Public interfaces for the Xapian library.
4 // Copyright (C) 2003,2004,2005,2007,2008,2009,2010,2012,2013,2015,2016 Olly Betts
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef XAPIAN_INCLUDED_XAPIAN_H
21 #define XAPIAN_INCLUDED_XAPIAN_H
25 // Qt headers '#define slots' by default, which clashes with us using it as a
26 // class member name. Including <xapian.h> first is a simple workaround, or
27 // you can use 'no_keywords' to stop Qt polluting the global macro namespace,
30 // http://qt-project.org/doc/qt-5.0/signalsandslots.html#using-qt-with-3rd-party-signals-and-slots
31 # error "Include <xapian.h> before Qt headers, or put 'CONFIG += no_keywords' in your .pro file and use Q_SLOTS instead of slots, etc"
34 // Argh, copycat polluters!
35 # error "Include <xapian.h> before Wt headers, or define WT_NO_SLOT_MACROS to stop Wt from defining the macros 'slots' and 'SLOT()'"
39 // Define so that deprecation warnings are given to API users, but not
40 // while building the library.
41 #define XAPIAN_IN_XAPIAN_H
43 // Set defines for library version and check C++ ABI versions match.
44 #include <xapian/version.h>
47 #include <xapian/types.h>
49 // Function attributes
50 #include <xapian/attributes.h>
53 #include <xapian/constants.h>
56 #include <xapian/error.h>
58 // Access to databases, documents, etc.
59 #include <xapian/database.h>
60 #include <xapian/dbfactory.h>
61 #include <xapian/document.h>
62 #include <xapian/positioniterator.h>
63 #include <xapian/postingiterator.h>
64 #include <xapian/termiterator.h>
65 #include <xapian/valueiterator.h>
68 #include <xapian/termgenerator.h>
71 #include <xapian/enquire.h>
72 #include <xapian/eset.h>
73 #include <xapian/mset.h>
74 #include <xapian/expanddecider.h>
75 #include <xapian/keymaker.h>
76 #include <xapian/matchdecider.h>
77 #include <xapian/matchspy.h>
78 #include <xapian/postingsource.h>
79 #include <xapian/query.h>
80 #include <xapian/queryparser.h>
81 #include <xapian/rset.h>
82 #include <xapian/valuesetmatchdecider.h>
83 #include <xapian/weight.h>
86 #include <xapian/cluster.h>
89 #include <xapian/stem.h>
92 #include <xapian/registry.h>
95 #include <xapian/unicode.h>
98 #include <xapian/geospatial.h>
100 // Database compaction and merging
101 #include <xapian/compactor.h>
103 // ELF visibility annotations for GCC.
104 #include <xapian/visibility.h>
106 // Mechanism for accessing a struct of constant information
107 #include <xapian/constinfo.h>
109 /// The Xapian namespace contains public interfaces for the Xapian library.
112 // Functions returning library version:
114 /** Report the version string of the library which the program is linked with.
116 * This may be different to the version compiled against (given by
117 * XAPIAN_VERSION) if shared libraries are being used.
119 inline const char * version_string() {
120 return Internal::get_constinfo_()->str
;
123 /** Report the major version of the library which the program is linked with.
125 * This may be different to the version compiled against (given by
126 * XAPIAN_MAJOR_VERSION) if shared libraries are being used.
128 inline int major_version() {
129 return Internal::get_constinfo_()->major
;
132 /** Report the minor version of the library which the program is linked with.
134 * This may be different to the version compiled against (given by
135 * XAPIAN_MINOR_VERSION) if shared libraries are being used.
137 inline int minor_version() {
138 return Internal::get_constinfo_()->minor
;
141 /** Report the revision of the library which the program is linked with.
143 * This may be different to the version compiled against (given by
144 * XAPIAN_REVISION) if shared libraries are being used.
146 inline int revision() {
147 return Internal::get_constinfo_()->revision
;
152 #undef XAPIAN_IN_XAPIAN_H
154 #endif /* XAPIAN_INCLUDED_XAPIAN_H */