1/** @file xapian.h
2 * @brief Public interfaces for the Xapian library.
3 */
4// Copyright (C) 2003,2004,2005,2007,2008,2009,2010,2012,2013 Olly Betts
5//
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.
10//
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.
15//
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
19
20#ifndef XAPIAN_INCLUDED_XAPIAN_H
21#define XAPIAN_INCLUDED_XAPIAN_H
22
23#ifdef slots
24# ifdef Q_OBJECT
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,
28// as described here:
29//
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"
32# endif
33# ifdef WT_API
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()'"
36# endif
37#endif
38
39// Set defines for library version and check C++ ABI versions match.
40#include <xapian/version.h>
41
42// Types
43#include <xapian/types.h>
44
45// Exceptions
46#include <xapian/error.h>
47#include <xapian/errorhandler.h>
48
49// Access to databases, documents, etc.
50#include <xapian/database.h>
51#include <xapian/dbfactory.h>
52#include <xapian/document.h>
53#include <xapian/positioniterator.h>
54#include <xapian/postingiterator.h>
55#include <xapian/termiterator.h>
56#include <xapian/valueiterator.h>
57
58// Indexing
59#include <xapian/termgenerator.h>
60
61// Searching
62#include <xapian/enquire.h>
63#include <xapian/expanddecider.h>
64#include <xapian/keymaker.h>
65#include <xapian/matchspy.h>
66#include <xapian/postingsource.h>
67#include <xapian/query.h>
68#include <xapian/queryparser.h>
69#include <xapian/valuesetmatchdecider.h>
70#include <xapian/weight.h>
71
72// Stemming
73#include <xapian/stem.h>
74
75// Subclass registry
76#include <xapian/registry.h>
77
78// Unicode support
79#include <xapian/unicode.h>
80
81// Database compaction and merging
82#include <xapian/compactor.h>
83
84// ELF visibility annotations for GCC.
85#include <xapian/visibility.h>
86
87/// The Xapian namespace contains public interfaces for the Xapian library.
88namespace Xapian {
89
90// Functions returning library version:
91
92/** Report the version string of the library which the program is linked with.
93 *
94 * This may be different to the version compiled against (given by
95 * XAPIAN_VERSION) if shared libraries are being used.
96 */
97XAPIAN_VISIBILITY_DEFAULT
98const char * version_string();
99
100/** Report the major version of the library which the program is linked with.
101 *
102 * This may be different to the version compiled against (given by
103 * XAPIAN_MAJOR_VERSION) if shared libraries are being used.
104 */
105XAPIAN_VISIBILITY_DEFAULT
106int major_version();
107
108/** Report the minor version of the library which the program is linked with.
109 *
110 * This may be different to the version compiled against (given by
111 * XAPIAN_MINOR_VERSION) if shared libraries are being used.
112 */
113XAPIAN_VISIBILITY_DEFAULT
114int minor_version();
115
116/** Report the revision of the library which the program is linked with.
117 *
118 * This may be different to the version compiled against (given by
119 * XAPIAN_REVISION) if shared libraries are being used.
120 */
121XAPIAN_VISIBILITY_DEFAULT
122int revision();
123
124}
125
126#endif /* XAPIAN_INCLUDED_XAPIAN_H */
127