1 | /**********************************************************************
|
---|
2 | *
|
---|
3 | * queryaction.h --
|
---|
4 | * Copyright (C) 1999 The New Zealand Digital Library Project
|
---|
5 | *
|
---|
6 | * PUT COPYRIGHT NOTICE HERE
|
---|
7 | *
|
---|
8 | * $Id: queryaction.h 403 1999-07-19 00:16:59Z sjboddie $
|
---|
9 | *
|
---|
10 | *********************************************************************/
|
---|
11 |
|
---|
12 |
|
---|
13 | #ifndef QUERYACTION_H
|
---|
14 | #define QUERYACTION_H
|
---|
15 |
|
---|
16 | #include "gsdlconf.h"
|
---|
17 | #include "action.h"
|
---|
18 |
|
---|
19 |
|
---|
20 | class queryaction : public action {
|
---|
21 |
|
---|
22 | protected:
|
---|
23 | text_t formatstring;
|
---|
24 | int num_phrases;
|
---|
25 |
|
---|
26 | void define_query_macros (cgiargsclass &args, displayclass &disp,
|
---|
27 | const FilterResponse_t &response);
|
---|
28 |
|
---|
29 | void set_option_macro (const text_t ¯oname, text_t current_value,
|
---|
30 | const FilterOption_t &option, displayclass &disp);
|
---|
31 |
|
---|
32 |
|
---|
33 | public:
|
---|
34 | queryaction ();
|
---|
35 | virtual ~queryaction () {}
|
---|
36 |
|
---|
37 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
38 | bool init (ostream &logout);
|
---|
39 |
|
---|
40 | text_t get_action_name () {return "q";}
|
---|
41 |
|
---|
42 | bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
|
---|
43 | ostream &logout);
|
---|
44 | void get_cgihead_info (cgiargsclass &args, response_t &response,
|
---|
45 | text_t &response_data, ostream &logout);
|
---|
46 |
|
---|
47 | void define_internal_macros (displayclass &disp, cgiargsclass &args,
|
---|
48 | recptproto *collectproto, ostream &logout);
|
---|
49 | void define_external_macros (displayclass &disp, cgiargsclass &args,
|
---|
50 | recptproto *collectproto, ostream &logout);
|
---|
51 |
|
---|
52 | bool do_action (cgiargsclass &args, recptproto *collectproto,
|
---|
53 | displayclass &disp, outconvertclass &outconvert,
|
---|
54 | ostream &textout, ostream &logout);
|
---|
55 | };
|
---|
56 |
|
---|
57 |
|
---|
58 | #endif
|
---|