Changeset 155 for trunk/gsdl/src/recpt/receptionist.h
- Timestamp:
- 1999-02-08T14:28:04+13:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/receptionist.h
r150 r155 17 17 #include "text_t.h" 18 18 #include "cgiargs.h" 19 #include "display.h" 20 #include "action.h" 19 21 20 22 #ifndef MACROPRECEDENCE … … 31 33 // is being run for multiple collections ("general" mode). 32 34 void set_gsdlhome (const text_t &thegsdlhome); 35 text_t get_gsdlhome () {return gsdlhome;} 33 36 34 37 // this version of set_gsdlhome should be used if the receptionist 35 38 // is being run for a single collection ("collection specific" mode). 36 39 void set_gsdlhome (const text_t &thegsdlhome, const text_t &thecollection); 40 text_t get_collection () {return collection;} 37 41 38 42 // sets the http address of the images directory. This is used to … … 41 45 // images via gwcgi which will be a lot slower (especially if the 42 46 // browser does not cache the images). 43 void set_httpimg (const text_t &thehttpimg); 47 void set_httpimg (const text_t &thehttpimg) {httpimg=thehttpimg;} 48 text_t get_httpimg () {return httpimg;} 44 49 45 50 // sets the http address of the gateway cgi program (ie. the program 46 51 // that contains this receptionist). 47 void set_gwcgi (const text_t &thegwcgi); 52 void set_gwcgi (const text_t &thegwcgi) {gwcgi=thegwcgi;} 53 text_t get_gwcgi () {return gwcgi;} 54 55 // set_macrofiles defines the macro files which will be read when 56 // the init function is called. 57 void set_macrofiles (const text_tarray &themacrofiles) {macrofiles=themacrofiles;} 58 text_tarray get_macrofiles () {return macrofiles;} 59 60 // set_saveconf defines what should be included in the compressed 61 // arguments. This string should consist of cgi argument names 62 // seperated by "-". 63 void set_saveconf (const text_t &thesaveconf) {saveconf=thesaveconf;} 64 text_t get_saveconf () {return saveconf;} 65 66 // add_action makes another action available to the receptionist 67 // the action becomes the property of the receptionist 68 void add_action (action *theaction) {actions.addaction(theaction);} 69 70 // configure_actions should be called for each line in the 71 // configuration files to configure the actions. The configuration 72 // should take place after all the actions have been added. 73 void configure_actions (const text_t &key, const text_tarray &cfgline); 48 74 49 75 // init should be called after setgsdhome has been called. … … 55 81 56 82 // There are two ways to produce a page. You can either call parse_cgi_args, 57 // get_cgihead_info, and produce_content or you can just call p roduce_cgi_page58 // which will be satisfactory in most cases. You might want to call83 // get_cgihead_info, and produce_content or you can just call parse_cgi_args and 84 // produce_cgi_page (which will be satisfactory in most cases). You might want to call 59 85 // parse_cgi_args, get_cgihead_info, and produce_content when you want to 60 // call get_compressed_arg or interface directly with a web server for which 61 // the standard header is inappropriate. 62 63 // produce_cgi_page will call parse_cgi_args, get_cgihead_info and 64 // produce_content in the appropriate way to output a cgi header and 65 // the page content (if needed). 66 void produce_cgi_page (const text_t &argstr, ostream &contentout, 67 ostream &logout); 86 // interface directly with a web server for which the standard header is inappropriate. 68 87 69 88 // parse_cgi_args parses cgi arguments into an argument class. 70 // This function should be called for each page request. 71 void parse_cgi_args (const text_t &argstr, cgiargsclass &args, ostream &logout); 89 // This function should be called for each page request. It returns false 90 // if there was a major problem with the cgi arguments. 91 bool parse_cgi_args (const text_t &argstr, cgiargsclass &args, ostream &logout); 72 92 73 // response_t is used to inform the calling code what type of 74 // cgi header it should produce 75 // eventually this should reside in cgiutils.h 76 enum response_t {location, content}; 93 // produce_cgi_page will call get_cgihead_info and 94 // produce_content in the appropriate way to output a cgi header and 95 // the page content (if needed). If a page could not be created it 96 // will return false 97 bool produce_cgi_page (cgiargsclass &args, ostream &contentout, 98 ostream &logout); 77 99 78 100 // get_cgihead_info determines the cgi header information for … … 85 107 86 108 // produce the page content 87 voidproduce_content (cgiargsclass &args, ostream &contentout,109 bool produce_content (cgiargsclass &args, ostream &contentout, 88 110 ostream &logout); 89 111 … … 99 121 text_t gwcgi; 100 122 123 displayclass disp; 124 text_tarray macrofiles; 101 125 126 text_t saveconf; 127 cgiargsinfoclass argsinfo; 128 actionmapclass actions; 129 130 // will read in all the macro files. If one is not found an 131 // error message will be written to logout and the method will 132 // return false. 133 bool read_macrofiles (ostream &logout); 102 134 135 // Will define the main general arguments used by the receptionist. 136 // If an error occurs a message will be written to logout and the 137 // method will return false. 138 virtual bool define_mainargs (ostream &logout); 139 140 // check_mainargs will check all the main arguments. If a major 141 // error is found it will return false and no cgi page should 142 // be created using the arguments. 143 virtual bool check_mainargs (cgiargsclass &args, ostream &logout); 103 144 }; 104 145 105 146 106 107 147 #endif
Note:
See TracChangeset
for help on using the changeset viewer.