- Timestamp:
- 2000-09-07T09:51:08+12:00 (24 years ago)
- Location:
- branches/corba/gsdl/src/colservr
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/corba/gsdl/src/colservr/collectserver.cpp
r830 r1510 29 29 /* 30 30 $Log$ 31 Revision 1.20.2.1 2000/09/06 21:51:06 davidb 32 33 Improvements to corba implementation so images within a collection 34 are handled better and images in the remote site that are missing 35 locally are cached. 36 31 37 Revision 1.20 1999/12/13 02:56:22 davidb 32 38 Support for cross-collection searching (CCS) … … 144 150 else if (key == "building" && cfgline.size() == 2) 145 151 collectinfo.building[cfgline[0]] = cfgline[1]; 152 else if (key == "httpdomain") collectinfo.httpdomain = value; 153 else if (key == "httpprefix") collectinfo.httpprefix = value; 146 154 else if (key == "receptionist") collectinfo.receptionist = value; 147 155 } … … 204 212 205 213 206 void collectserver::get_collectinfo (ColInfoResponse_t &re ponse,214 void collectserver::get_collectinfo (ColInfoResponse_t &response, 207 215 comerror_t &err, ostream &/*logout*/) { 208 re ponse = collectinfo;216 response = collectinfo; 209 217 err = noError; 210 218 } -
branches/corba/gsdl/src/colservr/collectset.cpp
r1068 r1510 48 48 // get gsdlhome (if we fail the error will be picked up later -- in 49 49 // cgiwrapper) 50 if (site_cfg_read (gsdlhome )) {50 if (site_cfg_read (gsdlhome,httpdomain,httpprefix)) { 51 51 text_t collectdir = filename_cat (gsdlhome, "collect"); 52 52 if (!read_dir (collectdir, collections)) { … … 55 55 } 56 56 } 57 57 58 58 text_tarray::const_iterator thiscol = collections.begin(); 59 59 text_tarray::const_iterator endcol = collections.end(); … … 124 124 // are available to decode defaultindex, defaultsubcollection, and 125 125 // defaultlanguage 126 126 127 if (!build_cfg_read (*((*here).second.c), configinfo.gsdlhome, 127 128 configinfo.collection)) { 128 129 outconvertclass text_t2ascii; 129 130 logout << text_t2ascii 130 << "Warning: couldn't read build.cfg file for collection \"" //****131 << "Warning: couldn't read build.cfg file for collection \"" 131 132 << configinfo.collection << "\", gsdlhome=\"" 132 133 << configinfo.gsdlhome << "\"\n"; 133 // return false; //****134 134 here ++; 135 135 continue; … … 143 143 << configinfo.collection << "\", gsdlhome=\"" 144 144 << configinfo.gsdlhome << "\"\n"; 145 // return false; //****146 145 here ++; 147 146 continue; … … 149 148 150 149 if (!(*here).second.c->init (logout)) return false; 150 151 (*here).second.c->configure("httpdomain",httpdomain); 152 (*here).second.c->configure("httpprefix",httpprefix); 151 153 } 152 154 here++; … … 176 178 } 177 179 } else { 180 // cout << "*** Passing on key = " << key << " = " << cfgline[0] << endl; // **** 178 181 (*here).second.c->configure (key, cfgline); 179 182 } -
branches/corba/gsdl/src/colservr/collectset.h
r1068 r1510 16 16 collectservermapclass cservers; 17 17 int noofservers; 18 text_t httpdomain; 19 text_t httpprefix; 20 18 21 public: 19 22 collectset(text_t &gsdlhome); -
branches/corba/gsdl/src/colservr/colservrconfig.cpp
r1067 r1510 28 28 /* 29 29 $Log$ 30 Revision 1.2.2.2 2000/09/06 21:51:07 davidb 31 32 Improvements to corba implementation so images within a collection 33 are handled better and images in the remote site that are missing 34 locally are cached. 35 30 36 Revision 1.2.2.1 2000/04/04 15:02:31 cs025 31 37 Corba first commit … … 60 66 bool collect_cfg_read (collectserver &cserver, const text_t &gsdlhome, 61 67 const text_t &collection) { 68 62 69 text_t filename = filename_cat (gsdlhome, "collect"); 63 70 filename = filename_cat (filename, collection); … … 100 107 bool build_cfg_read (collectserver &cserver, const text_t &gsdlhome, 101 108 const text_t &collection) { 109 102 110 text_t filename = filename_cat (gsdlhome, "collect"); 103 111 filename = filename_cat (filename, collection); -
branches/corba/gsdl/src/colservr/corbaServer.mpp
r1087 r1510 86 86 text_t dirname; 87 87 char * cdirname; 88 89 cout << "CorbaServer: gsdlhome = " << home << endl; 90 88 91 this->gsdlhome = home; 89 92 cout << gsdlhome.getcstr() << endl; … … 97 100 } 98 101 99 CORBA::Boolean init ()102 CORBA::Boolean initialise() 100 103 { 101 104 ofstream logout; … … 116 119 corbatext_corbaArrayToArray(corbaCfgline, &cfgline); 117 120 118 protocol->configure(key, cfgline); 121 // **** 122 cout << "Recieved " << key << " = "; 123 for (int i=0; i<cfgline.size(); i++) 124 { 125 cout << cfgline[i] << " "; 126 } 127 cout << endl; 128 129 // DB // **** 130 if (key=="gsdlhome") 131 { 132 text_tarray cfgline; 133 cfgline.push_back (gsdlhome); 134 cout << "Changing gsdlhome to " << gsdlhome << endl; 135 protocol->configure(key,cfgline); 136 } 137 else if (key=="httpdomain") 138 { 139 // Only let gsdlhome through !!!! // **** 140 cout << "Supressing httpdomain" << endl; 141 } 142 else if (key=="httpprefix") 143 { 144 cout << "Supressing httpprefix" << endl; 145 } 146 else 147 { 148 protocol->configure(key, cfgline); 149 } 119 150 } 120 151 … … 131 162 cct = new corbaconv_text_t(corbaCollect); 132 163 133 cout << "Collection: " << cct->getcstr() << endl;164 // cout << "Collection: " << cct->getcstr() << endl; // **** 134 165 135 166 protocol->has_collection(*cct, _has, err, logout); // 'cct' typecast to text_t … … 143 174 } 144 175 145 cout << " " << has << endl;176 // cout << " " << has << endl; // **** 146 177 147 178 delete cct; … … 224 255 protocol->get_collectinfo(collection, response, error, logout); 225 256 257 cout << "IsPublic = " << ((response.isPublic)?"True":"False") << endl; 258 cout << "IsBeta = " << ((response.isBeta) ?"True":"False") << endl; 259 cout << "BuildDate = " << response.buildDate << endl; 260 cout << "NumDocs = " << response.numDocs << endl; 261 cout << "NumBytes = " << response.numBytes << endl; 262 cout << "NumWords = " << response.numWords << endl; 263 226 264 corbaResponse.isPublic = response.isPublic; 227 265 corbaResponse.isBeta = response.isBeta; … … 236 274 corbatext_mapToCorbaMap(response.format, &corbaResponse.format); 237 275 corbatext_mapToCorbaMap(response.building, &corbaResponse.building); 276 corbaconv_text_t::getCorbatext(response.httpdomain,corbaResponse.httpdomain); 277 278 corbaconv_text_t::getCorbatext(response.httpprefix,corbaResponse.httpprefix); 238 279 corbaconv_text_t::getCorbatext(response.receptionist,corbaResponse.receptionist); 280 281 /* text_tmap::iterator f_here = response.format.begin(); 282 text_tmap::iterator f_end = response.format.end(); 283 while (f_here!=f_end) 284 { 285 cout << "**** format: " << f_here->first << " = " << f_here->second << endl; 286 f_here++; 287 } 288 */ // **** 239 289 240 290 logout.close(); … … 349 399 350 400 protocol->get_collection_list(collist, err, logout); 401 402 351 403 352 404 /* reply = new stringSeq(collections.size()); … … 363 415 */ 364 416 365 // cout << "Replying " << collist.size() << endl;366 367 417 corbatext_arrayToCorbaArray(collist, &corbalist); 368 cout << "Replying " << collist.size() << endl; 418 cout << "Replying " << collist.size() << ": " << endl; 419 420 for (int i = 0; i < collist.size(); i ++) 421 { 422 cout << collist[i]; 423 if (i<collist.size()-1) cout << ", "; 424 } 425 cout << endl; 426 369 427 370 428 logout.close();
Note:
See TracChangeset
for help on using the changeset viewer.