Changeset 760
- Timestamp:
- 1999-11-02T10:56:32+13:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/buildaction.cpp
r723 r760 29 29 #include "fileutil.h" 30 30 #include "buildaction.h" 31 #include "gsdlhome.h" 31 32 32 33 /////////////// … … 86 87 } 87 88 88 void buildaction::get_cgihead_info (cgiargsclass &/*args*/, response_t &response, 89 text_t &response_data, ostream &/*logout*/) { 89 void buildaction::get_cgihead_info (cgiargsclass &/*args*/, recptprotolistclass * /*protos*/, 90 response_t &response,text_t &response_data, 91 ostream &/*logout*/) { 90 92 91 93 response = content; … … 93 95 } 94 96 95 void buildaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp, 96 cgiargsclass &args, recptproto * /*collectproto*/, 97 ostream &logout) { 98 99 // make sure we know about a receptionist 100 if (recpt == NULL) { 101 logout << "The page action does not contain information\n" 102 << "about any receptionists. The method set_receptionist\n" 103 << "was probably not called from the module which instantiated\n" 104 << "this page action.\n"; 105 return; 106 } 107 108 recptprotolistclass *rprotolist = recpt->get_recptprotolist_ptr (); 109 if (rprotolist == NULL) return; 110 111 const recptconf &rcinfo = recpt->get_configinfo (); 97 void buildaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 98 recptprotolistclass *protos, ostream &logout) { 112 99 113 100 // build up javascript and HTML code useful in web forms … … 123 110 disp.setmacro("bcargfirsttime","build","false"); 124 111 125 recptprotolistclass::iterator rprotolist_here = rprotolist->begin();126 recptprotolistclass::iterator rprotolist_end = rprotolist->end();112 recptprotolistclass::iterator rprotolist_here = protos->begin(); 113 recptprotolistclass::iterator rprotolist_end = protos->end(); 127 114 while (rprotolist_here != rprotolist_end) { 128 115 if ((*rprotolist_here).p != NULL) { … … 191 178 // check to see if the "collection" is writable 192 179 text_t cfg_fname 193 = filename_cat( rcinfo.gsdlhome,"collect",*collist_here,"etc","collect.cfg");180 = filename_cat(GSDL_GSDLHOME,"collect",*collist_here,"etc","collect.cfg"); 194 181 if (!file_writable(cfg_fname)) 195 182 { … … 280 267 // read in collect.cfg 281 268 text_t cfg_fname 282 = filename_cat( rcinfo.gsdlhome,"collect",dirname,"etc","collect.cfg");269 = filename_cat(GSDL_GSDLHOME,"collect",dirname,"etc","collect.cfg"); 283 270 ifstream cfg_ifs (cfg_fname.getcstr(), ios::in | ios::nocreate); 284 271 if (cfg_ifs) … … 306 293 } 307 294 308 void buildaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 309 cgiargsclass &/*args*/, recptproto * /*collectproto*/, 310 ostream &/*logout*/) { 311 } 312 313 bool buildaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 314 recptproto *collectproto, displayclass &disp, 295 bool buildaction::do_action (cgiargsclass &args, recptprotolistclass * /*protos*/, 296 browsermapclass * /*browsers*/, displayclass &disp, 315 297 outconvertclass &outconvert, ostream &textout, 316 298 ostream &logout) { 317 299 318 300 319 320 321 301 if (args["bca"] == "newcol") { 322 return do_newcol (args, collectproto,disp, outconvert, textout, logout);302 return do_newcol (args, disp, outconvert, textout, logout); 323 303 } 324 304 else if (args["bca"] == "editcol") { 325 return do_editcol (args, collectproto,disp, outconvert, textout, logout);305 return do_editcol (args, disp, outconvert, textout, logout); 326 306 } 327 307 else if (args["bca"] == "buildcol") { 328 return do_buildcol (args, collectproto,disp, outconvert, textout, logout);308 return do_buildcol (args, disp, outconvert, textout, logout); 329 309 } 330 310 else if (args["bca"] == "buildstatus") { 331 return do_buildstatus (args, collectproto,disp, outconvert, textout, logout);311 return do_buildstatus (args, disp, outconvert, textout, logout); 332 312 } 333 313 else if (args["bca"] == "delcol") { 334 return do_delcol (args, collectproto,disp, outconvert, textout, logout);314 return do_delcol (args, disp, outconvert, textout, logout); 335 315 } 336 316 else if (args["bca"] == "mess") { 337 return do_mess (args, collectproto,disp, outconvert, textout, logout);317 return do_mess (args, disp, outconvert, textout, logout); 338 318 } 339 319 … … 346 326 347 327 348 bool buildaction::do_newcol (cgiargsclass &args, recptproto */*collectproto*/,349 displayclass &disp, outconvertclass &outconvert,350 ostream & textout, ostream &/*logout*/) {328 bool buildaction::do_newcol (cgiargsclass &args, displayclass &disp, 329 outconvertclass &outconvert, ostream &textout, 330 ostream &/*logout*/) { 351 331 352 332 text_tarray wizard_split; … … 364 344 365 345 366 bool buildaction::do_editcol (cgiargsclass &/*args*/, recptproto */*collectproto*/,367 displayclass &disp, outconvertclass &outconvert,368 ostream & textout, ostream &/*logout*/) {346 bool buildaction::do_editcol (cgiargsclass &/*args*/, displayclass &disp, 347 outconvertclass &outconvert, ostream &textout, 348 ostream &/*logout*/) { 369 349 370 350 textout << outconvert << disp << ("_build:header_(_build:headmesseditcol_)\n") … … 375 355 } 376 356 377 bool buildaction::do_buildcol (cgiargsclass &args, recptproto */*collectproto*/,378 displayclass &disp, outconvertclass &outconvert,379 ostream &textout,ostream &logout) {357 bool buildaction::do_buildcol (cgiargsclass &args, displayclass &disp, 358 outconvertclass &outconvert, ostream &textout, 359 ostream &logout) { 380 360 381 361 … … 408 388 textout << outconvert << disp << headmess << content << "_build:framefooter_\n"; 409 389 410 const recptconf &rcinfo = recpt->get_configinfo (); 411 text_t cmd = filename_cat(rcinfo.gsdlhome,"cgi-bin","webpage_buildcol.pl"); 390 text_t cmd = filename_cat(GSDL_GSDLHOME,"cgi-bin","webpage_buildcol.pl"); 412 391 cmd += " gsdlhome=\""+args["gsdlhome"]+"\" httpbuild=\""+args["httpbuild"]+"\""; 413 392 cmd += " bc1copydata=\""+args["bc1copydata"]+"\""; … … 422 401 } 423 402 424 bool buildaction::do_buildstatus (cgiargsclass &args, recptproto */*collectproto*/,425 displayclass &disp, outconvertclass &outconvert,426 ostream &textout,ostream &/*logout*/) {403 bool buildaction::do_buildstatus (cgiargsclass &args, displayclass &disp, 404 outconvertclass &outconvert, ostream &textout, 405 ostream &/*logout*/) { 427 406 428 407 disp.setmacro("contentpara","buildstatus", args["mess"]); … … 435 414 } 436 415 437 bool buildaction::do_delcol (cgiargsclass &/*args*/, recptproto */*collectproto*/,438 displayclass &disp, outconvertclass &outconvert,439 ostream & textout, ostream &/*logout*/) {416 bool buildaction::do_delcol (cgiargsclass &/*args*/, displayclass &disp, 417 outconvertclass &outconvert, ostream &textout, 418 ostream &/*logout*/) { 440 419 441 420 textout << outconvert << disp << ("_build:header_(_build:headmessdelcol_)\n") … … 447 426 448 427 449 bool buildaction::do_mess (cgiargsclass &args, recptproto */*collectproto*/,450 displayclass &disp, outconvertclass &outconvert,451 ostream & textout, ostream &/*logout*/) {428 bool buildaction::do_mess (cgiargsclass &args, displayclass &disp, 429 outconvertclass &outconvert, ostream &textout, 430 ostream &/*logout*/) { 452 431 453 432 disp.setmacro("contentpara","buildmess", args["mess"]); -
trunk/gsdl/src/recpt/buildaction.h
r723 r760 40 40 41 41 text_t get_action_name () {return "bc";} 42 void set_receptionist (receptionist *therecpt) {recpt=therecpt;}43 42 44 43 bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args, 45 44 ostream &logout); 46 void get_cgihead_info (cgiargsclass &args, response_t &response, 47 text_t &response_data, ostream &logout); 45 46 47 void get_cgihead_info (cgiargsclass &args, recptprotolistclass *protos, 48 response_t &response,text_t &response_data, 49 ostream &logout); 48 50 49 void define_internal_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 50 cgiargsclass &args, recptproto *collectproto, 51 ostream &logout); 52 void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 53 cgiargsclass &args, recptproto *collectproto, 54 ostream &logout); 51 void define_internal_macros (displayclass &disp, cgiargsclass &args, 52 recptprotolistclass *protos, ostream &logout); 55 53 56 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo,57 recptproto *collectproto, displayclass &disp,54 bool do_action (cgiargsclass &args, recptprotolistclass *protos, 55 browsermapclass *browsers, displayclass &disp, 58 56 outconvertclass &outconvert, ostream &textout, 59 57 ostream &logout); 60 58 61 59 protected: 62 bool do_newcol (cgiargsclass &args, recptproto *collectproto, 63 displayclass &disp, outconvertclass &outconvert, 64 ostream &textout, ostream &logout); 65 bool do_editcol (cgiargsclass &args, recptproto *collectproto, 66 displayclass &disp, outconvertclass &outconvert, 67 ostream &textout, ostream &logout); 68 bool do_buildcol (cgiargsclass &args, recptproto *collectproto, 69 displayclass &disp, outconvertclass &outconvert, 70 ostream &textout, ostream &logout); 71 bool do_buildstatus (cgiargsclass &args, recptproto *collectproto, 72 displayclass &disp, outconvertclass &outconvert, 73 ostream &textout, ostream &logout); 74 bool do_delcol (cgiargsclass &args, recptproto *collectproto, 75 displayclass &disp, outconvertclass &outconvert, 76 ostream &textout, ostream &logout); 77 bool do_mess (cgiargsclass &args, recptproto *collectproto, 78 displayclass &disp, outconvertclass &outconvert, 79 ostream &textout, ostream &logout); 60 bool do_newcol (cgiargsclass &args, displayclass &disp, 61 outconvertclass &outconvert, ostream &textout, 62 ostream &logout); 63 64 bool do_editcol (cgiargsclass &args, displayclass &disp, 65 outconvertclass &outconvert, ostream &textout, 66 ostream &logout); 67 68 bool do_buildcol (cgiargsclass &args, displayclass &disp, 69 outconvertclass &outconvert, ostream &textout, 70 ostream &logout); 71 72 bool do_buildstatus (cgiargsclass &args, displayclass &disp, 73 outconvertclass &outconvert, ostream &textout, 74 ostream &logout); 75 76 bool do_delcol (cgiargsclass &args, displayclass &disp, 77 outconvertclass &outconvert, ostream &textout, 78 ostream &logout); 79 80 bool do_mess (cgiargsclass &args, displayclass &disp, 81 outconvertclass &outconvert, ostream &textout, 82 ostream &logout); 80 83 81 84 }; -
trunk/gsdl/src/recpt/pingaction.cpp
r533 r760 28 28 /* 29 29 $Log$ 30 Revision 1.5 1999/11/01 21:56:32 sjboddie 31 changes to arguments of many functions 32 30 33 Revision 1.4 1999/09/07 04:56:57 sjboddie 31 34 added GPL notice … … 61 64 } 62 65 63 void pingaction::get_cgihead_info (cgiargsclass &/*args*/, response_t &response, 64 text_t &response_data, ostream &/*logout*/) { 66 void pingaction::get_cgihead_info (cgiargsclass &/*args*/, recptprotolistclass * /*protos*/, 67 response_t &response, text_t &response_data, 68 ostream &/*logout*/) { 65 69 response = content; 66 70 response_data = "text/html"; … … 68 72 69 73 70 bool pingaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/,71 recptproto *collectproto, displayclass &/*disp*/,74 bool pingaction::do_action (cgiargsclass &args, recptprotolistclass *protos, 75 browsermapclass * /*browsers*/, displayclass &/*disp*/, 72 76 outconvertclass &outconvert, ostream &textout, 73 77 ostream &logout) { … … 75 79 comerror_t err; 76 80 81 recptproto *collectproto = protos->getrecptproto (args["c"], logout); 77 82 if (!args["c"].empty() && (collectproto != NULL)) { 78 83 collectproto->ping (args["c"], wassuccess, err, logout); -
trunk/gsdl/src/recpt/pingaction.h
r533 r760 40 40 41 41 text_t get_action_name () {return "ping";} 42 void get_cgihead_info (cgiargsclass &args, response_t &response, 43 text_t &response_data, ostream &logout); 44 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 45 recptproto *collectproto, displayclass &disp, 42 43 void get_cgihead_info (cgiargsclass &args, recptprotolistclass *protos, 44 response_t &response, text_t &response_data, 45 ostream &logout); 46 47 bool do_action (cgiargsclass &args, recptprotolistclass *protos, 48 browsermapclass *browsers, displayclass &disp, 46 49 outconvertclass &outconvert, ostream &textout, 47 50 ostream &logout); -
trunk/gsdl/src/recpt/receptionist.cpp
r731 r760 28 28 /* 29 29 $Log$ 30 Revision 1.38 1999/11/01 21:49:34 sjboddie 31 changes to arguments of many functions 32 30 33 Revision 1.37 1999/10/20 03:55:03 sjboddie 31 34 yet another problem with calling browserclass … … 807 810 action *a = actions.getaction (args["a"]); 808 811 if (a != NULL) { 809 a->get_cgihead_info (args, response, response_data, logout);812 a->get_cgihead_info (args, &protocols, response, response_data, logout); 810 813 811 814 } else { … … 845 848 outconverter->reset(); 846 849 847 text_t &collection = args["c"]; 848 recptproto *collectproto = NULL; 849 if (!collection.empty()) { 850 // decide on the protocol used for communicating with 851 // the collection server 852 collectproto = protocols.getrecptproto (collection, logout); 853 854 // get collection information 855 collectinfo.clear(); 856 if (!collection.empty()) { 857 comerror_t err; 858 collectproto->get_collectinfo (collection, collectinfo, err, logout); 859 if (err != noError) collectinfo.clear(); 860 } 861 850 recptproto *collectproto = protocols.getrecptproto (args["c"], logout); 851 if (collectproto != NULL) { 862 852 // get browsers to process OID 863 853 text_t OID = args["d"]; … … 882 872 } 883 873 } 884 874 885 875 // translate "d" and "cl" arguments if required 886 876 translate_OIDs (args, collectproto, logout); 887 877 } 888 878 889 879 // produce the page using the desired action 890 880 action *a = actions.getaction (args["a"]); 891 881 if (a != NULL) { 892 if (a->uses_display(args)) prepare_page (a, args, collectproto, (*outconverter), logout); 893 if (!a->do_action (args, collectinfo, collectproto, disp, 894 (*outconverter), contentout, logout)) 882 if (a->uses_display(args)) prepare_page (a, args, (*outconverter), logout); 883 if (!a->do_action (args, &protocols, &browsers, disp, (*outconverter), contentout, logout)) 895 884 return false; 896 885 … … 1066 1055 // prepare_page sets up page parameters, sets display macros 1067 1056 // and opens the page ready for output 1068 void receptionist::prepare_page (action *a, cgiargsclass &args, recptproto *collectproto, 1069 outconvertclass &outconvert, ostream &logout) { 1057 void receptionist::prepare_page (action *a, cgiargsclass &args, 1058 outconvertclass &outconvert, 1059 ostream &logout) { 1070 1060 // set up page parameters 1071 1061 text_t pageparams; … … 1098 1088 assert ((*actionhere).second.a != NULL); 1099 1089 if ((*actionhere).second.a != NULL) 1100 (*actionhere).second.a->define_external_macros ( collectinfo, disp, args, collectproto, logout);1090 (*actionhere).second.a->define_external_macros (disp, args, &protocols, logout); 1101 1091 actionhere++; 1102 1092 } 1103 1093 1104 1094 // define internal macros for the current action 1105 a->define_internal_macros ( collectinfo, disp, args, collectproto, logout);1095 a->define_internal_macros (disp, args, &protocols, logout); 1106 1096 1107 1097 // define general macros. the defining of general macros is done here so that 1108 1098 // the last possible version of the cgi arguments are used 1109 define_general_macros (args, collectproto,outconvert, logout);1110 } 1111 1112 void receptionist::define_general_macros (cgiargsclass &args, recptproto *collectproto,1113 o utconvertclass &/*outconvert*/, ostream &logout) {1099 define_general_macros (args, outconvert, logout); 1100 } 1101 1102 void receptionist::define_general_macros (cgiargsclass &args, outconvertclass &/*outconvert*/, 1103 ostream &logout) { 1114 1104 1115 1105 text_t &collection = args["c"]; … … 1142 1132 1143 1133 // set collection specific macros 1144 if ((!collection.empty()) && (collectproto != NULL)) { 1145 FilterResponse_t response; 1146 text_tset metadata; 1147 get_info ("collection", collection, metadata, false, 1148 collectproto, response, logout); 1149 1150 if (!response.docInfo[0].metadata.empty()) { 1151 MetadataInfo_tmap::const_iterator here = response.docInfo[0].metadata.begin(); 1152 MetadataInfo_tmap::const_iterator end = response.docInfo[0].metadata.end(); 1153 while (here != end) { 1154 if (((*here).first != "haschildren") && ((*here).first != "hasnext") && 1155 ((*here).first != "hasprevious")) { 1156 disp.setmacro ((*here).first, "Global", (*here).second.values[0]); 1134 if (!collection.empty()) { 1135 recptproto *collectproto = protocols.getrecptproto (collection, logout); 1136 if (collectproto != NULL) { 1137 FilterResponse_t response; 1138 text_tset metadata; 1139 get_info ("collection", collection, metadata, false, 1140 collectproto, response, logout); 1141 1142 if (!response.docInfo[0].metadata.empty()) { 1143 MetadataInfo_tmap::const_iterator here = response.docInfo[0].metadata.begin(); 1144 MetadataInfo_tmap::const_iterator end = response.docInfo[0].metadata.end(); 1145 while (here != end) { 1146 if (((*here).first != "haschildren") && ((*here).first != "hasnext") && 1147 ((*here).first != "hasprevious")) { 1148 disp.setmacro ((*here).first, "Global", (*here).second.values[0]); 1149 } 1150 here ++; 1157 1151 } 1158 here ++;1159 1152 } 1160 1153 } -
trunk/gsdl/src/recpt/receptionist.h
r649 r760 84 84 // prepare_page sets up page parameters, sets display macros 85 85 // and opens the page ready for output 86 virtual void prepare_page (action *a, cgiargsclass &args, recptproto *collectproto, 87 outconvertclass &outconvert, ostream &logout); 86 virtual void prepare_page (action *a, cgiargsclass &args, 87 outconvertclass &outconvert, 88 ostream &logout); 88 89 89 90 virtual void translate_OIDs (cgiargsclass &args, recptproto *collectproto, … … 93 94 bool get_cookie (); 94 95 95 virtual void define_general_macros (cgiargsclass &args, recptproto *collectproto,96 o utconvertclass &outconvert, ostream &logout);96 virtual void define_general_macros (cgiargsclass &args, outconvertclass &outconvert, 97 ostream &logout); 97 98 98 99 bool append_logstr (const text_t &filename, const text_t &logstr, -
trunk/gsdl/src/recpt/statusaction.cpp
r722 r760 28 28 /* 29 29 $Log$ 30 Revision 1.22 1999/11/01 21:55:27 sjboddie 31 changes to arguments of many functions 32 30 33 Revision 1.21 1999/10/19 03:23:46 davidb 31 34 Collection building support through web pages … … 797 800 } 798 801 799 void statusaction::get_cgihead_info (cgiargsclass &/*args*/, response_t &response, 800 text_t &response_data, ostream &/*logout*/) { 802 void statusaction::get_cgihead_info (cgiargsclass &/*args*/, recptprotolistclass * /*protos*/, 803 response_t &response, text_t &response_data, 804 ostream &/*logout*/) { 801 805 response = content; 802 806 response_data = "text/html"; 803 807 } 804 808 805 bool statusaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/,806 recptproto * /*collectproto*/, displayclass &disp,809 bool statusaction::do_action (cgiargsclass &args, recptprotolistclass * /*protos*/, 810 browsermapclass * /*browsers*/, displayclass &disp, 807 811 outconvertclass &outconvert, ostream &textout, 808 812 ostream &logout) { -
trunk/gsdl/src/recpt/statusaction.h
r722 r760 82 82 83 83 text_t get_action_name () {return "status";} 84 84 85 void set_receptionist (receptionist *therecpt) {recpt=therecpt;} 86 85 87 bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args, 86 88 ostream &logout); 87 void get_cgihead_info (cgiargsclass &args, response_t &response, 88 text_t &response_data, ostream &logout); 89 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 90 recptproto *collectproto, displayclass &disp, 89 90 void get_cgihead_info (cgiargsclass &args, recptprotolistclass *protos, 91 response_t &response, text_t &response_data, 92 ostream &logout); 93 94 bool do_action (cgiargsclass &args, recptprotolistclass *protos, 95 browsermapclass *browsers, displayclass &disp, 91 96 outconvertclass &outconvert, ostream &textout, 92 97 ostream &logout); -
trunk/gsdl/src/recpt/tipaction.cpp
r543 r760 28 28 /* 29 29 $Log$ 30 Revision 1.6 1999/11/01 21:54:57 sjboddie 31 changes to arguments of many functions 32 30 33 Revision 1.5 1999/09/07 23:10:18 rjmcnab 31 34 removed some compiler warnings … … 63 66 } 64 67 65 void tipaction::define_external_macros ( const ColInfoResponse_t &/*collectinfo*/, displayclass &disp,66 cgiargsclass &args, recptproto * /*collectproto*/,67 ostream &logout) { 68 void tipaction::define_external_macros (displayclass &disp, cgiargsclass &args, 69 recptprotolistclass * /*protos*/, ostream &logout) { 70 68 71 // define_external_macros sets the following macros: 69 72 -
trunk/gsdl/src/recpt/tipaction.h
r533 r760 41 41 text_t get_action_name () {return "tip";} 42 42 43 void define_external_macros (const ColInfoResponse_t &collectinfo, displayclass &disp, 44 cgiargsclass &args, recptproto *collectproto, 45 ostream &logout); 43 void define_external_macros (displayclass &disp, cgiargsclass &args, 44 recptprotolistclass *protos, ostream &logout); 46 45 }; 47 46 -
trunk/gsdl/src/recpt/usersaction.cpp
r551 r760 28 28 /* 29 29 $Log$ 30 Revision 1.7 1999/11/01 21:48:27 sjboddie 31 changes to arguments of many functions 32 30 33 Revision 1.6 1999/09/08 03:44:24 cs025 31 34 Added a cast to (char *) of (..:..?..) on output to avoid type … … 199 202 } 200 203 201 void usersaction::get_cgihead_info (cgiargsclass &/*args*/, response_t &response, 202 text_t &response_data, ostream &/*logout*/) { 204 void usersaction::get_cgihead_info (cgiargsclass &/*args*/, recptprotolistclass * /*protos*/, 205 response_t &response, text_t &response_data, 206 ostream &/*logout*/) { 203 207 response = content; 204 208 response_data = "text/html"; 205 209 } 206 210 207 void usersaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 208 cgiargsclass &/*args*/, recptproto * /*collectproto*/, 209 ostream &/*logout*/) { 210 } 211 212 void usersaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/, 213 cgiargsclass &/*args*/, recptproto * /*collectproto*/, 214 ostream &/*logout*/) { 215 } 216 217 bool usersaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/, 218 recptproto *collectproto, displayclass &disp, 211 bool usersaction::do_action (cgiargsclass &args, recptprotolistclass * /*protos*/, 212 browsermapclass * /*browsers*/, displayclass &disp, 219 213 outconvertclass &outconvert, ostream &textout, 220 214 ostream &logout) { 215 221 216 if (args["uma"] == "adduser" || args["uma"] == "edituser") { 222 217 // adduser is handled by edituser 223 return do_edituser (args, collectproto,disp, outconvert, textout, logout);218 return do_edituser (args, disp, outconvert, textout, logout); 224 219 225 220 } else if (args["uma"] == "deleteuser") { 226 return do_deleteuser (args, collectproto,disp, outconvert, textout, logout);221 return do_deleteuser (args, disp, outconvert, textout, logout); 227 222 228 223 } else if (args["uma"] == "changepasswd") { 229 return do_changepasswd (args, collectproto,disp, outconvert, textout, logout);224 return do_changepasswd (args, disp, outconvert, textout, logout); 230 225 } 231 226 232 227 // default 233 return do_listusers (args, collectproto, disp, outconvert, textout, logout); 234 } 235 236 bool usersaction::do_listusers (cgiargsclass &/*args*/, recptproto * /*collectproto*/, 237 displayclass &disp, outconvertclass &outconvert, 238 ostream &textout, ostream &/*logout*/) { 228 return do_listusers (args, disp, outconvert, textout, logout); 229 } 230 231 bool usersaction::do_listusers (cgiargsclass &/*args*/, displayclass &disp, 232 outconvertclass &outconvert, ostream &textout, 233 ostream &/*logout*/) { 234 239 235 textout << outconvert << disp 240 236 << "_userslistusers:header_\n_userslistusers:contentstart_\n"; … … 297 293 298 294 299 bool usersaction::do_edituser (cgiargsclass &args, recptproto *collectproto,300 displayclass &disp, outconvertclass &outconvert,301 ostream & textout, ostream &logout) {295 bool usersaction::do_edituser (cgiargsclass &args, displayclass &disp, 296 outconvertclass &outconvert, ostream &textout, 297 ostream &logout) { 302 298 userinfo_t userinfo; 303 299 text_t messagestatus; … … 364 360 365 361 // show list of users 366 return do_listusers (args, collectproto,disp, outconvert, textout, logout);362 return do_listusers (args, disp, outconvert, textout, logout); 367 363 } 368 364 … … 377 373 } 378 374 379 bool usersaction::do_deleteuser (cgiargsclass &args, recptproto *collectproto,380 displayclass &disp, outconvertclass &outconvert,381 ostream & textout, ostream &logout) {375 bool usersaction::do_deleteuser (cgiargsclass &args, displayclass &disp, 376 outconvertclass &outconvert, ostream &textout, 377 ostream &logout) { 382 378 if (!args["cm"].empty()) { 383 379 if (args["cm"] == "yes" && !args["umun"].empty()) { … … 387 383 388 384 // redirect the user back to the listusers page 389 return do_listusers (args, collectproto,disp, outconvert, textout, logout);385 return do_listusers (args, disp, outconvert, textout, logout); 390 386 } 391 387 … … 397 393 } 398 394 399 bool usersaction::do_changepasswd (cgiargsclass &args, recptproto * /*collectproto*/,400 displayclass &disp, outconvertclass &outconvert,401 ostream & textout, ostream &/*logout*/) {395 bool usersaction::do_changepasswd (cgiargsclass &args, displayclass &disp, 396 outconvertclass &outconvert, ostream &textout, 397 ostream &/*logout*/) { 402 398 text_t messagestatus; 403 399 -
trunk/gsdl/src/recpt/usersaction.h
r533 r760 50 50 ostream &logout); 51 51 52 void get_cgihead_info (cgiargsclass &args, response_t &response, 53 text_t &response_data, ostream &logout); 52 void get_cgihead_info (cgiargsclass &args, recptprotolistclass *protos, 53 response_t &response, text_t &response_data, 54 ostream &logout); 54 55 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); 61 62 bool do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo, 63 recptproto *collectproto, displayclass &disp, 56 bool do_action (cgiargsclass &args, recptprotolistclass *protos, 57 browsermapclass *browsers, displayclass &disp, 64 58 outconvertclass &outconvert, ostream &textout, 65 59 ostream &logout); … … 68 62 void define_user_macros (cgiargsclass &args, displayclass &disp); 69 63 70 bool do_listusers (cgiargsclass &args, recptproto *collectproto, 71 displayclass &disp, outconvertclass &outconvert, 72 ostream &textout, ostream &logout); 73 bool do_edituser (cgiargsclass &args, recptproto *collectproto, 74 displayclass &disp, outconvertclass &outconvert, 75 ostream &textout, ostream &logout); 76 bool do_deleteuser (cgiargsclass &args, recptproto *collectproto, 77 displayclass &disp, outconvertclass &outconvert, 78 ostream &textout, ostream &logout); 79 bool do_changepasswd (cgiargsclass &args, recptproto *collectproto, 80 displayclass &disp, outconvertclass &outconvert, 81 ostream &textout, ostream &logout); 64 bool do_listusers (cgiargsclass &args, displayclass &disp, 65 outconvertclass &outconvert, ostream &textout, 66 ostream &logout); 67 68 bool do_edituser (cgiargsclass &args, displayclass &disp, 69 outconvertclass &outconvert, ostream &textout, 70 ostream &logout); 71 72 bool do_deleteuser (cgiargsclass &args, displayclass &disp, 73 outconvertclass &outconvert, ostream &textout, 74 ostream &logout); 75 76 bool do_changepasswd (cgiargsclass &args, displayclass &disp, 77 outconvertclass &outconvert, ostream &textout, 78 ostream &logout); 82 79 }; 83 80
Note:
See TracChangeset
for help on using the changeset viewer.