1 /* omega.h: Main header for omega 2 * 3 * Copyright 1999,2000,2001 BrightStation PLC 4 * Copyright 2001 Lemur Consulting Ltd 5 * Copyright 2001,2002 Ananova Ltd 6 * Copyright 2002,2003,2006,2007,2008 Olly Betts 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License as 10 * published by the Free Software Foundation; either version 2 of the 11 * License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 21 * USA 22 */ 23 24 #ifndef OMEGA_INCLUDED_OMEGA_H 25 #define OMEGA_INCLUDED_OMEGA_H 26 27 #include <xapian.h> 28 29 #define PROGRAM_NAME "omega" 30 31 #include "configfile.h" 32 33 #include <map> 34 35 using namespace std; 36 37 const char filter_sep = '-'; 38 // Any choice of character for filter_sep could conceivably lead to 39 // false positives, but the situation is contrived, and just means that if 40 // someone changed a filter, the first page wouldn't be forced. 41 // That's hardly the end of the world... 42 43 extern string query_string; 44 45 extern string dbname; 46 extern string fmtname; 47 extern string filters; 48 49 extern Xapian::Database db; 50 extern Xapian::Enquire * enquire; 51 extern Xapian::RSet rset; 52 53 extern Xapian::docid topdoc; 54 extern Xapian::docid hits_per_page; 55 extern Xapian::docid min_hits; 56 57 extern int threshold; 58 59 extern Xapian::valueno sort_key; 60 extern bool sort_ascending; 61 extern bool sort_after; 62 extern Xapian::Enquire::docid_order docid_order; 63 64 extern Xapian::valueno collapse_key; 65 extern bool collapse; 66 67 extern map<string, string> option; 68 69 extern string date_start, date_end, date_span; 70 71 extern const string default_dbname; 72 73 extern bool set_content_type, suppress_http_headers; 74 75 #endif // OMEGA_INCLUDED_OMEGA_H 76