1 | /**********************************************************************
|
---|
2 | *
|
---|
3 | * wizardaction.h --
|
---|
4 | * Copyright (C) 2000 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 | #include "gsdl_modules_cfg.h"
|
---|
27 | #ifdef GSDL_USE_WIZARD_ACTION
|
---|
28 |
|
---|
29 | #ifndef WIZARDACTION_H
|
---|
30 | #define WIZARDACTION_H
|
---|
31 |
|
---|
32 | #include "action.h"
|
---|
33 | #include "receptionist.h"
|
---|
34 |
|
---|
35 | class wizardaction : public action {
|
---|
36 |
|
---|
37 |
|
---|
38 | public:
|
---|
39 | wizardaction ();
|
---|
40 | virtual ~wizardaction ();
|
---|
41 |
|
---|
42 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
43 |
|
---|
44 | bool init (ostream &logout);
|
---|
45 |
|
---|
46 | void set_receptionist (receptionist *therecpt) {recpt=therecpt;}
|
---|
47 |
|
---|
48 | text_t get_action_name () {return "wizard";}
|
---|
49 |
|
---|
50 | void get_cgihead_info (cgiargsclass &args, recptprotolistclass *protos,
|
---|
51 | response_t &response,text_t &response_data,
|
---|
52 | ostream &logout);
|
---|
53 |
|
---|
54 | bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
|
---|
55 | recptprotolistclass * protos, ostream &logout);
|
---|
56 |
|
---|
57 |
|
---|
58 | protected:
|
---|
59 | bool disabled;
|
---|
60 | receptionist *recpt;
|
---|
61 |
|
---|
62 | text_t macro_prefix;
|
---|
63 |
|
---|
64 | text_t message;
|
---|
65 | char failcode;
|
---|
66 |
|
---|
67 | virtual text_t get_button (cgiargsclass &args, const text_t &thispage,
|
---|
68 | const text_t &color,
|
---|
69 | const text_t &type, bool enabled)=0;
|
---|
70 |
|
---|
71 |
|
---|
72 | text_t carriage_replace (const text_t &intext, int sw);
|
---|
73 |
|
---|
74 | text_t get_directory_name (const text_t &fullname);
|
---|
75 |
|
---|
76 | bool collection_protected (const text_t &collection);
|
---|
77 |
|
---|
78 | bool assign_tmpname (cgiargsclass &args, ostream &logout);
|
---|
79 |
|
---|
80 |
|
---|
81 | void set_statusline (displayclass &disp, cgiargsclass &args, ostream &logout);
|
---|
82 | void gsdl_build (cgiargsclass &args, ostream &logout);
|
---|
83 |
|
---|
84 | void gsdl_cancel_build (cgiargsclass &args, ostream &logout);
|
---|
85 |
|
---|
86 | text_t get_collectdir (cgiargsclass &args);
|
---|
87 |
|
---|
88 | void create_colserver (const text_t &collection, ostream &logout);
|
---|
89 |
|
---|
90 | void remove_colservr (const text_t &collection, ostream &logout);
|
---|
91 |
|
---|
92 | bool create_event_header_file (const text_t &filename, cgiargsclass &args,
|
---|
93 | ostream &logout);
|
---|
94 |
|
---|
95 | text_t get_event_header (cgiargsclass &args);
|
---|
96 |
|
---|
97 | text_t format_url (const text_t &url);
|
---|
98 |
|
---|
99 | text_t remove_trailing_slashes (text_t str);
|
---|
100 |
|
---|
101 | void set_fullnamemenu (displayclass &disp, cgiargsclass &args,
|
---|
102 | recptprotolistclass *protos, ostream &logout);
|
---|
103 |
|
---|
104 | bool uses_weird_plugin (const text_t &collection);
|
---|
105 |
|
---|
106 | };
|
---|
107 |
|
---|
108 | #endif //!WIZARDACTION_H
|
---|
109 | #endif //GSDL_USE_WIZARD_ACTION
|
---|