[22044] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * sqlqueryaction.h --
|
---|
| 4 | * Copyright (C) 2010 The New Zealand Digital Library Project
|
---|
| 5 | *
|
---|
| 6 | * A component of the Greenstone digital library software
|
---|
| 7 | * from the New Zealand Digital Library Project at the
|
---|
| 8 | * University of Waikato, New Zealand.
|
---|
| 9 | *
|
---|
| 10 | * This program is free software; you can redistribute it and/or modify
|
---|
| 11 | * it under the terms of the GNU General Public License as published by
|
---|
| 12 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 13 | * (at your option) any later version.
|
---|
| 14 | *
|
---|
| 15 | * This program is distributed in the hope that it will be useful,
|
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 18 | * GNU General Public License for more details.
|
---|
| 19 | *
|
---|
| 20 | * You should have received a copy of the GNU General Public License
|
---|
| 21 | * along with this program; if not, write to the Free Software
|
---|
| 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 23 | *
|
---|
| 24 | *********************************************************************/
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | #ifndef SQLQUERYACTION_H
|
---|
| 28 | #define SQLQUERYACTION_H
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | #include "basequeryaction.h"
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | class sqlqueryaction : public basequeryaction {
|
---|
| 35 |
|
---|
| 36 | protected:
|
---|
| 37 | virtual text_t query_filter_name () {return "SQLQueryFilter";}
|
---|
| 38 |
|
---|
| 39 | virtual void get_formatted_query_string (text_t &formattedstring,
|
---|
| 40 | bool segment,
|
---|
| 41 | cgiargsclass &args,
|
---|
| 42 | displayclass &disp,
|
---|
| 43 | ostream &logout);
|
---|
| 44 |
|
---|
| 45 | virtual void set_queryfilter_options (FilterRequest_t &request,
|
---|
| 46 | const text_t &querystring,
|
---|
| 47 | cgiargsclass &args);
|
---|
| 48 |
|
---|
| 49 | virtual void define_form_macros (displayclass &disp, cgiargsclass &args,
|
---|
| 50 | recptprotolistclass *protos,
|
---|
| 51 | ostream &logout);
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 | void set_sfselection_macro(text_t current_value,
|
---|
| 55 | const FilterOption_t &option_domain,
|
---|
| 56 | const FilterOption_t &option_range,
|
---|
| 57 | displayclass &disp);
|
---|
| 58 |
|
---|
| 59 |
|
---|
| 60 | virtual bool save_search_history(cgiargsclass &args, int numdocs,
|
---|
| 61 | isapprox isApprox);
|
---|
| 62 |
|
---|
| 63 | public:
|
---|
| 64 | sqlqueryaction ();
|
---|
| 65 | virtual ~sqlqueryaction ();
|
---|
| 66 |
|
---|
| 67 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
| 68 | bool init (ostream &logout);
|
---|
| 69 |
|
---|
| 70 | virtual text_t get_action_name () {return "sqlq";}
|
---|
| 71 |
|
---|
| 72 | virtual bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
|
---|
| 73 | recptprotolistclass *protos, ostream &logout);
|
---|
| 74 |
|
---|
| 75 | virtual void define_external_macros (displayclass &disp, cgiargsclass &args,
|
---|
| 76 | recptprotolistclass *protos, ostream &logout);
|
---|
| 77 |
|
---|
| 78 | virtual bool do_action (cgiargsclass &args, recptprotolistclass *protos,
|
---|
| 79 | browsermapclass *browsers, displayclass &disp,
|
---|
| 80 | outconvertclass &outconvert, ostream &textout,
|
---|
| 81 | ostream &logout);
|
---|
| 82 |
|
---|
| 83 | };
|
---|
| 84 |
|
---|
| 85 | #endif
|
---|