Changeset 1964
- Timestamp:
- 2001-02-13T15:49:48+13:00 (23 years ago)
- Location:
- trunk/cstr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cstr/etc/collect.cfg
r1066 r1964 7 7 defaultindex document:text 8 8 9 macrofiles style.dm base.dm query.dm help.dm \ 10 pref.dm about.dm document.dm \ 11 english.dm chinese.dm maori.dm \ 12 cstr.dm 9 macrofiles style.dm base.dm query.dm help.dm pref.dm \ 10 about.dm document.dm status.dm authen.dm \ 11 users.dm html.dm extlink.dm \ 12 english.dm chinese.dm french.dm german.dm maori.dm \ 13 english2.dm french2.dm arabic.dm spanish.dm dutch.dm \ 14 port.dm collect.dm cstr.dm 15 13 16 14 17 plugin GMLPlug … … 38 41 collectionmeta .document:text "documents" 39 42 40 receptionist / fast-cgi-bin/cstrlibrary?a=p&p=about43 receptionist /cgi-bin/cstrlibrary?a=p&p=about 41 44 42 45 -
trunk/cstr/macros/cstr.dm
r1489 r1964 1 1 package Global 2 2 3 _httppagehome_ [c=cstr] {/ fast-cgi-bin/library?a=p&p=home}3 _httppagehome_ [c=cstr] {/cgi-bin/library?a=p&p=home} 4 4 5 5 package document -
trunk/cstr/src/recpt/cstrlibrarymain.cpp
r1065 r1964 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 23 * 24 * $Id$25 24 * 26 25 *********************************************************************/ 27 26 28 /*29 $Log$30 Revision 1.4 2000/04/04 04:43:07 nzdl31 caught cstr collection up with DocumentColumn stuff32 33 Revision 1.3 2000/02/21 21:45:08 sjboddie34 gsdlhome now set from gsdlsite.cfg35 36 Revision 1.2 2000/02/06 21:25:22 sjboddie37 updated cstr38 39 Revision 1.1 1999/09/07 21:49:43 sjboddie40 new cstr receptionist41 42 */43 44 27 #include "receptionist.h" 28 #include "collectset.h" 45 29 #include "cgiwrapper.h" 46 30 #include "nullproto.h" 47 #include "collectserver.h"48 #include "filter.h"49 #include "browsefilter.h"50 #include "queryfilter.h"51 #include "infodbclass.h"52 #include "mgsearch.h"53 #include "mggdbmsource.h"54 31 #include "fileutil.h" 55 32 #include <assert.h> … … 63 40 #include "authenaction.h" 64 41 #include "usersaction.h" 65 #include "authenaction.h"66 42 67 43 #include "browserclass.h" … … 78 54 receptionist recpt; 79 55 nullproto nproto; 80 81 // add a collection server82 text_tarray collections;83 collections.push_back ("cstr");84 56 57 text_t gsdlhome, httpdomain, httpprefix; 85 58 // get gsdlhome (if we fail the error will be picked up later -- in 86 59 // cgiwrapper) 87 text_t gsdlhome; 88 site_cfg_read (gsdlhome); 60 site_cfg_read (gsdlhome, httpdomain, httpprefix); 61 collectset *cservers = new collectset(); 62 cservers->add_collection ("cstr", &recpt, gsdlhome, gsdlhome); 89 63 90 text_tarray::const_iterator thiscol = collections.begin(); 91 text_tarray::const_iterator endcol = collections.end(); 64 nproto.set_collectset(cservers); 92 65 93 while (thiscol != endcol) { 94 95 // this memory is created but never destroyed 96 // we're also not doing any error checking to make sure we didn't 97 // run out of memory 98 collectserver *cserver = new collectserver(); 99 gdbmclass *gdbmhandler = new gdbmclass(); 100 mgsearchclass *mgsearch = new mgsearchclass(); 101 102 // add a null filter 103 filterclass *filter = new filterclass (); 104 cserver->add_filter (filter); 105 106 // add a browse filter 107 browsefilterclass *browsefilter = new browsefilterclass(); 108 browsefilter->set_gdbmptr (gdbmhandler); 109 cserver->add_filter (browsefilter); 110 111 // add a query filter 112 queryfilterclass *queryfilter = new queryfilterclass(); 113 queryfilter->set_gdbmptr (gdbmhandler); 114 queryfilter->set_mgsearchptr (mgsearch); 115 cserver->add_filter (queryfilter); 116 117 // add a mg and gdbm source 118 mggdbmsourceclass *mggdbmsource = new mggdbmsourceclass (); 119 mggdbmsource->set_gdbmptr (gdbmhandler); 120 mggdbmsource->set_mgsearchptr (mgsearch); 121 cserver->add_source (mggdbmsource); 122 123 // inform collection server and everything it contains about its 124 // collection name 125 cserver->configure ("collection", *thiscol); 126 127 nproto.add_collectserver (cserver); 128 thiscol ++; 129 } 66 // configure the receptionist server list 67 cservers->setReceptionistServers(recpt, gsdlhome); 130 68 131 69 // add the protocol to the receptionist 132 70 recpt.add_protocol (&nproto); 133 134 // add other converters135 utf8inconvertclass utf8inconvert;136 utf8outconvertclass utf8outconvert;137 recpt.add_converter ("u", &utf8inconvert, &utf8outconvert);138 139 if (!gsdlhome.empty()) {140 mapinconvertclass gbinconvert;141 gbinconvert.setmapfile (gsdlhome, "gbku", 0x25a1);142 mapoutconvertclass gboutconvert;143 gboutconvert.setmapfile (gsdlhome, "ugbk", 0xa1f5);144 recpt.add_converter ("g", &gbinconvert, &gboutconvert);145 }146 71 147 72 // the list of actions. Note: these actions will become invalid … … 152 77 153 78 pageaction apageaction; 79 apageaction.set_receptionist (&recpt); 154 80 recpt.add_action (&apageaction); 155 81 … … 158 84 159 85 queryaction aqueryaction; 86 aqueryaction.set_receptionist (&recpt); 160 87 recpt.add_action (&aqueryaction); 161 88 162 89 cstrdocaction adocumentaction; 90 adocumentaction.set_receptionist (&recpt); 163 91 recpt.add_action (&adocumentaction); 164 92 … … 193 121 return 0; 194 122 } 195 196 197 198
Note:
See TracChangeset
for help on using the changeset viewer.