Ignore:
Timestamp:
1999-02-04T23:00:57+13:00 (25 years ago)
Author:
rjmcnab
Message:

Developed the idea of an "action" and having them define the cgi arguments
which they need and how those cgi arguments function.

File:
1 edited

Legend:

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

    r145 r146  
    1212/*
    1313   $Log$
     14   Revision 1.3  1999/02/04 10:00:56  rjmcnab
     15
     16   Developed the idea of an "action" and having them define the cgi arguments
     17   which they need and how those cgi arguments function.
     18
    1419   Revision 1.2  1999/02/04 01:17:27  rjmcnab
    1520
     
    7378// meaningless output), instead an error page should be
    7479// produced by the calling code.
    75 bool receptionist::init (ostream &logout) {
     80bool receptionist::digest (ostream &logout) {
    7681  // redirect the error output to logout
    77   disp.setlogout (&logout);
     82  //  disp.setlogout (&logout);
    7883
    7984  // set default values for the configuration file
    80   cfg_info.defaultaction = "p";
    81   cfg_info.defaultpage = "about";
    82   cfg_info.defaultencoding = "w";
     85  //  cfg_info.defaultaction = "p";
     86  //  cfg_info.defaultpage = "about";
     87  //  cfg_info.defaultencoding = "w";
    8388
    8489  // read in the configuration files etc/collect.cfg and index/build.cfg
    8590  // entries in build.cfg should override those in collect.cfg
    86   filename = filename_cat (collectdir, "etc");
    87   filename = filename_cat (filename, "collect.cfg");
    88   cfg_read(filename);
     91  //  filename = filename_cat (collectdir, "etc");
     92  //  filename = filename_cat (filename, "collect.cfg");
     93  //  cfg_read(filename);
    8994
    9095  // load up the default macro files, the collection directory
    9196  // is searched first for the file and then the main directory
    92   text_t colmacrodir = filename_cat (collectdir, "macros");
    93   text_t gsdlmacrodir = filename_cat (gsdlhome, "macros");
    94   text_tarray::iterator arrhere = cfg_info.macrofiles.begin();
    95   text_tarray::iterator arrend = cfg_info.macrofiles.end();
    96   while (arrhere != arrend) {
    97     filename = filename_cat (colmacrodir, *arrhere);
    98     if (!file_exists (filename)) {
    99       filename = filename_cat (gsdlmacrodir, *arrhere);
    100     }
    101     disp.loaddefaultmacros(filename);
    102     arrhere++;
    103   }
     97  //  text_t colmacrodir = filename_cat (collectdir, "macros");
     98  //  text_t gsdlmacrodir = filename_cat (gsdlhome, "macros");
     99  //  text_tarray::iterator arrhere = cfg_info.macrofiles.begin();
     100  //  text_tarray::iterator arrend = cfg_info.macrofiles.end();
     101  //  while (arrhere != arrend) {
     102  //    filename = filename_cat (colmacrodir, *arrhere);
     103  //    if (!file_exists (filename)) {
     104  //      filename = filename_cat (gsdlmacrodir, *arrhere);
     105  //    }
     106  //    disp.loaddefaultmacros(filename);
     107  //    arrhere++;
     108  //  }
    104109
    105   srand(time(NULL));
     110  //  srand(time(NULL));
    106111
    107   utf8outconvert.set_rzws(1);
    108   gboutconvert.set_rzws(1);
     112  //  utf8outconvert.set_rzws(1);
     113  //  gboutconvert.set_rzws(1);
    109114
    110   return collect_init(collection);
     115  //  return collect_init(collection);
     116  return true;
    111117}
    112118
     
    134140// contains content then reponse_data contains the content-type.
    135141// Note that images can now be produced by the receptionist.
    136 void receptionist::get_cgihead_info (const cgiargsclass &args, response_t &response,
     142void receptionist::get_cgihead_info (cgiargsclass &args, response_t &response,
    137143                     text_t &response_data, ostream &logout) {
    138144}
     
    140146
    141147// produce the page content
    142 void receptionist::produce_content (const cgiargsclass &args, ostream &contentout,
     148void receptionist::produce_content (cgiargsclass &args, ostream &contentout,
    143149                    ostream &logout) {
    144150}
Note: See TracChangeset for help on using the changeset viewer.