Changeset 421 for trunk/gsdl/src/recpt
- Timestamp:
- 1999-07-30T14:24:45+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/action.cpp
r361 r421 12 12 /* 13 13 $Log$ 14 Revision 1.13 1999/07/30 02:24:43 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.12 1999/07/10 22:15:30 rjmcnab 15 18 Added function check_external_cgiargs so that actions that … … 77 80 // define all the macros which are related to pages generated 78 81 // by this action 79 void action::define_internal_macros (displayclass &/*disp*/, cgiargsclass &/*args*/, 80 recptproto */*collectproto*/, ostream &/*logout*/) { 82 void action::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 83 cgiargsclass &/*args*/, recptproto */*collectproto*/, 84 ostream &/*logout*/) { 81 85 } 82 86 … … 157 161 // define all the macros which might be used by other actions 158 162 // to produce pages. These macros should be well documented. 159 void action::define_external_macros (displayclass &/*disp*/, cgiargsclass &/*args*/, 160 recptproto */*collectproto*/, ostream &/*logout*/) { 163 void action::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 164 cgiargsclass &/*args*/, recptproto */*collectproto*/, 165 ostream &/*logout*/) { 161 166 } 162 167 163 168 // returns false if there was an error which prevented the action 164 169 // from outputing anything. 165 bool action::do_action (cgiargsclass &/*args*/, recptproto */*collectproto*/, 166 displayclass &/*disp*/, outconvertclass &/*outconvert*/, 167 ostream &/*textout*/, ostream &/*logout*/) { 170 bool action::do_action (cgiargsclass &/*args*/, const ColInfoResponse_t &/*collectinfo*/, 171 recptproto */*collectproto*/, displayclass &/*disp*/, 172 outconvertclass &/*outconvert*/, ostream &/*textout*/, 173 ostream &/*logout*/) { 168 174 return true; 169 175 } -
trunk/gsdl/src/recpt/action.h
r361 r421 83 83 // define all the macros which are related to pages generated 84 84 // by this action 85 virtual void define_internal_macros (displayclass &disp, cgiargsclass &args, 86 recptproto *collectproto, ostream &logout); 85 virtual void define_internal_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 86 cgiargsclass &args, recptproto *collectproto, 87 ostream &logout); 87 88 88 89 // define all the macros which might be used by other actions 89 90 // to produce pages. These macros should be well documented. 90 virtual void define_external_macros (displayclass &disp, cgiargsclass &args, 91 recptproto *collectproto, ostream &logout); 91 virtual void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 92 cgiargsclass &args, recptproto *collectproto, 93 ostream &logout); 92 94 93 95 // returns false if there was an error which prevented the action 94 96 // from outputing anything. 95 virtual bool do_action (cgiargsclass &args, recptproto *collectproto, 96 displayclass &disp, outconvertclass &outconvert, 97 ostream &textout, ostream &logout); 97 virtual bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 98 recptproto *collectproto, displayclass &disp, 99 outconvertclass &outconvert, ostream &textout, 100 ostream &logout); 98 101 99 102 // getargsinfo should be called after all configuration files -
trunk/gsdl/src/recpt/authenaction.cpp
r374 r421 12 12 /* 13 13 $Log$ 14 Revision 1.4 1999/07/30 02:24:43 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.3 1999/07/13 23:23:26 rjmcnab 15 18 Put users in their own gdbm database. Moved a lot of functionality to usersdb … … 259 262 } 260 263 261 void authenaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 262 recptproto */*collectproto*/, ostream &/*logout*/) { 264 void authenaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp, 265 cgiargsclass &args, recptproto */*collectproto*/, 266 ostream &/*logout*/) { 263 267 // sets _authen:messageextra_ based on the value of args["us"] 264 268 // _authen:hiddenargs_ to contain all the arguments that were … … 296 300 } 297 301 298 void authenaction::define_external_macros (displayclass &/*disp*/, cgiargsclass &/*args*/, 299 recptproto */*collectproto*/, ostream &/*logout*/) { 300 } 301 302 bool authenaction::do_action (cgiargsclass &args, recptproto */*collectproto*/, 303 displayclass &disp, outconvertclass &outconvert, 304 ostream &textout, ostream &/*logout*/) { 302 void authenaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 303 cgiargsclass &/*args*/, recptproto */*collectproto*/, 304 ostream &/*logout*/) { 305 } 306 307 bool authenaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 308 recptproto */*collectproto*/, displayclass &disp, 309 outconvertclass &outconvert, ostream &textout, 310 ostream &/*logout*/) { 305 311 if (args["us"] == "enabled") { 306 312 // have been authenticated -
trunk/gsdl/src/recpt/authenaction.h
r374 r421 53 53 text_t &response_data, ostream &logout); 54 54 55 void define_internal_macros (displayclass &disp, cgiargsclass &args, 56 recptproto *collectproto, ostream &logout); 57 void define_external_macros (displayclass &disp, cgiargsclass &args, 58 recptproto *collectproto, ostream &logout); 55 void define_internal_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 56 cgiargsclass &args, recptproto *collectproto, 57 ostream &logout); 58 void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 59 cgiargsclass &args, recptproto *collectproto, 60 ostream &logout); 59 61 60 bool do_action (cgiargsclass &args, recptproto *collectproto, 61 displayclass &disp, outconvertclass &outconvert, 62 ostream &textout, ostream &logout); 62 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 63 recptproto *collectproto, displayclass &disp, 64 outconvertclass &outconvert, ostream &textout, 65 ostream &logout); 63 66 }; 64 67 -
trunk/gsdl/src/recpt/pageaction.cpp
r284 r421 12 12 /* 13 13 $Log$ 14 Revision 1.8 1999/07/30 02:24:44 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.7 1999/06/24 05:12:24 sjboddie 15 18 lots of small changes … … 86 89 87 90 88 void pageaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 89 recptproto */*collectproto*/, ostream &logout) { 91 // define all the macros which might be used by other actions 92 // to produce pages. 93 void pageaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 94 cgiargsclass &/*args*/, recptproto */*collectproto*/, 95 ostream &/*logout*/) { 96 } 97 98 99 void pageaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp, 100 cgiargsclass &args, recptproto */*collectproto*/, 101 ostream &logout) { 90 102 91 103 // define_internal_macros sets the following macros: … … 128 140 if (err == noError) { 129 141 130 homeextra += "<dt><a href=\"_http pagex_(about)&c=" + *collist_here + "\">"142 homeextra += "<dt><a href=\"_httpquery_&c=" + *collist_here + "\">" 131 143 + *collist_here + "</a></dt>\n"; 132 144 homeextra += "<dd>"; … … 147 159 } 148 160 149 bool pageaction::do_action (cgiargsclass &args, recptproto */*collectproto*/, 150 displayclass &disp, outconvertclass &outconvert, 151 ostream &textout, ostream &/*logout*/) { 161 bool pageaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 162 recptproto */*collectproto*/, displayclass &disp, 163 outconvertclass &outconvert, ostream &textout, 164 ostream &/*logout*/) { 152 165 153 166 text_t &arg_p = args["p"]; -
trunk/gsdl/src/recpt/pageaction.h
r284 r421 38 38 text_t &response_data, ostream &logout); 39 39 40 void define_internal_macros (displayclass &disp, cgiargsclass &args, 41 recptproto *collectproto, ostream &logout); 40 void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 41 cgiargsclass &args, recptproto *collectproto, 42 ostream &logout); 42 43 43 bool do_action (cgiargsclass &args, recptproto *collectproto, 44 displayclass &disp, outconvertclass &outconvert, 45 ostream &textout, ostream &logout); 44 void define_internal_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 45 cgiargsclass &args, recptproto *collectproto, 46 ostream &logout); 47 48 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 49 recptproto *collectproto, displayclass &disp, 50 outconvertclass &outconvert, ostream &textout, 51 ostream &logout); 46 52 }; 47 53 -
trunk/gsdl/src/recpt/pingaction.cpp
r172 r421 12 12 /* 13 13 $Log$ 14 Revision 1.3 1999/07/30 02:24:45 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.2 1999/02/25 21:58:59 rjmcnab 15 18 … … 46 49 47 50 48 bool pingaction::do_action (cgiargsclass &args, recptproto *collectproto, 49 displayclass &/*disp*/, outconvertclass &outconvert, 50 ostream &textout, ostream &logout) { 51 bool pingaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 52 recptproto *collectproto, displayclass &/*disp*/, 53 outconvertclass &outconvert, ostream &textout, 54 ostream &logout) { 51 55 bool wassuccess = false; 52 56 comerror_t err; -
trunk/gsdl/src/recpt/pingaction.h
r172 r421 26 26 void get_cgihead_info (cgiargsclass &args, response_t &response, 27 27 text_t &response_data, ostream &logout); 28 bool do_action (cgiargsclass &args, recptproto *collectproto, 29 displayclass &disp, outconvertclass &outconvert, 30 ostream &textout, ostream &logout); 28 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 29 recptproto *collectproto, displayclass &disp, 30 outconvertclass &outconvert, ostream &textout, 31 ostream &logout); 31 32 }; 32 33 -
trunk/gsdl/src/recpt/queryaction.cpp
r403 r421 12 12 /* 13 13 $Log$ 14 Revision 1.17 1999/07/30 02:24:42 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.16 1999/07/19 00:16:58 sjboddie 15 18 no longer display documents that don't match all phrases in query string … … 297 300 } 298 301 299 void queryaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 300 recptproto */*collectproto*/, ostream &/*logout*/) { 302 void queryaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp, 303 cgiargsclass &args, recptproto */*collectproto*/, 304 ostream &/*logout*/) { 301 305 302 306 // define_internal_macros sets the following macros: … … 374 378 } 375 379 376 void queryaction::define_external_macros (displayclass &disp, cgiargsclass &args, 377 recptproto *collectproto, ostream &logout) { 380 void queryaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp, 381 cgiargsclass &args, recptproto *collectproto, 382 ostream &logout) { 378 383 379 384 // define_external_macros sets the following macros: … … 421 426 } 422 427 423 bool queryaction::do_action (cgiargsclass &args, recptproto *collectproto,424 displayclass &disp, outconvertclass &outconvert,425 o stream &textout, ostream &logout) {426 427 // if we have no format string see if the collection server has one 428 bool queryaction::do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 429 recptproto *collectproto, displayclass &disp, 430 outconvertclass &outconvert, ostream &textout, 431 ostream &logout) { 432 428 433 if (formatstring.empty()) { 429 ColInfoResponse_t collectinfo; 430 comerror_t err; 431 collectproto->get_collectinfo (args["c"], collectinfo, err, logout); 432 if (err == noError) { 433 text_tmap::const_iterator result = collectinfo.format.find("result"); 434 if (result != collectinfo.format.end()) 435 formatstring = (*result).second; 436 } 437 } 434 text_tmap::const_iterator result = collectinfo.format.find("result"); 435 if (result != collectinfo.format.end()) 436 formatstring = (*result).second; 437 } 438 438 439 // if we still don't have a format string use the default 439 440 if (formatstring.empty()) -
trunk/gsdl/src/recpt/queryaction.h
r403 r421 45 45 text_t &response_data, ostream &logout); 46 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);47 void define_internal_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 48 cgiargsclass &args, recptproto *collectproto, ostream &logout); 49 void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 50 cgiargsclass &args, recptproto *collectproto, ostream &logout); 51 51 52 bool do_action (cgiargsclass &args, recptproto *collectproto, 53 displayclass &disp, outconvertclass &outconvert, 54 ostream &textout, ostream &logout); 52 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 53 recptproto *collectproto, displayclass &disp, 54 outconvertclass &outconvert, ostream &textout, 55 ostream &logout); 55 56 }; 56 57 -
trunk/gsdl/src/recpt/statusaction.cpp
r376 r421 12 12 /* 13 13 $Log$ 14 Revision 1.15 1999/07/30 02:24:42 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.14 1999/07/13 23:26:07 rjmcnab 15 18 Added support for authenaction and usersaction … … 709 712 } 710 713 711 bool statusaction::do_action (cgiargsclass &args, recptproto */*collectproto*/, 712 displayclass &disp, outconvertclass &outconvert, 713 ostream &textout, ostream &logout) { 714 bool statusaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 715 recptproto */*collectproto*/, displayclass &disp, 716 outconvertclass &outconvert, ostream &textout, 717 ostream &logout) { 714 718 // make sure the status function is enabled 715 719 if (disabled) { -
trunk/gsdl/src/recpt/statusaction.h
r261 r421 68 68 void get_cgihead_info (cgiargsclass &args, response_t &response, 69 69 text_t &response_data, ostream &logout); 70 bool do_action (cgiargsclass &args, recptproto *collectproto, 71 displayclass &disp, outconvertclass &outconvert, 72 ostream &textout, ostream &logout); 70 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 71 recptproto *collectproto, displayclass &disp, 72 outconvertclass &outconvert, ostream &textout, 73 ostream &logout); 73 74 74 75 void configure (const text_t &key, const text_tarray &cfgline); -
trunk/gsdl/src/recpt/tipaction.cpp
r357 r421 12 12 /* 13 13 $Log$ 14 Revision 1.2 1999/07/30 02:24:45 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.1 1999/07/09 02:18:27 rjmcnab 15 18 Initial revision. … … 23 26 24 27 25 void tipaction::define_external_macros (displayclass &disp, cgiargsclass &/*args*/, 26 recptproto */*collectproto*/, ostream &logout) { 28 void tipaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp, 29 cgiargsclass &/*args*/, recptproto */*collectproto*/, 30 ostream &logout) { 27 31 28 32 // define_external_macros sets the following macros: -
trunk/gsdl/src/recpt/tipaction.h
r357 r421 25 25 text_t get_action_name () {return "tip";} 26 26 27 void define_external_macros (displayclass &disp, cgiargsclass &args, 28 recptproto *collectproto, ostream &logout); 27 void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 28 cgiargsclass &args, recptproto *collectproto, 29 ostream &logout); 29 30 }; 30 31 -
trunk/gsdl/src/recpt/usersaction.cpp
r373 r421 12 12 /* 13 13 $Log$ 14 Revision 1.2 1999/07/30 02:24:44 sjboddie 15 added collectinfo argument to some functions 16 14 17 Revision 1.1 1999/07/13 23:22:05 rjmcnab 15 18 Initial revision. … … 173 176 } 174 177 175 void usersaction::define_internal_macros (displayclass &/*disp*/, cgiargsclass &/*args*/, 176 recptproto */*collectproto*/, ostream &/*logout*/) { 177 } 178 179 void usersaction::define_external_macros (displayclass &/*disp*/, cgiargsclass &/*args*/, 180 recptproto */*collectproto*/, ostream &/*logout*/) { 181 } 182 183 bool usersaction::do_action (cgiargsclass &args, recptproto *collectproto, 184 displayclass &disp, outconvertclass &outconvert, 185 ostream &textout, ostream &logout) { 178 void usersaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 179 cgiargsclass &/*args*/, recptproto */*collectproto*/, 180 ostream &/*logout*/) { 181 } 182 183 void usersaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 184 cgiargsclass &/*args*/, recptproto */*collectproto*/, 185 ostream &/*logout*/) { 186 } 187 188 bool usersaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 189 recptproto *collectproto, displayclass &disp, 190 outconvertclass &outconvert, ostream &textout, 191 ostream &logout) { 186 192 if (args["uma"] == "adduser" || args["uma"] == "edituser") { 187 193 // adduser is handled by edituser -
trunk/gsdl/src/recpt/usersaction.h
r373 r421 37 37 text_t &response_data, ostream &logout); 38 38 39 void define_internal_macros (displayclass &disp, cgiargsclass &args, 40 recptproto *collectproto, ostream &logout); 41 void define_external_macros (displayclass &disp, cgiargsclass &args, 42 recptproto *collectproto, ostream &logout); 39 void define_internal_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 40 cgiargsclass &args, recptproto *collectproto, 41 ostream &logout); 42 void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 43 cgiargsclass &args, recptproto *collectproto, 44 ostream &logout); 43 45 44 bool do_action (cgiargsclass &args, recptproto *collectproto, 45 displayclass &disp, outconvertclass &outconvert, 46 ostream &textout, ostream &logout); 46 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 47 recptproto *collectproto, displayclass &disp, 48 outconvertclass &outconvert, ostream &textout, 49 ostream &logout); 47 50 48 51 protected:
Note:
See TracChangeset
for help on using the changeset viewer.