Ignore:
Timestamp:
1999-02-08T14:28:04+13:00 (25 years ago)
Author:
rjmcnab
Message:

Got the receptionist producing something using the statusaction.

File:
1 edited

Legend:

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

    r150 r155  
    1212/*
    1313   $Log$
     14   Revision 1.4  1999/02/08 01:27:59  rjmcnab
     15
     16   Got the receptionist producing something using the statusaction.
     17
    1418   Revision 1.3  1999/02/05 10:42:41  rjmcnab
    1519
     
    3640
    3741
     42// define all the macros which are related to pages generated
     43// by this action
     44void action::define_internal_macros (displayclass &/*disp*/, cgiargsclass &/*args*/,
     45                     ostream &/*logout*/) {
     46}
     47
    3848action::action () {
    3949}
     
    4959}
    5060
     61// check_cgiargs should be called before get_cgihead_info,
     62// define_external_macros, and do_action. If an error is found
     63// a message will be written to logout, if the error is severe
     64// then the function will return false and no page content
     65// should be produced based on the arguments.
     66bool action::check_cgiargs (cgiargsclass &args, ostream &logout) {
     67  return true;
     68}
     69
    5170// get_cgihead_info determines the cgi header information for
    5271// a set of cgi arguments. If response contains location then
     
    5473// contains content then reponse_data contains the content-type.
    5574// Note that images can now be produced by the receptionist.
    56 void action::get_cgihead_info (cgiargsclass &args, response_t &response,
    57                    text_t &response_data, ostream &logout) {
     75void action::get_cgihead_info (cgiargsclass &/*args*/, response_t &response,
     76                   text_t &response_data, ostream &/*logout*/) {
    5877  response = location;
    5978  response_data = "http://www.nzdl.org";
    6079}
    6180 
     81// define all the macros which might be used by other actions
     82// to produce pages. These macros should be well documented.
     83void action::define_external_macros (displayclass &/*disp*/, cgiargsclass &/*args*/,
     84                     ostream &/*logout*/) {
     85}
     86
    6287// returns false if there was an error which prevented the action
    6388// from outputing anything.
    64 bool action::do_action (cgiargsclass &args, outconvertclass &outconvert,
    65             ostream &textout, ostream &logout) {
     89bool action::do_action (cgiargsclass &/*args*/, outconvertclass &/*outconvert*/,
     90            ostream &/*textout*/, ostream &/*logout*/) {
    6691  return true;
    6792}
    6893
    6994// configure should be called once for each configuration line
    70 void action::configure (const text_tarray &cfgline) {
     95// the default version configures the default for any arguments
     96// which this action uses
     97void action::configure (const text_t &key, const text_tarray &cfgline) {
     98  cgiarginfo *info = NULL;
     99  if ((key == "argdefault") && (cfgline.size() == 2) &&
     100      ((info = argsinfo.getarginfo(cfgline[0])) != NULL)) {
     101    if (info->defaultstatus <= cgiarginfo::config) {
     102      info->defaultstatus = cgiarginfo::config;
     103      info->argdefault = cfgline[1];
     104    }
     105  }
    71106}
    72107
    73108
     109
     110actionmapclass::actionmapclass () {
     111}
    74112
    75113// theaction becomes the property of this class after addaction
     
    98136  return (*here).second.a;
    99137}
     138
Note: See TracChangeset for help on using the changeset viewer.