Changeset 421 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
1999-07-30T14:24:45+12:00 (25 years ago)
Author:
sjboddie
Message:

added collectinfo argument to some functions

Location:
trunk/gsdl/src/recpt
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/action.cpp

    r361 r421  
    1212/*
    1313   $Log$
     14   Revision 1.13  1999/07/30 02:24:43  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.12  1999/07/10 22:15:30  rjmcnab
    1518   Added function check_external_cgiargs so that actions that
     
    7780// define all the macros which are related to pages generated
    7881// by this action
    79 void action::define_internal_macros (displayclass &/*disp*/, cgiargsclass &/*args*/,
    80                      recptproto */*collectproto*/, ostream &/*logout*/) {
     82void action::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/,
     83                     cgiargsclass &/*args*/, recptproto */*collectproto*/,
     84                     ostream &/*logout*/) {
    8185}
    8286
     
    157161// define all the macros which might be used by other actions
    158162// to produce pages. These macros should be well documented.
    159 void action::define_external_macros (displayclass &/*disp*/, cgiargsclass &/*args*/,
    160                      recptproto */*collectproto*/, ostream &/*logout*/) {
     163void action::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/,
     164                     cgiargsclass &/*args*/, recptproto */*collectproto*/,
     165                     ostream &/*logout*/) {
    161166}
    162167
    163168// returns false if there was an error which prevented the action
    164169// from outputing anything.
    165 bool action::do_action (cgiargsclass &/*args*/, recptproto */*collectproto*/,
    166             displayclass &/*disp*/, outconvertclass &/*outconvert*/,
    167             ostream &/*textout*/, ostream &/*logout*/) {
     170bool action::do_action (cgiargsclass &/*args*/, const ColInfoResponse_t &/*collectinfo*/,
     171            recptproto */*collectproto*/, displayclass &/*disp*/,
     172            outconvertclass &/*outconvert*/, ostream &/*textout*/,
     173            ostream &/*logout*/) {
    168174  return true;
    169175}
  • trunk/gsdl/src/recpt/action.h

    r361 r421  
    8383  // define all the macros which are related to pages generated
    8484  // 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);
    8788
    8889  // define all the macros which might be used by other actions
    8990  // 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);
    9294
    9395  // returns false if there was an error which prevented the action
    9496  // 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);
    98101 
    99102  // getargsinfo should be called after all configuration files
  • trunk/gsdl/src/recpt/authenaction.cpp

    r374 r421  
    1212/*
    1313   $Log$
     14   Revision 1.4  1999/07/30 02:24:43  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.3  1999/07/13 23:23:26  rjmcnab
    1518   Put users in their own gdbm database. Moved a lot of functionality to usersdb
     
    259262}
    260263
    261 void authenaction::define_internal_macros (displayclass &disp, cgiargsclass &args,
    262                       recptproto */*collectproto*/, ostream &/*logout*/) {
     264void authenaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp,
     265                       cgiargsclass &args, recptproto */*collectproto*/,
     266                       ostream &/*logout*/) {
    263267  // sets _authen:messageextra_ based on the value of args["us"]
    264268  //      _authen:hiddenargs_   to contain all the arguments that were
     
    296300}
    297301
    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*/) {
     302void authenaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/,
     303                       cgiargsclass &/*args*/, recptproto */*collectproto*/,
     304                       ostream &/*logout*/) {
     305}
     306
     307bool authenaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/,
     308                  recptproto */*collectproto*/, displayclass &disp,
     309                  outconvertclass &outconvert, ostream &textout,
     310                  ostream &/*logout*/) {
    305311  if (args["us"] == "enabled") {
    306312    // have been authenticated
  • trunk/gsdl/src/recpt/authenaction.h

    r374 r421  
    5353             text_t &response_data, ostream &logout);
    5454 
    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);
    5961 
    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);
    6366};
    6467
  • trunk/gsdl/src/recpt/pageaction.cpp

    r284 r421  
    1212/*
    1313   $Log$
     14   Revision 1.8  1999/07/30 02:24:44  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.7  1999/06/24 05:12:24  sjboddie
    1518   lots of small changes
     
    8689
    8790
    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.
     93void pageaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/,
     94                     cgiargsclass &/*args*/, recptproto */*collectproto*/,
     95                     ostream &/*logout*/) {
     96}
     97
     98
     99void pageaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp,
     100                     cgiargsclass &args, recptproto */*collectproto*/,
     101                     ostream &logout) {
    90102
    91103  // define_internal_macros sets the following macros:
     
    128140        if (err == noError) {
    129141
    130           homeextra += "<dt><a href=\"_httppagex_(about)&c=" + *collist_here + "\">"
     142          homeextra += "<dt><a href=\"_httpquery_&c=" + *collist_here + "\">"
    131143        + *collist_here + "</a></dt>\n";
    132144          homeextra += "<dd>";
     
    147159}
    148160
    149 bool pageaction::do_action (cgiargsclass &args, recptproto */*collectproto*/,
    150                 displayclass &disp, outconvertclass &outconvert,
    151                 ostream &textout, ostream &/*logout*/) {
     161bool pageaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/,
     162                recptproto */*collectproto*/, displayclass &disp,
     163                outconvertclass &outconvert, ostream &textout,
     164                ostream &/*logout*/) {
    152165
    153166  text_t &arg_p = args["p"];
  • trunk/gsdl/src/recpt/pageaction.h

    r284 r421  
    3838             text_t &response_data, ostream &logout);
    3939
    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);
    4243
    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);
    4652};
    4753
  • trunk/gsdl/src/recpt/pingaction.cpp

    r172 r421  
    1212/*
    1313   $Log$
     14   Revision 1.3  1999/07/30 02:24:45  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.2  1999/02/25 21:58:59  rjmcnab
    1518
     
    4649
    4750
    48 bool pingaction::do_action (cgiargsclass &args, recptproto *collectproto,
    49                 displayclass &/*disp*/, outconvertclass &outconvert,
    50                 ostream &textout, ostream &logout) {
     51bool pingaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/,
     52                recptproto *collectproto, displayclass &/*disp*/,
     53                outconvertclass &outconvert, ostream &textout,
     54                ostream &logout) {
    5155  bool wassuccess = false;
    5256  comerror_t err;
  • trunk/gsdl/src/recpt/pingaction.h

    r172 r421  
    2626  void get_cgihead_info (cgiargsclass &args, response_t &response,
    2727             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);
    3132};
    3233
  • trunk/gsdl/src/recpt/queryaction.cpp

    r403 r421  
    1212/*
    1313   $Log$
     14   Revision 1.17  1999/07/30 02:24:42  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.16  1999/07/19 00:16:58  sjboddie
    1518   no longer display documents that don't match all phrases in query string
     
    297300}
    298301
    299 void queryaction::define_internal_macros (displayclass &disp, cgiargsclass &args,
    300                       recptproto */*collectproto*/, ostream &/*logout*/) {
     302void queryaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp,
     303                      cgiargsclass &args, recptproto */*collectproto*/,
     304                      ostream &/*logout*/) {
    301305
    302306  // define_internal_macros sets the following macros:
     
    374378}
    375379
    376 void queryaction::define_external_macros (displayclass &disp, cgiargsclass &args,
    377                       recptproto *collectproto, ostream &logout) {
     380void queryaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp,
     381                      cgiargsclass &args, recptproto *collectproto,
     382                      ostream &logout) {
    378383
    379384  // define_external_macros sets the following macros:
     
    421426}
    422427
    423 bool queryaction::do_action (cgiargsclass &args, recptproto *collectproto,
    424                  displayclass &disp, outconvertclass &outconvert,
    425                  ostream &textout, ostream &logout) {
    426 
    427   // if we have no format string see if the collection server has one
     428bool queryaction::do_action (cgiargsclass &args, const ColInfoResponse_t &collectinfo,
     429                 recptproto *collectproto, displayclass &disp,
     430                 outconvertclass &outconvert, ostream &textout,
     431                 ostream &logout) {
     432
    428433  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
    438439  // if we still don't have a format string use the default
    439440  if (formatstring.empty())
  • trunk/gsdl/src/recpt/queryaction.h

    r403 r421  
    4545             text_t &response_data, ostream &logout);
    4646 
    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);
    5151 
    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);
    5556};
    5657
  • trunk/gsdl/src/recpt/statusaction.cpp

    r376 r421  
    1212/*
    1313   $Log$
     14   Revision 1.15  1999/07/30 02:24:42  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.14  1999/07/13 23:26:07  rjmcnab
    1518   Added support for authenaction and usersaction
     
    709712}
    710713
    711 bool statusaction::do_action (cgiargsclass &args, recptproto */*collectproto*/,
    712                   displayclass &disp, outconvertclass &outconvert,
    713                   ostream &textout, ostream &logout) {
     714bool statusaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/,
     715                  recptproto */*collectproto*/, displayclass &disp,
     716                  outconvertclass &outconvert, ostream &textout,
     717                  ostream &logout) {
    714718  // make sure the status function is enabled
    715719  if (disabled) {
  • trunk/gsdl/src/recpt/statusaction.h

    r261 r421  
    6868  void get_cgihead_info (cgiargsclass &args, response_t &response,
    6969             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);
    7374
    7475  void configure (const text_t &key, const text_tarray &cfgline);
  • trunk/gsdl/src/recpt/tipaction.cpp

    r357 r421  
    1212/*
    1313   $Log$
     14   Revision 1.2  1999/07/30 02:24:45  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.1  1999/07/09 02:18:27  rjmcnab
    1518   Initial revision.
     
    2326
    2427
    25 void tipaction::define_external_macros (displayclass &disp, cgiargsclass &/*args*/,
    26                     recptproto */*collectproto*/, ostream &logout) {
     28void tipaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &disp,
     29                    cgiargsclass &/*args*/, recptproto */*collectproto*/,
     30                    ostream &logout) {
    2731
    2832  // define_external_macros sets the following macros:
  • trunk/gsdl/src/recpt/tipaction.h

    r357 r421  
    2525  text_t get_action_name () {return "tip";}
    2626 
    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);
    2930};
    3031
  • trunk/gsdl/src/recpt/usersaction.cpp

    r373 r421  
    1212/*
    1313   $Log$
     14   Revision 1.2  1999/07/30 02:24:44  sjboddie
     15   added collectinfo argument to some functions
     16
    1417   Revision 1.1  1999/07/13 23:22:05  rjmcnab
    1518   Initial revision.
     
    173176}
    174177
    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) {
     178void usersaction::define_internal_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/,
     179                      cgiargsclass &/*args*/, recptproto */*collectproto*/,
     180                      ostream &/*logout*/) {
     181}
     182
     183void usersaction::define_external_macros (const ColInfoResponse_t &/*collectinfo*/, displayclass &/*disp*/,
     184                      cgiargsclass &/*args*/, recptproto */*collectproto*/,
     185                      ostream &/*logout*/) {
     186}
     187
     188bool usersaction::do_action (cgiargsclass &args, const ColInfoResponse_t &/*collectinfo*/,
     189                 recptproto *collectproto, displayclass &disp,
     190                 outconvertclass &outconvert, ostream &textout,
     191                 ostream &logout) {
    186192  if (args["uma"] == "adduser" || args["uma"] == "edituser") {
    187193    // adduser is handled by edituser
  • trunk/gsdl/src/recpt/usersaction.h

    r373 r421  
    3737             text_t &response_data, ostream &logout);
    3838 
    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);
    4345 
    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);
    4750
    4851protected:
Note: See TracChangeset for help on using the changeset viewer.