[1419] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * collectoraction.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 |
|
---|
| 27 | #ifndef COLLECTORACTION_H
|
---|
| 28 | #define COLLECTORACTION_H
|
---|
| 29 |
|
---|
| 30 | #include "action.h"
|
---|
| 31 | #include "receptionist.h"
|
---|
| 32 |
|
---|
| 33 | class collectoraction : public action {
|
---|
| 34 |
|
---|
| 35 | protected:
|
---|
| 36 |
|
---|
[1759] | 37 | bool disabled;
|
---|
[1419] | 38 | receptionist *recpt;
|
---|
| 39 | char *gsdlosc;
|
---|
| 40 | char *gsdlhomec;
|
---|
[1679] | 41 | char *pathc;
|
---|
[1419] | 42 |
|
---|
[1457] | 43 | text_t message;
|
---|
| 44 |
|
---|
[1419] | 45 | bool do_mkcol;
|
---|
| 46 |
|
---|
| 47 | text_t get_button (const text_t &thispage, const text_t &color,
|
---|
| 48 | const text_t &type, bool enabled);
|
---|
| 49 |
|
---|
| 50 | void set_fullnamemenu (displayclass &disp, cgiargsclass &args,
|
---|
| 51 | recptprotolistclass *protos, ostream &logout);
|
---|
| 52 |
|
---|
[1457] | 53 | void set_cfgfile (displayclass &disp, cgiargsclass &args, ostream &logout);
|
---|
[1419] | 54 |
|
---|
[1457] | 55 | void set_statusline (displayclass &disp, cgiargsclass &args, ostream &logout);
|
---|
[1437] | 56 |
|
---|
[1432] | 57 | void update_cfgfile_clone (cgiargsclass &args, ostream &logout);
|
---|
| 58 |
|
---|
[1425] | 59 | void update_cfgfile_partial (cgiargsclass &args, ostream &logout);
|
---|
| 60 |
|
---|
| 61 | void update_cfgfile_complete (cgiargsclass &args, ostream &logout);
|
---|
| 62 |
|
---|
[1419] | 63 | text_t carriage_replace (const text_t &intext, int sw);
|
---|
| 64 |
|
---|
| 65 | text_t get_directory_name (const text_t &fullname);
|
---|
| 66 |
|
---|
[1432] | 67 | bool collection_protected (const text_t &collection);
|
---|
| 68 |
|
---|
[1457] | 69 | void assign_tmpname (cgiargsclass &args, ostream &logout);
|
---|
| 70 |
|
---|
| 71 | void gsdl_mkcol (cgiargsclass &args, ostream &logout);
|
---|
| 72 |
|
---|
| 73 | void gsdl_build (cgiargsclass &args, ostream &logout);
|
---|
| 74 |
|
---|
| 75 | void gsdl_cancel_build (cgiargsclass &args, ostream &logout);
|
---|
| 76 |
|
---|
| 77 | text_t get_collectdir (cgiargsclass &args);
|
---|
| 78 |
|
---|
[1649] | 79 | bool uses_weird_plugin (const text_t &collection);
|
---|
[1485] | 80 |
|
---|
[1649] | 81 | void create_colserver (const text_t &collection, ostream &logout);
|
---|
| 82 |
|
---|
[1679] | 83 | void remove_colservr (const text_t &collection, ostream &logout);
|
---|
| 84 |
|
---|
[1778] | 85 | bool create_event_header_file (const text_t &filename, cgiargsclass &args,
|
---|
| 86 | ostream &logout);
|
---|
| 87 |
|
---|
| 88 | text_t get_event_header (cgiargsclass &args);
|
---|
| 89 |
|
---|
[1419] | 90 | public:
|
---|
| 91 | collectoraction ();
|
---|
| 92 | virtual ~collectoraction ();
|
---|
| 93 |
|
---|
[1759] | 94 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
| 95 |
|
---|
[1419] | 96 | bool init (ostream &logout);
|
---|
| 97 |
|
---|
| 98 | void set_receptionist (receptionist *therecpt) {recpt=therecpt;}
|
---|
| 99 |
|
---|
| 100 | text_t get_action_name () {return "collector";}
|
---|
| 101 |
|
---|
| 102 | bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
|
---|
| 103 | ostream &logout);
|
---|
| 104 |
|
---|
| 105 | void get_cgihead_info (cgiargsclass &args, recptprotolistclass *protos,
|
---|
| 106 | response_t &response,text_t &response_data,
|
---|
| 107 | ostream &logout);
|
---|
| 108 |
|
---|
| 109 | void define_internal_macros (displayclass &disp, cgiargsclass &args,
|
---|
| 110 | recptprotolistclass *protos, ostream &logout);
|
---|
| 111 |
|
---|
| 112 | bool do_action (cgiargsclass &args, recptprotolistclass *protos,
|
---|
| 113 | browsermapclass *browsers, displayclass &disp,
|
---|
| 114 | outconvertclass &outconvert, ostream &textout,
|
---|
| 115 | ostream &logout);
|
---|
| 116 | };
|
---|
| 117 |
|
---|
| 118 |
|
---|
| 119 | #endif
|
---|