Changeset 2113
- Timestamp:
- 2001-03-05T13:54:26+13:00 (23 years ago)
- Location:
- trunk/gsdl
- Files:
-
- 2 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/gsdlsite.cfg
r1157 r2113 3 3 4 4 # points to the GSDLHOME directory 5 gsdlhome **GSDLHOME**5 gsdlhome /home/say1/auto/gsdl 6 6 7 7 # this is the http address of GSDLHOME -
trunk/gsdl/lib/Makefile.in
r1939 r2113 31 31 #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual 32 32 CCFLAGS = @CFLAGS@ 33 MCFLAGS = @CFLAGS@-Wall -Wunused33 MCFLAGS = -Wall -Wunused 34 34 DEFS = @DEFS@ 35 35 INCLUDES = -I../packages/mg/lib -I.. … … 44 44 endif 45 45 endif 46 MINCLUDES = -I .-I../packages/mg/lib $(MICO_INC) -I..46 MINCLUDES = -I/usr/include/g++-2/ -I/usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/include/ -I/usr/include -I. -I../packages/mico/mico/include -I../packages/mg/lib $(MICO_INC) -I.. 47 47 RANLIB = @RANLIB@ 48 48 USE_CORBA = @USE_CORBA@ -
trunk/gsdl/lib/corbaconv_text_t.mpp
r1860 r2113 52 52 # include "WIN32cfg.h" 53 53 # else 54 # include " config.h"54 # include "mico/config.h" 55 55 # endif 56 56 #endif -
trunk/gsdl/lib/corbaiface.h
r1860 r2113 26 26 #endif 27 27 typedef TSeqVar<SequenceTmpl<CORBA::UShort,MICO_TID_DEF> > usString_var; 28 typedef usString_varusString_out;28 typedef TSeqOut<SequenceTmpl<CORBA::UShort,MICO_TID_DEF> > usString_out; 29 29 30 30 typedef StringSequenceTmpl<CORBA::String_var> stringSeq; … … 33 33 #endif 34 34 typedef TSeqVar<StringSequenceTmpl<CORBA::String_var> > stringSeq_var; 35 typedef stringSeq_varstringSeq_out;35 typedef TSeqOut<StringSequenceTmpl<CORBA::String_var> > stringSeq_out; 36 36 37 37 struct corbatext_t; 38 38 typedef TVarVar<corbatext_t> corbatext_t_var; 39 typedef corbatext_t_varcorbatext_t_out;39 typedef TVarOut<corbatext_t> corbatext_t_out; 40 40 41 41 struct corbatext_t { … … 60 60 #endif 61 61 typedef TSeqVar<SequenceTmpl<corbatext_t,MICO_TID_DEF> > corbatext_tarray_var; 62 typedef corbatext_tarray_varcorbatext_tarray_out;62 typedef TSeqOut<SequenceTmpl<corbatext_t,MICO_TID_DEF> > corbatext_tarray_out; 63 63 64 64 typedef corbatext_tarray corbatext_tset; … … 67 67 #endif 68 68 typedef TSeqVar<corbatext_tarray > corbatext_tset_var; 69 typedef corbatext_tset_varcorbatext_tset_out;69 typedef TSeqOut<corbatext_tarray > corbatext_tset_out; 70 70 71 71 struct corbatext_tmap; 72 72 typedef TVarVar<corbatext_tmap> corbatext_tmap_var; 73 typedef corbatext_tmap_varcorbatext_tmap_out;73 typedef TVarOut<corbatext_tmap> corbatext_tmap_out; 74 74 75 75 struct corbatext_tmap { … … 100 100 struct corbaShortColInfo; 101 101 typedef TVarVar<corbaShortColInfo> corbaShortColInfo_var; 102 typedef corbaShortColInfo_varcorbaShortColInfo_out;102 typedef TVarOut<corbaShortColInfo> corbaShortColInfo_out; 103 103 104 104 struct corbaShortColInfo { … … 120 120 struct corbaColInfoResponse; 121 121 typedef TVarVar<corbaColInfoResponse> corbaColInfoResponse_var; 122 typedef corbaColInfoResponse_varcorbaColInfoResponse_out;122 typedef TVarOut<corbaColInfoResponse> corbaColInfoResponse_out; 123 123 124 124 struct corbaColInfoResponse { … … 152 152 struct corbaDocRequest; 153 153 typedef TVarVar<corbaDocRequest> corbaDocRequest_var; 154 typedef corbaDocRequest_varcorbaDocRequest_out;154 typedef TVarOut<corbaDocRequest> corbaDocRequest_out; 155 155 156 156 struct corbaDocRequest { … … 172 172 struct corbaDocResponse; 173 173 typedef TVarVar<corbaDocResponse> corbaDocResponse_var; 174 typedef corbaDocResponse_varcorbaDocResponse_out;174 typedef TVarOut<corbaDocResponse> corbaDocResponse_out; 175 175 176 176 struct corbaDocResponse { … … 207 207 struct corbaFilterOption; 208 208 typedef TVarVar<corbaFilterOption> corbaFilterOption_var; 209 typedef corbaFilterOption_varcorbaFilterOption_out;209 typedef TVarOut<corbaFilterOption> corbaFilterOption_out; 210 210 211 211 struct corbaFilterOption { … … 232 232 #endif 233 233 typedef TSeqVar<SequenceTmpl<corbaFilterOption,MICO_TID_DEF> > corbaFilterOptionList_var; 234 typedef corbaFilterOptionList_varcorbaFilterOptionList_out;234 typedef TSeqOut<SequenceTmpl<corbaFilterOption,MICO_TID_DEF> > corbaFilterOptionList_out; 235 235 236 236 struct corbaFilterOptionsResponse; 237 237 typedef TVarVar<corbaFilterOptionsResponse> corbaFilterOptionsResponse_var; 238 typedef corbaFilterOptionsResponse_varcorbaFilterOptionsResponse_out;238 typedef TVarOut<corbaFilterOptionsResponse> corbaFilterOptionsResponse_out; 239 239 240 240 struct corbaFilterOptionsResponse { … … 255 255 struct corbaOptionValue; 256 256 typedef TVarVar<corbaOptionValue> corbaOptionValue_var; 257 typedef corbaOptionValue_varcorbaOptionValue_out;257 typedef TVarOut<corbaOptionValue> corbaOptionValue_out; 258 258 259 259 struct corbaOptionValue { … … 277 277 #endif 278 278 typedef TSeqVar<SequenceTmpl<corbaOptionValue,MICO_TID_DEF> > corbaOptionValue_array_var; 279 typedef corbaOptionValue_array_varcorbaOptionValue_array_out;279 typedef TSeqOut<SequenceTmpl<corbaOptionValue,MICO_TID_DEF> > corbaOptionValue_array_out; 280 280 281 281 struct corbaFilterRequest; 282 282 typedef TVarVar<corbaFilterRequest> corbaFilterRequest_var; 283 typedef corbaFilterRequest_varcorbaFilterRequest_out;283 typedef TVarOut<corbaFilterRequest> corbaFilterRequest_out; 284 284 285 285 struct corbaFilterRequest { … … 306 306 struct corbaTermInfo; 307 307 typedef TVarVar<corbaTermInfo> corbaTermInfo_var; 308 typedef corbaTermInfo_varcorbaTermInfo_out;308 typedef TVarOut<corbaTermInfo> corbaTermInfo_out; 309 309 310 310 struct corbaTermInfo { … … 329 329 #endif 330 330 typedef TSeqVar<SequenceTmpl<corbaTermInfo,MICO_TID_DEF> > corbaTermInfo_array_var; 331 typedef corbaTermInfo_array_varcorbaTermInfo_array_out;331 typedef TSeqOut<SequenceTmpl<corbaTermInfo,MICO_TID_DEF> > corbaTermInfo_array_out; 332 332 333 333 struct corbaMetadataInfo; 334 334 typedef TVarVar<corbaMetadataInfo> corbaMetadataInfo_var; 335 typedef corbaMetadataInfo_varcorbaMetadataInfo_out;335 typedef TVarOut<corbaMetadataInfo> corbaMetadataInfo_out; 336 336 337 337 struct corbaMetadataInfo { … … 358 358 #endif 359 359 typedef TSeqVar<SequenceTmpl<corbaMetadataInfo,MICO_TID_DEF> > corbaMetadataInfo_array_var; 360 typedef corbaMetadataInfo_array_varcorbaMetadataInfo_array_out;360 typedef TSeqOut<SequenceTmpl<corbaMetadataInfo,MICO_TID_DEF> > corbaMetadataInfo_array_out; 361 361 362 362 struct corbaMetadataInfo_map; 363 363 typedef TVarVar<corbaMetadataInfo_map> corbaMetadataInfo_map_var; 364 typedef corbaMetadataInfo_map_varcorbaMetadataInfo_map_out;364 typedef TVarOut<corbaMetadataInfo_map> corbaMetadataInfo_map_out; 365 365 366 366 struct corbaMetadataInfo_map { … … 384 384 #endif 385 385 typedef TSeqVar<SequenceTmpl<CORBA::Long,MICO_TID_DEF> > corbaDocFreq_array_var; 386 typedef corbaDocFreq_array_varcorbaDocFreq_array_out;386 typedef TSeqOut<SequenceTmpl<CORBA::Long,MICO_TID_DEF> > corbaDocFreq_array_out; 387 387 388 388 struct corbaResultDocInfo; 389 389 typedef TVarVar<corbaResultDocInfo> corbaResultDocInfo_var; 390 typedef corbaResultDocInfo_varcorbaResultDocInfo_out;390 typedef TVarOut<corbaResultDocInfo> corbaResultDocInfo_out; 391 391 392 392 struct corbaResultDocInfo { … … 418 418 #endif 419 419 typedef TSeqVar<SequenceTmpl<corbaResultDocInfo,MICO_TID_DEF> > corbaResultDocInfo_array_var; 420 typedef corbaResultDocInfo_array_varcorbaResultDocInfo_array_out;420 typedef TSeqOut<SequenceTmpl<corbaResultDocInfo,MICO_TID_DEF> > corbaResultDocInfo_array_out; 421 421 422 422 enum corbaIsApprox { … … 430 430 struct corbaFilterResponse; 431 431 typedef TVarVar<corbaFilterResponse> corbaFilterResponse_var; 432 typedef corbaFilterResponse_varcorbaFilterResponse_out;432 typedef TVarOut<corbaFilterResponse> corbaFilterResponse_out; 433 433 434 434 struct corbaFilterResponse { … … 453 453 typedef corbaiface_ptr corbaifaceRef; 454 454 typedef ObjVar<corbaiface> corbaiface_var; 455 typedef corbaiface_varcorbaiface_out;455 typedef ObjOut<corbaiface> corbaiface_out; 456 456 457 457 … … 485 485 static bool _narrow_helper2( CORBA::Object_ptr obj ); 486 486 487 virtual CORBA::Boolean initialise( ) = 0;488 virtual void configure( const corbatext_t& key, const corbatext_tarray& cfgline ) = 0;489 virtual void collectionList( corbatext_tarray& collist ) = 0;487 virtual CORBA::Boolean initialise( corbaComError& error ) = 0; 488 virtual void configure( const corbatext_t& key, const corbatext_tarray& cfgline, corbaComError& error ) = 0; 489 virtual void collectionList( corbatext_tarray& collist, corbaComError& error ) = 0; 490 490 virtual void hasCollection( const corbatext_t& corbaCollection, CORBA::Boolean& has, corbaComError& error ) = 0; 491 491 virtual CORBA::Boolean ping( const corbatext_t& collection, corbaComError& error ) = 0; … … 509 509 public: 510 510 virtual ~corbaiface_stub(); 511 CORBA::Boolean initialise( );512 void configure( const corbatext_t& key, const corbatext_tarray& cfgline );513 void collectionList( corbatext_tarray& collist );511 CORBA::Boolean initialise( corbaComError& error ); 512 void configure( const corbatext_t& key, const corbatext_tarray& cfgline, corbaComError& error ); 513 void collectionList( corbatext_tarray& collist, corbaComError& error ); 514 514 void hasCollection( const corbatext_t& corbaCollection, CORBA::Boolean& has, corbaComError& error ); 515 515 CORBA::Boolean ping( const corbatext_t& collection, corbaComError& error ); … … 524 524 }; 525 525 526 class corbaiface_skel : 527 virtual public StaticMethodDispatcher, 526 #ifndef MICO_CONF_NO_POA 527 528 class corbaiface_stub_clp : 529 virtual public corbaiface_stub, 530 virtual public PortableServer::StubBase 531 { 532 public: 533 corbaiface_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr); 534 virtual ~corbaiface_stub_clp (); 535 CORBA::Boolean initialise( corbaComError& error ); 536 void configure( const corbatext_t& key, const corbatext_tarray& cfgline, corbaComError& error ); 537 void collectionList( corbatext_tarray& collist, corbaComError& error ); 538 void hasCollection( const corbatext_t& corbaCollection, CORBA::Boolean& has, corbaComError& error ); 539 CORBA::Boolean ping( const corbatext_t& collection, corbaComError& error ); 540 void getDocument( const corbatext_t& collection, corbaDocRequest& request, corbaDocResponse& response, corbaComError& error ); 541 void getCollectInfo( const corbatext_t& collection, corbaColInfoResponse& response, corbaComError& error ); 542 void getFilterInfo( const corbatext_t& collection, corbatext_tarray& filterNames, corbaComError& error ); 543 void getFilterOptions( const corbatext_t& collection, const corbatext_t& option, corbaFilterOptionsResponse& response, corbaComError& error ); 544 void filter( const corbatext_t& collection, const corbaFilterRequest& request, corbaFilterResponse& response, corbaComError& error ); 545 546 protected: 547 corbaiface_stub_clp (); 548 private: 549 void operator=( const corbaiface_stub_clp & ); 550 }; 551 552 #endif // MICO_CONF_NO_POA 553 554 #endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_gsdlInterface) 555 556 #ifndef MICO_NO_TOPLEVEL_MODULES 557 558 } MICO_NAMESPACE_END_DECL 559 #endif 560 561 562 563 #ifndef MICO_CONF_NO_POA 564 565 #ifndef MICO_NO_TOPLEVEL_MODULES 566 MICO_NAMESPACE_DECL POA_gsdlInterface { 567 #endif 568 569 #if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_gsdlInterface) 570 571 572 class corbaiface : virtual public PortableServer::StaticImplementation 573 { 574 public: 575 virtual ~corbaiface (); 576 gsdlInterface::corbaiface_ptr _this (); 577 bool dispatch (CORBA::StaticServerRequest_ptr); 578 virtual void invoke (CORBA::StaticServerRequest_ptr); 579 virtual CORBA::Boolean _is_a (const char *); 580 virtual CORBA::InterfaceDef_ptr _get_interface (); 581 virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr); 582 583 virtual void * _narrow_helper (const char *); 584 static corbaiface * _narrow (PortableServer::Servant); 585 virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr); 586 587 virtual CORBA::Boolean initialise( gsdlInterface::corbaComError& error ) = 0; 588 virtual void configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error ) = 0; 589 virtual void collectionList( gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error ) = 0; 590 virtual void hasCollection( const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error ) = 0; 591 virtual CORBA::Boolean ping( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error ) = 0; 592 virtual void getDocument( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error ) = 0; 593 virtual void getCollectInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error ) = 0; 594 virtual void getFilterInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error ) = 0; 595 virtual void getFilterOptions( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error ) = 0; 596 virtual void filter( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error ) = 0; 597 598 protected: 599 corbaiface () {}; 600 601 private: 602 corbaiface (const corbaiface &); 603 void operator= (const corbaiface &); 604 }; 605 606 #ifdef HAVE_NAMESPACE 607 608 template<class T> 609 class corbaiface_tie : 610 virtual public POA_Tie_Base<T>, 528 611 virtual public corbaiface 529 612 { 530 613 public: 531 corbaiface_skel( const CORBA::BOA::ReferenceData & = CORBA::BOA::ReferenceData() ); 532 virtual ~corbaiface_skel(); 533 corbaiface_skel( CORBA::Object_ptr obj ); 534 virtual bool dispatch( CORBA::StaticServerRequest_ptr _req, CORBA::Environment &_env ); 535 corbaiface_ptr _this(); 536 537 }; 538 539 #endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_gsdlInterface) 614 corbaiface_tie (T &t) 615 : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE) 616 {} 617 corbaiface_tie (T &t, PortableServer::POA_ptr _poa) 618 : POA_Tie_Base<T> (&t, _poa, FALSE) 619 {} 620 corbaiface_tie (T *t, CORBA::Boolean _rel = TRUE) 621 : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel) 622 {} 623 corbaiface_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE) 624 : POA_Tie_Base<T> (t, _poa, _rel) 625 {} 626 virtual ~corbaiface_tie (); 627 628 PortableServer::POA_ptr _default_POA (); 629 630 CORBA::Boolean initialise( gsdlInterface::corbaComError& error ); 631 void configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error ); 632 void collectionList( gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error ); 633 void hasCollection( const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error ); 634 CORBA::Boolean ping( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error ); 635 void getDocument( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error ); 636 void getCollectInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error ); 637 void getFilterInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error ); 638 void getFilterOptions( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error ); 639 void filter( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error ); 640 641 protected: 642 corbaiface_tie () {}; 643 644 private: 645 corbaiface_tie (const corbaiface_tie<T> &); 646 void operator= (const corbaiface_tie<T> &); 647 }; 648 649 template<class T> 650 corbaiface_tie<T>::~corbaiface_tie () 651 { 652 } 653 654 template<class T> 655 PortableServer::POA_ptr 656 corbaiface_tie<T>::_default_POA () 657 { 658 if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) { 659 return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa); 660 } 661 typedef PortableServer::ServantBase _VCHACK__PortableServer__ServantBase; 662 return _VCHACK__PortableServer__ServantBase::_default_POA (); 663 } 664 665 template<class T> 666 CORBA::Boolean 667 corbaiface_tie<T>::initialise (gsdlInterface::corbaComError& error) 668 { 669 return POA_Tie_Base<T>::ptr->initialise (error); 670 } 671 672 template<class T> 673 void 674 corbaiface_tie<T>::configure (const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error) 675 { 676 POA_Tie_Base<T>::ptr->configure (key, cfgline, error); 677 } 678 679 template<class T> 680 void 681 corbaiface_tie<T>::collectionList (gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error) 682 { 683 POA_Tie_Base<T>::ptr->collectionList (collist, error); 684 } 685 686 template<class T> 687 void 688 corbaiface_tie<T>::hasCollection (const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error) 689 { 690 POA_Tie_Base<T>::ptr->hasCollection (corbaCollection, has, error); 691 } 692 693 template<class T> 694 CORBA::Boolean 695 corbaiface_tie<T>::ping (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error) 696 { 697 return POA_Tie_Base<T>::ptr->ping (collection, error); 698 } 699 700 template<class T> 701 void 702 corbaiface_tie<T>::getDocument (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error) 703 { 704 POA_Tie_Base<T>::ptr->getDocument (collection, request, response, error); 705 } 706 707 template<class T> 708 void 709 corbaiface_tie<T>::getCollectInfo (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error) 710 { 711 POA_Tie_Base<T>::ptr->getCollectInfo (collection, response, error); 712 } 713 714 template<class T> 715 void 716 corbaiface_tie<T>::getFilterInfo (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error) 717 { 718 POA_Tie_Base<T>::ptr->getFilterInfo (collection, filterNames, error); 719 } 720 721 template<class T> 722 void 723 corbaiface_tie<T>::getFilterOptions (const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error) 724 { 725 POA_Tie_Base<T>::ptr->getFilterOptions (collection, option, response, error); 726 } 727 728 template<class T> 729 void 730 corbaiface_tie<T>::filter (const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error) 731 { 732 POA_Tie_Base<T>::ptr->filter (collection, request, response, error); 733 } 734 735 #endif 736 737 #endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_gsdlInterface) 540 738 541 739 #ifndef MICO_NO_TOPLEVEL_MODULES 542 740 543 }; 544 #endif 545 546 547 548 #ifndef MICO_CONF_NO_POA 741 } MICO_NAMESPACE_END_DECL 742 #endif 743 744 745 746 #ifndef HAVE_NAMESPACE 747 748 template<class T> 749 class POA_gsdlInterface_corbaiface_tie : 750 virtual public POA_Tie_Base<T>, 751 virtual public POA_gsdlInterface::corbaiface 752 { 753 public: 754 POA_gsdlInterface_corbaiface_tie (T &t) 755 : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE) 756 {} 757 POA_gsdlInterface_corbaiface_tie (T &t, PortableServer::POA_ptr _poa) 758 : POA_Tie_Base<T> (&t, _poa, FALSE) 759 {} 760 POA_gsdlInterface_corbaiface_tie (T *t, CORBA::Boolean _rel = TRUE) 761 : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel) 762 {} 763 POA_gsdlInterface_corbaiface_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE) 764 : POA_Tie_Base<T> (t, _poa, _rel) 765 {} 766 virtual ~POA_gsdlInterface_corbaiface_tie (); 767 768 PortableServer::POA_ptr _default_POA (); 769 770 CORBA::Boolean initialise( gsdlInterface::corbaComError& error ); 771 void configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error ); 772 void collectionList( gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error ); 773 void hasCollection( const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error ); 774 CORBA::Boolean ping( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error ); 775 void getDocument( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error ); 776 void getCollectInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error ); 777 void getFilterInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error ); 778 void getFilterOptions( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error ); 779 void filter( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error ); 780 781 protected: 782 POA_gsdlInterface_corbaiface_tie () {}; 783 784 private: 785 POA_gsdlInterface_corbaiface_tie (const POA_gsdlInterface_corbaiface_tie<T> &); 786 void operator= (const POA_gsdlInterface_corbaiface_tie<T> &); 787 }; 788 789 template<class T> 790 POA_gsdlInterface_corbaiface_tie<T>::~POA_gsdlInterface_corbaiface_tie () 791 { 792 } 793 794 template<class T> 795 PortableServer::POA_ptr 796 POA_gsdlInterface_corbaiface_tie<T>::_default_POA () 797 { 798 if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) { 799 return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa); 800 } 801 typedef PortableServer::ServantBase _VCHACK__PortableServer__ServantBase; 802 return _VCHACK__PortableServer__ServantBase::_default_POA (); 803 } 804 805 template<class T> 806 CORBA::Boolean 807 POA_gsdlInterface_corbaiface_tie<T>::initialise (gsdlInterface::corbaComError& error) 808 { 809 return POA_Tie_Base<T>::ptr->initialise (error); 810 } 811 812 template<class T> 813 void 814 POA_gsdlInterface_corbaiface_tie<T>::configure (const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error) 815 { 816 POA_Tie_Base<T>::ptr->configure (key, cfgline, error); 817 } 818 819 template<class T> 820 void 821 POA_gsdlInterface_corbaiface_tie<T>::collectionList (gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error) 822 { 823 POA_Tie_Base<T>::ptr->collectionList (collist, error); 824 } 825 826 template<class T> 827 void 828 POA_gsdlInterface_corbaiface_tie<T>::hasCollection (const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error) 829 { 830 POA_Tie_Base<T>::ptr->hasCollection (corbaCollection, has, error); 831 } 832 833 template<class T> 834 CORBA::Boolean 835 POA_gsdlInterface_corbaiface_tie<T>::ping (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error) 836 { 837 return POA_Tie_Base<T>::ptr->ping (collection, error); 838 } 839 840 template<class T> 841 void 842 POA_gsdlInterface_corbaiface_tie<T>::getDocument (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error) 843 { 844 POA_Tie_Base<T>::ptr->getDocument (collection, request, response, error); 845 } 846 847 template<class T> 848 void 849 POA_gsdlInterface_corbaiface_tie<T>::getCollectInfo (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error) 850 { 851 POA_Tie_Base<T>::ptr->getCollectInfo (collection, response, error); 852 } 853 854 template<class T> 855 void 856 POA_gsdlInterface_corbaiface_tie<T>::getFilterInfo (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error) 857 { 858 POA_Tie_Base<T>::ptr->getFilterInfo (collection, filterNames, error); 859 } 860 861 template<class T> 862 void 863 POA_gsdlInterface_corbaiface_tie<T>::getFilterOptions (const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error) 864 { 865 POA_Tie_Base<T>::ptr->getFilterOptions (collection, option, response, error); 866 } 867 868 template<class T> 869 void 870 POA_gsdlInterface_corbaiface_tie<T>::filter (const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error) 871 { 872 POA_Tie_Base<T>::ptr->filter (collection, request, response, error); 873 } 874 875 #endif 549 876 550 877 #endif // MICO_CONF_NO_POA -
trunk/gsdl/lib/corbaiface.idl
r1860 r2113 201 201 interface corbaiface 202 202 { 203 boolean initialise(); 204 void configure(in corbatext_t key, in corbatext_tarray cfgline); 205 void collectionList(inout corbatext_tarray collist); 203 boolean initialise(inout corbaComError error); 204 void configure(in corbatext_t key, in corbatext_tarray cfgline, 205 inout corbaComError error); 206 void collectionList(inout corbatext_tarray collist, 207 inout corbaComError error); 206 208 void hasCollection(in corbatext_t corbaCollection, inout boolean has, 207 209 inout corbaComError error); -
trunk/gsdl/lib/corbaiface.mpp
r1860 r2113 1386 1386 } 1387 1387 1388 void *gsdlInterface::corbaiface::_narrow_helper( const char *_r epoid )1389 { 1390 if( strcmp( _r epoid, "IDL:gsdlInterface/corbaiface:1.0" ) == 0 )1388 void *gsdlInterface::corbaiface::_narrow_helper( const char *_rid ) 1389 { 1390 if( strcmp( _rid, "IDL:gsdlInterface/corbaiface:1.0" ) == 0 ) 1391 1391 return (void *)this; 1392 1392 return NULL; … … 1415 1415 return _duplicate( (gsdlInterface::corbaiface_ptr) _p ); 1416 1416 if( _narrow_helper2( _obj ) || 1417 ( !strlen (_obj->_repoid()) &&_obj->_is_a_remote( "IDL:gsdlInterface/corbaiface:1.0" ) ) ) {1417 ( _obj->_is_a_remote( "IDL:gsdlInterface/corbaiface:1.0" ) ) ) { 1418 1418 _o = new gsdlInterface::corbaiface_stub; 1419 1419 _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj ); … … 1434 1434 } 1435 1435 1436 CORBA::Boolean gsdlInterface::corbaiface_stub::initialise() 1437 { 1436 #ifndef MICO_CONF_NO_POA 1437 1438 void * 1439 POA_gsdlInterface::corbaiface::_narrow_helper (const char * repoid) 1440 { 1441 if (strcmp (repoid, "IDL:gsdlInterface/corbaiface:1.0") == 0) { 1442 return (void *) this; 1443 } 1444 return NULL; 1445 } 1446 1447 POA_gsdlInterface::corbaiface * 1448 POA_gsdlInterface::corbaiface::_narrow (PortableServer::Servant serv) 1449 { 1450 void * p; 1451 if ((p = serv->_narrow_helper ("IDL:gsdlInterface/corbaiface:1.0")) != NULL) { 1452 serv->_add_ref (); 1453 return (POA_gsdlInterface::corbaiface *) p; 1454 } 1455 return NULL; 1456 } 1457 1458 gsdlInterface::corbaiface_stub_clp::corbaiface_stub_clp () 1459 { 1460 } 1461 1462 gsdlInterface::corbaiface_stub_clp::corbaiface_stub_clp (PortableServer::POA_ptr poa, CORBA::Object_ptr obj) 1463 : MICO_SCOPE(PortableServer,StubBase) (poa), MICO_SCOPE(CORBA,Object) (*obj) 1464 { 1465 } 1466 1467 gsdlInterface::corbaiface_stub_clp::~corbaiface_stub_clp () 1468 { 1469 } 1470 1471 #endif // MICO_CONF_NO_POA 1472 1473 CORBA::Boolean gsdlInterface::corbaiface_stub::initialise( gsdlInterface::corbaComError& error ) 1474 { 1475 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 1438 1476 CORBA::Boolean _res; 1439 1477 CORBA::StaticAny __res( CORBA::_stc_boolean, &_res ); 1440 1478 1441 1479 CORBA::StaticRequest __req( this, "initialise" ); 1480 __req.add_inout_arg( &_error ); 1442 1481 __req.set_result( &__res ); 1443 1482 … … 1450 1489 1451 1490 1452 void gsdlInterface::corbaiface_stub::configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline ) 1491 #ifndef MICO_CONF_NO_POA 1492 1493 CORBA::Boolean 1494 gsdlInterface::corbaiface_stub_clp::initialise( gsdlInterface::corbaComError& error ) 1495 { 1496 PortableServer::Servant _serv = _preinvoke (); 1497 if (_serv) { 1498 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1499 if (_myserv) { 1500 CORBA::Boolean __res; 1501 1502 #ifdef HAVE_EXCEPTIONS 1503 try { 1504 #endif 1505 __res = _myserv->initialise(error); 1506 #ifdef HAVE_EXCEPTIONS 1507 } 1508 catch (...) { 1509 _myserv->_remove_ref(); 1510 _postinvoke(); 1511 throw; 1512 } 1513 #endif 1514 1515 _myserv->_remove_ref(); 1516 _postinvoke (); 1517 return __res; 1518 } 1519 _postinvoke (); 1520 } 1521 1522 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1523 return _VCHACK__classname::initialise(error); 1524 } 1525 1526 #endif // MICO_CONF_NO_POA 1527 1528 void gsdlInterface::corbaiface_stub::configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error ) 1453 1529 { 1454 1530 CORBA::StaticAny _key( _marshaller_gsdlInterface_corbatext_t, &key ); 1455 1531 CORBA::StaticAny _cfgline( _marshaller__seq_gsdlInterface_corbatext_t, &cfgline ); 1532 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 1456 1533 CORBA::StaticRequest __req( this, "configure" ); 1457 1534 __req.add_in_arg( &_key ); 1458 1535 __req.add_in_arg( &_cfgline ); 1536 __req.add_inout_arg( &_error ); 1459 1537 1460 1538 __req.invoke(); … … 1465 1543 1466 1544 1467 void gsdlInterface::corbaiface_stub::collectionList( gsdlInterface::corbatext_tarray& collist ) 1545 #ifndef MICO_CONF_NO_POA 1546 1547 void 1548 gsdlInterface::corbaiface_stub_clp::configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error ) 1549 { 1550 PortableServer::Servant _serv = _preinvoke (); 1551 if (_serv) { 1552 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1553 if (_myserv) { 1554 #ifdef HAVE_EXCEPTIONS 1555 try { 1556 #endif 1557 _myserv->configure(key, cfgline, error); 1558 #ifdef HAVE_EXCEPTIONS 1559 } 1560 catch (...) { 1561 _myserv->_remove_ref(); 1562 _postinvoke(); 1563 throw; 1564 } 1565 #endif 1566 1567 _myserv->_remove_ref(); 1568 _postinvoke (); 1569 return; 1570 } 1571 _postinvoke (); 1572 } 1573 1574 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1575 _VCHACK__classname::configure(key, cfgline, error); 1576 } 1577 1578 #endif // MICO_CONF_NO_POA 1579 1580 void gsdlInterface::corbaiface_stub::collectionList( gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error ) 1468 1581 { 1469 1582 CORBA::StaticAny _collist( _marshaller__seq_gsdlInterface_corbatext_t, &collist ); 1583 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 1470 1584 CORBA::StaticRequest __req( this, "collectionList" ); 1471 1585 __req.add_inout_arg( &_collist ); 1586 __req.add_inout_arg( &_error ); 1472 1587 1473 1588 __req.invoke(); … … 1477 1592 } 1478 1593 1594 1595 #ifndef MICO_CONF_NO_POA 1596 1597 void 1598 gsdlInterface::corbaiface_stub_clp::collectionList( gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error ) 1599 { 1600 PortableServer::Servant _serv = _preinvoke (); 1601 if (_serv) { 1602 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1603 if (_myserv) { 1604 #ifdef HAVE_EXCEPTIONS 1605 try { 1606 #endif 1607 _myserv->collectionList(collist, error); 1608 #ifdef HAVE_EXCEPTIONS 1609 } 1610 catch (...) { 1611 _myserv->_remove_ref(); 1612 _postinvoke(); 1613 throw; 1614 } 1615 #endif 1616 1617 _myserv->_remove_ref(); 1618 _postinvoke (); 1619 return; 1620 } 1621 _postinvoke (); 1622 } 1623 1624 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1625 _VCHACK__classname::collectionList(collist, error); 1626 } 1627 1628 #endif // MICO_CONF_NO_POA 1479 1629 1480 1630 void gsdlInterface::corbaiface_stub::hasCollection( const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error ) … … 1495 1645 1496 1646 1647 #ifndef MICO_CONF_NO_POA 1648 1649 void 1650 gsdlInterface::corbaiface_stub_clp::hasCollection( const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error ) 1651 { 1652 PortableServer::Servant _serv = _preinvoke (); 1653 if (_serv) { 1654 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1655 if (_myserv) { 1656 #ifdef HAVE_EXCEPTIONS 1657 try { 1658 #endif 1659 _myserv->hasCollection(corbaCollection, has, error); 1660 #ifdef HAVE_EXCEPTIONS 1661 } 1662 catch (...) { 1663 _myserv->_remove_ref(); 1664 _postinvoke(); 1665 throw; 1666 } 1667 #endif 1668 1669 _myserv->_remove_ref(); 1670 _postinvoke (); 1671 return; 1672 } 1673 _postinvoke (); 1674 } 1675 1676 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1677 _VCHACK__classname::hasCollection(corbaCollection, has, error); 1678 } 1679 1680 #endif // MICO_CONF_NO_POA 1681 1497 1682 CORBA::Boolean gsdlInterface::corbaiface_stub::ping( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error ) 1498 1683 { … … 1514 1699 } 1515 1700 1701 1702 #ifndef MICO_CONF_NO_POA 1703 1704 CORBA::Boolean 1705 gsdlInterface::corbaiface_stub_clp::ping( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error ) 1706 { 1707 PortableServer::Servant _serv = _preinvoke (); 1708 if (_serv) { 1709 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1710 if (_myserv) { 1711 CORBA::Boolean __res; 1712 1713 #ifdef HAVE_EXCEPTIONS 1714 try { 1715 #endif 1716 __res = _myserv->ping(collection, error); 1717 #ifdef HAVE_EXCEPTIONS 1718 } 1719 catch (...) { 1720 _myserv->_remove_ref(); 1721 _postinvoke(); 1722 throw; 1723 } 1724 #endif 1725 1726 _myserv->_remove_ref(); 1727 _postinvoke (); 1728 return __res; 1729 } 1730 _postinvoke (); 1731 } 1732 1733 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1734 return _VCHACK__classname::ping(collection, error); 1735 } 1736 1737 #endif // MICO_CONF_NO_POA 1516 1738 1517 1739 void gsdlInterface::corbaiface_stub::getDocument( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error ) … … 1534 1756 1535 1757 1758 #ifndef MICO_CONF_NO_POA 1759 1760 void 1761 gsdlInterface::corbaiface_stub_clp::getDocument( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error ) 1762 { 1763 PortableServer::Servant _serv = _preinvoke (); 1764 if (_serv) { 1765 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1766 if (_myserv) { 1767 #ifdef HAVE_EXCEPTIONS 1768 try { 1769 #endif 1770 _myserv->getDocument(collection, request, response, error); 1771 #ifdef HAVE_EXCEPTIONS 1772 } 1773 catch (...) { 1774 _myserv->_remove_ref(); 1775 _postinvoke(); 1776 throw; 1777 } 1778 #endif 1779 1780 _myserv->_remove_ref(); 1781 _postinvoke (); 1782 return; 1783 } 1784 _postinvoke (); 1785 } 1786 1787 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1788 _VCHACK__classname::getDocument(collection, request, response, error); 1789 } 1790 1791 #endif // MICO_CONF_NO_POA 1792 1536 1793 void gsdlInterface::corbaiface_stub::getCollectInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error ) 1537 1794 { … … 1551 1808 1552 1809 1810 #ifndef MICO_CONF_NO_POA 1811 1812 void 1813 gsdlInterface::corbaiface_stub_clp::getCollectInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error ) 1814 { 1815 PortableServer::Servant _serv = _preinvoke (); 1816 if (_serv) { 1817 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1818 if (_myserv) { 1819 #ifdef HAVE_EXCEPTIONS 1820 try { 1821 #endif 1822 _myserv->getCollectInfo(collection, response, error); 1823 #ifdef HAVE_EXCEPTIONS 1824 } 1825 catch (...) { 1826 _myserv->_remove_ref(); 1827 _postinvoke(); 1828 throw; 1829 } 1830 #endif 1831 1832 _myserv->_remove_ref(); 1833 _postinvoke (); 1834 return; 1835 } 1836 _postinvoke (); 1837 } 1838 1839 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1840 _VCHACK__classname::getCollectInfo(collection, response, error); 1841 } 1842 1843 #endif // MICO_CONF_NO_POA 1844 1553 1845 void gsdlInterface::corbaiface_stub::getFilterInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error ) 1554 1846 { … … 1567 1859 } 1568 1860 1861 1862 #ifndef MICO_CONF_NO_POA 1863 1864 void 1865 gsdlInterface::corbaiface_stub_clp::getFilterInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error ) 1866 { 1867 PortableServer::Servant _serv = _preinvoke (); 1868 if (_serv) { 1869 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1870 if (_myserv) { 1871 #ifdef HAVE_EXCEPTIONS 1872 try { 1873 #endif 1874 _myserv->getFilterInfo(collection, filterNames, error); 1875 #ifdef HAVE_EXCEPTIONS 1876 } 1877 catch (...) { 1878 _myserv->_remove_ref(); 1879 _postinvoke(); 1880 throw; 1881 } 1882 #endif 1883 1884 _myserv->_remove_ref(); 1885 _postinvoke (); 1886 return; 1887 } 1888 _postinvoke (); 1889 } 1890 1891 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1892 _VCHACK__classname::getFilterInfo(collection, filterNames, error); 1893 } 1894 1895 #endif // MICO_CONF_NO_POA 1569 1896 1570 1897 void gsdlInterface::corbaiface_stub::getFilterOptions( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error ) … … 1587 1914 1588 1915 1916 #ifndef MICO_CONF_NO_POA 1917 1918 void 1919 gsdlInterface::corbaiface_stub_clp::getFilterOptions( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error ) 1920 { 1921 PortableServer::Servant _serv = _preinvoke (); 1922 if (_serv) { 1923 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1924 if (_myserv) { 1925 #ifdef HAVE_EXCEPTIONS 1926 try { 1927 #endif 1928 _myserv->getFilterOptions(collection, option, response, error); 1929 #ifdef HAVE_EXCEPTIONS 1930 } 1931 catch (...) { 1932 _myserv->_remove_ref(); 1933 _postinvoke(); 1934 throw; 1935 } 1936 #endif 1937 1938 _myserv->_remove_ref(); 1939 _postinvoke (); 1940 return; 1941 } 1942 _postinvoke (); 1943 } 1944 1945 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 1946 _VCHACK__classname::getFilterOptions(collection, option, response, error); 1947 } 1948 1949 #endif // MICO_CONF_NO_POA 1950 1589 1951 void gsdlInterface::corbaiface_stub::filter( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error ) 1590 1952 { … … 1606 1968 1607 1969 1970 #ifndef MICO_CONF_NO_POA 1971 1972 void 1973 gsdlInterface::corbaiface_stub_clp::filter( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error ) 1974 { 1975 PortableServer::Servant _serv = _preinvoke (); 1976 if (_serv) { 1977 POA_gsdlInterface::corbaiface * _myserv = POA_gsdlInterface::corbaiface::_narrow (_serv); 1978 if (_myserv) { 1979 #ifdef HAVE_EXCEPTIONS 1980 try { 1981 #endif 1982 _myserv->filter(collection, request, response, error); 1983 #ifdef HAVE_EXCEPTIONS 1984 } 1985 catch (...) { 1986 _myserv->_remove_ref(); 1987 _postinvoke(); 1988 throw; 1989 } 1990 #endif 1991 1992 _myserv->_remove_ref(); 1993 _postinvoke (); 1994 return; 1995 } 1996 _postinvoke (); 1997 } 1998 1999 typedef gsdlInterface::corbaiface_stub _VCHACK__classname; 2000 _VCHACK__classname::filter(collection, request, response, error); 2001 } 2002 2003 #endif // MICO_CONF_NO_POA 2004 1608 2005 #ifdef HAVE_NAMESPACE 1609 namespace gsdlInterface { vector<CORBA::Narrow_proto> * corbaiface::_narrow_helpers; } ;2006 namespace gsdlInterface { vector<CORBA::Narrow_proto> * corbaiface::_narrow_helpers; } 1610 2007 #else 1611 2008 vector<CORBA::Narrow_proto> * gsdlInterface::corbaiface::_narrow_helpers; … … 1996 2393 //-------------------------------------------------------- 1997 2394 1998 gsdlInterface::corbaiface_skel::corbaiface_skel( const CORBA::BOA::ReferenceData &_id ) 1999 { 2000 CORBA::ImplementationDef_var _impl = 2001 _find_impl( "IDL:gsdlInterface/corbaiface:1.0", "corbaiface" ); 2002 assert( !CORBA::is_nil( _impl ) ); 2003 _create_ref( _id, 2004 CORBA::InterfaceDef::_nil(), 2005 _impl, 2006 "IDL:gsdlInterface/corbaiface:1.0" ); 2007 register_dispatcher( new StaticInterfaceDispatcherWrapper<corbaiface_skel>( this ) ); 2008 } 2009 2010 gsdlInterface::corbaiface_skel::corbaiface_skel( CORBA::Object_ptr _obj ) 2011 { 2012 CORBA::ImplementationDef_var _impl = 2013 _find_impl( "IDL:gsdlInterface/corbaiface:1.0", "corbaiface" ); 2014 assert( !CORBA::is_nil( _impl ) ); 2015 _restore_ref( _obj, 2016 CORBA::BOA::ReferenceData(), 2017 CORBA::InterfaceDef::_nil(), 2018 _impl ); 2019 register_dispatcher( new StaticInterfaceDispatcherWrapper<corbaiface_skel>( this ) ); 2020 } 2021 2022 gsdlInterface::corbaiface_skel::~corbaiface_skel() 2023 { 2024 } 2025 2026 bool gsdlInterface::corbaiface_skel::dispatch( CORBA::StaticServerRequest_ptr _req, CORBA::Environment & /*_env*/ ) 2395 // PortableServer Skeleton Class for interface gsdlInterface::corbaiface 2396 POA_gsdlInterface::corbaiface::~corbaiface() 2397 { 2398 } 2399 2400 gsdlInterface::corbaiface_ptr 2401 POA_gsdlInterface::corbaiface::_this () 2402 { 2403 CORBA::Object_var obj = MICO_SCOPE(PortableServer,ServantBase::_this) (); 2404 return gsdlInterface::corbaiface::_narrow (obj); 2405 } 2406 2407 CORBA::Boolean 2408 POA_gsdlInterface::corbaiface::_is_a (const char * repoid) 2409 { 2410 if (strcmp (repoid, "IDL:gsdlInterface/corbaiface:1.0") == 0) { 2411 return TRUE; 2412 } 2413 return FALSE; 2414 } 2415 2416 CORBA::InterfaceDef_ptr 2417 POA_gsdlInterface::corbaiface::_get_interface () 2418 { 2419 CORBA::InterfaceDef_ptr ifd = MICO_SCOPE(PortableServer,ServantBase)::_get_interface ("IDL:gsdlInterface/corbaiface:1.0"); 2420 2421 if (CORBA::is_nil (ifd)) { 2422 mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO)); 2423 } 2424 2425 return ifd; 2426 } 2427 2428 CORBA::RepositoryId 2429 POA_gsdlInterface::corbaiface::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr) 2430 { 2431 return CORBA::string_dup ("IDL:gsdlInterface/corbaiface:1.0"); 2432 } 2433 2434 CORBA::Object_ptr 2435 POA_gsdlInterface::corbaiface::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj) 2436 { 2437 return new gsdlInterface::corbaiface_stub_clp (poa, obj); 2438 } 2439 2440 bool 2441 POA_gsdlInterface::corbaiface::dispatch (CORBA::StaticServerRequest_ptr _req) 2027 2442 { 2028 2443 #ifdef HAVE_EXCEPTIONS 2029 2444 try { 2030 2445 #endif 2031 extern CORBA::ULong mico_string_hash (const char *, CORBA::ULong);2032 2446 switch (mico_string_hash (_req->op_name(), 17)) { 2033 2447 case 0: 2034 2448 if( strcmp( _req->op_name(), "collectionList" ) == 0 ) { 2035 corbatext_tarray collist;2449 gsdlInterface::corbatext_tarray collist; 2036 2450 CORBA::StaticAny _collist( _marshaller__seq_gsdlInterface_corbatext_t, &collist ); 2451 gsdlInterface::corbaComError error; 2452 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2037 2453 2038 2454 _req->add_inout_arg( &_collist ); 2455 _req->add_inout_arg( &_error ); 2039 2456 2040 2457 if( !_req->read_args() ) 2041 2458 return true; 2042 2459 2043 collectionList( collist );2460 collectionList( collist, error ); 2044 2461 _req->write_results(); 2045 2462 return true; … … 2048 2465 case 3: 2049 2466 if( strcmp( _req->op_name(), "ping" ) == 0 ) { 2050 corbatext_t collection;2467 gsdlInterface::corbatext_t collection; 2051 2468 CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection ); 2052 corbaComError error;2469 gsdlInterface::corbaComError error; 2053 2470 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2054 2471 … … 2069 2486 case 7: 2070 2487 if( strcmp( _req->op_name(), "filter" ) == 0 ) { 2071 corbatext_t collection;2488 gsdlInterface::corbatext_t collection; 2072 2489 CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection ); 2073 corbaFilterRequest request;2490 gsdlInterface::corbaFilterRequest request; 2074 2491 CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaFilterRequest, &request ); 2075 corbaFilterResponse response;2492 gsdlInterface::corbaFilterResponse response; 2076 2493 CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterResponse, &response ); 2077 corbaComError error;2494 gsdlInterface::corbaComError error; 2078 2495 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2079 2496 … … 2093 2510 case 9: 2094 2511 if( strcmp( _req->op_name(), "getFilterOptions" ) == 0 ) { 2095 corbatext_t collection;2512 gsdlInterface::corbatext_t collection; 2096 2513 CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection ); 2097 corbatext_t option;2514 gsdlInterface::corbatext_t option; 2098 2515 CORBA::StaticAny _option( _marshaller_gsdlInterface_corbatext_t, &option ); 2099 corbaFilterOptionsResponse response;2516 gsdlInterface::corbaFilterOptionsResponse response; 2100 2517 CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterOptionsResponse, &response ); 2101 corbaComError error;2518 gsdlInterface::corbaComError error; 2102 2519 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2103 2520 … … 2117 2534 case 10: 2118 2535 if( strcmp( _req->op_name(), "getCollectInfo" ) == 0 ) { 2119 corbatext_t collection;2536 gsdlInterface::corbatext_t collection; 2120 2537 CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection ); 2121 corbaColInfoResponse response;2538 gsdlInterface::corbaColInfoResponse response; 2122 2539 CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaColInfoResponse, &response ); 2123 corbaComError error;2540 gsdlInterface::corbaComError error; 2124 2541 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2125 2542 … … 2138 2555 case 11: 2139 2556 if( strcmp( _req->op_name(), "initialise" ) == 0 ) { 2557 gsdlInterface::corbaComError error; 2558 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2559 2140 2560 CORBA::Boolean _res; 2141 2561 CORBA::StaticAny __res( CORBA::_stc_boolean, &_res ); 2562 _req->add_inout_arg( &_error ); 2142 2563 _req->set_result( &__res ); 2143 2564 … … 2145 2566 return true; 2146 2567 2147 _res = initialise( );2568 _res = initialise( error ); 2148 2569 _req->write_results(); 2149 2570 return true; 2150 2571 } 2151 2572 if( strcmp( _req->op_name(), "getFilterInfo" ) == 0 ) { 2152 corbatext_t collection;2573 gsdlInterface::corbatext_t collection; 2153 2574 CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection ); 2154 corbatext_tarray filterNames;2575 gsdlInterface::corbatext_tarray filterNames; 2155 2576 CORBA::StaticAny _filterNames( _marshaller__seq_gsdlInterface_corbatext_t, &filterNames ); 2156 corbaComError error;2577 gsdlInterface::corbaComError error; 2157 2578 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2158 2579 … … 2171 2592 case 12: 2172 2593 if( strcmp( _req->op_name(), "hasCollection" ) == 0 ) { 2173 corbatext_t corbaCollection;2594 gsdlInterface::corbatext_t corbaCollection; 2174 2595 CORBA::StaticAny _corbaCollection( _marshaller_gsdlInterface_corbatext_t, &corbaCollection ); 2175 2596 CORBA::Boolean has; 2176 2597 CORBA::StaticAny _has( CORBA::_stc_boolean, &has ); 2177 corbaComError error;2598 gsdlInterface::corbaComError error; 2178 2599 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2179 2600 … … 2192 2613 case 13: 2193 2614 if( strcmp( _req->op_name(), "configure" ) == 0 ) { 2194 corbatext_t key;2615 gsdlInterface::corbatext_t key; 2195 2616 CORBA::StaticAny _key( _marshaller_gsdlInterface_corbatext_t, &key ); 2196 corbatext_tarray cfgline;2617 gsdlInterface::corbatext_tarray cfgline; 2197 2618 CORBA::StaticAny _cfgline( _marshaller__seq_gsdlInterface_corbatext_t, &cfgline ); 2619 gsdlInterface::corbaComError error; 2620 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2198 2621 2199 2622 _req->add_in_arg( &_key ); 2200 2623 _req->add_in_arg( &_cfgline ); 2624 _req->add_inout_arg( &_error ); 2201 2625 2202 2626 if( !_req->read_args() ) 2203 2627 return true; 2204 2628 2205 configure( key, cfgline );2629 configure( key, cfgline, error ); 2206 2630 _req->write_results(); 2207 2631 return true; 2208 2632 } 2209 2633 if( strcmp( _req->op_name(), "getDocument" ) == 0 ) { 2210 corbatext_t collection;2634 gsdlInterface::corbatext_t collection; 2211 2635 CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection ); 2212 corbaDocRequest request;2636 gsdlInterface::corbaDocRequest request; 2213 2637 CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaDocRequest, &request ); 2214 corbaDocResponse response;2638 gsdlInterface::corbaDocResponse response; 2215 2639 CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaDocResponse, &response ); 2216 corbaComError error;2640 gsdlInterface::corbaComError error; 2217 2641 CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error ); 2218 2642 … … 2241 2665 } 2242 2666 #endif 2667 2243 2668 return false; 2244 2669 } 2245 2670 2246 gsdlInterface::corbaiface_ptr gsdlInterface::corbaiface_skel::_this() 2247 { 2248 return gsdlInterface::corbaiface::_duplicate( this ); 2249 } 2250 2671 void 2672 POA_gsdlInterface::corbaiface::invoke (CORBA::StaticServerRequest_ptr _req) 2673 { 2674 if (dispatch (_req)) { 2675 return; 2676 } 2677 2678 CORBA::Exception * ex = 2679 new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO); 2680 _req->set_exception (ex); 2681 _req->write_results(); 2682 } 2683 -
trunk/gsdl/packages/Makefile.in
r2052 r2113 36 36 endif 37 37 38 PACKAGEDIRS = wv/wv-gs pdftohtml/pdftohtml_0_22 wget/wget-1.5.3 $(YAZ) 38 USE_CORBA=@USE_CORBA@ 39 ifeq ($(USE_CORBA), 1) 40 CORBA=mico/mico 41 else 42 CORBA= 43 endif 44 45 PACKAGEDIRS = wv/wv-gs pdftohtml/pdftohtml_0_22 wget/wget-1.5.3 $(YAZ) $(CORBA) 39 46 40 47 all: … … 43 50 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \ 44 51 done 52 for idir in $(PACKAGEDIRS); do \ 53 echo installing $$idir; \ 54 (cd $$idir && $(MAKE) install) || exit 1; \ 55 done 56 45 57 46 58 install: -
trunk/gsdl/packages/configure
r2052 r2113 29 29 USE_Z3950=true 30 30 ;; 31 --enable-corba) 32 USE_CORBA=true 33 ;; 31 34 --bindir=*) 32 35 bindira=`echo $1 | sed s/--bindir=//` … … 44 47 done 45 48 49 if test -n "$USE_CORBA"; then 50 # configure the MICO CORBA ORB 51 echo "" 52 echo "Configuring MICO CORBA" 53 echo "" 46 54 55 cd "$PACKAGES/mico" 56 tar -xzf mico-2.3.5.tar.gz 57 cd mico 58 ./configure $CACHE_FILE --prefix=$PACKAGES/mico --bindir=$bindir/linux --prefix=$PACKAGES/mico 59 sed 's/tools//' $PACKAGES/mico/mico/Makefile >$PACKAGES/mico/mico/Makefile.out 60 mv $PACKAGES/mico/mico/Makefile.out $PACKAGES/mico/mico/Makefile 61 fi 47 62 48 63 # configure the wvWare Word document converter -
trunk/gsdl/src/colservr/corbaServer.mpp
r1860 r2113 63 63 } 64 64 65 class corbaServer : virtual public corbaiface_s kel65 class corbaServer : virtual public corbaiface_stub 66 66 { 67 67 private: … … 103 103 CORBA::Boolean initialise() 104 104 { 105 ofstream logout; 106 int reply; 105 ofstream logout; 106 int reply; 107 comerror_t error; 107 108 108 109 this->openLogfile("/etc/corbaout.txt", logout); 109 reply = protocol->init( logout);110 reply = protocol->init(error, logout); 110 111 logout.close(); 111 112 return (reply != 0 ? 1 : 0); … … 114 115 void configure(const corbatext_t &corbaKey, const corbatext_tarray &corbaCfgline) 115 116 { 116 text_t key; 117 text_tarray cfgline; 117 text_t key; 118 text_tarray cfgline; 119 comerror_t error; 118 120 119 121 corbaconv_text_t::setCorbatext(key,corbaKey); … … 123 125 // **** 124 126 cout << "Recieved " << key << " = "; 125 for (int i=0; i<cfgline.size(); i++)127 for (int unsigned i=0; i<cfgline.size(); i++) 126 128 { 127 129 cout << cfgline[i] << " "; … … 135 137 cfgline.push_back (gsdlhome); 136 138 cout << "Changing gsdlhome to " << gsdlhome << endl; 137 protocol->configure(key, cfgline);139 protocol->configure(key, cfgline, error); 138 140 } 139 141 else if (key=="httpdomain") … … 148 150 else 149 151 { 150 protocol->configure(key, cfgline );152 protocol->configure(key, cfgline,error); 151 153 } 152 154 } … … 233 235 // copy response values 234 236 corbaResponse.numDocs = response.numDocs; 235 corbaResponse.isApprox = response.isApprox;237 corbaResponse.isApprox = (::gsdlInterface::corbaIsApprox) response.isApprox; 236 238 corbaresponse_termInfoToCorba(response.termInfo, corbaResponse.termInfo); 237 239 corbaresponse_resultDocInfoToCorba(response.docInfo, corbaResponse.docInfo); … … 327 329 // get right-hand side of map 328 330 corbaconv_text_t::getCorbatext((*here).second.name,corbaResponse.options[i].name); 329 corbaResponse.options[i].type = (*here).second.type; 330 corbaResponse.options[i].repeatable = (*here).second.repeatable; 331 corbaResponse.options[i].type = 332 (::gsdlInterface::corbaFilterType)(*here).second.type; 333 corbaResponse.options[i].repeatable = 334 (::gsdlInterface::corbaFilterRepeatable)(*here).second.repeatable; 331 335 corbaconv_text_t::getCorbatext((*here).second.defaultValue,corbaResponse.options[i].defaultValue); 332 336 corbatext_arrayToCorbaArray((*here).second.validValues, &corbaResponse.options[i].validValues); … … 420 424 cout << "Replying " << collist.size() << ": " << endl; 421 425 422 for (int i = 0; i < collist.size(); i ++)426 for (int unsigned i = 0; i < collist.size(); i ++) 423 427 { 424 428 cout << collist[i]; -
trunk/gsdl/src/recpt/Makefile.in
r1937 r2113 86 86 MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c 87 87 MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o $@ 88 MLIBS = $(LIBS) - lmico2.2.788 MLIBS = $(LIBS) -L../../lib/ -lmico2.3.5 -lmicoaux2.3.5 89 89 90 90 .SUFFIXES: … … 328 328 329 329 corbaserver: $(RECPTLIB_OBJS) 330 echo -e building corbaserver 330 331 $(MLINK) $(RECPTLIB_OBJS) $(MLIBS) 331 332 … … 335 336 ifneq ($(USE_FASTCGI), 1) 336 337 CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ 338 ../../lib/corbaiface.o \ 339 ../../lib/corbaconv_text_t.o \ 340 ../../lib/corbatext_t.o \ 337 341 ../../lib/gsdllib.a \ 338 342 ../../packages/mg/src/text/libtextin.a \ … … 342 346 else 343 347 CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ 348 ../../lib/corbaiface.o \ 349 ../../lib/corbaconv_text_t.o \ 350 ../../lib/corbatext_t.o \ 344 351 ../../lib/gsdllib.a \ 345 352 ../../packages/mg/src/text/libtextin.a \ … … 351 358 352 359 corbarecptldd: $(CORBARECPT_OBJS) 353 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS) 360 echo -e building corbarecptldd: 361 $(MLINK) $(CORBARECPT_OBJS) $(MLIBS) 354 362 355 363 test: -
trunk/gsdl/src/recpt/cgiwrapper.cpp
r1864 r2113 380 380 bool found_valid_col = false; 381 381 382 382 383 while (rprotolist_here != rprotolist_end) { 384 comerror_t err; 383 385 if ((*rprotolist_here).p == NULL) continue; 384 386 else if (is_z3950==false && 385 (*rprotolist_here).p->get_protocol_name( ) == "z3950proto") {387 (*rprotolist_here).p->get_protocol_name(err) == "z3950proto") { 386 388 cout << "\nZ39.50 Servers: (always public)\n" 387 389 << "---------------\n"; … … 390 392 391 393 text_tarray collist; 392 comerror_t err;393 394 (*rprotolist_here).p->get_collection_list (collist, err, cerr); 394 395 if (err == noError) { -
trunk/gsdl/src/recpt/collectoraction.cpp
r2112 r2113 676 676 677 677 // don't include z39.50 collection 678 if ((*rprotolist_here).p->get_protocol_name () == "z3950proto") { 678 comerror_t err; 679 if ((*rprotolist_here).p->get_protocol_name (err) == "z3950proto") { 679 680 rprotolist_here ++; 680 681 continue; … … 682 683 683 684 text_tarray collist; 684 comerror_t err;685 685 (*rprotolist_here).p->get_collection_list (collist, err, logout); 686 686 if (err == noError) { … … 1576 1576 recptprotolistclass::iterator rprotolist_end = protos->end(); 1577 1577 while (rprotolist_here != rprotolist_end) { 1578 comerror_t err; 1578 1579 if ((*rprotolist_here).p != NULL) { 1579 if ((*rprotolist_here).p->get_protocol_name ( ) == "nullproto") {1580 if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") { 1580 1581 // create collection server and add it to nullproto 1581 1582 (*rprotolist_here).p->add_collection (collection, recpt, gsdlhome, gsdlhome); … … 1583 1584 text_tarray tmp; 1584 1585 tmp.push_back (gsdlhome); 1585 (*rprotolist_here).p->configure ("gsdlhome", tmp );1586 (*rprotolist_here).p->configure ("gsdlhome", tmp, err); 1586 1587 // re-initialize the null protocol 1587 if (!(*rprotolist_here).p->init ( logout)) {1588 if (!(*rprotolist_here).p->init (err, logout)) { 1588 1589 logout << "collectoraction::create_colserver: nullproto init failed\n"; 1589 1590 } … … 1604 1605 recptprotolistclass::iterator rprotolist_end = protos->end(); 1605 1606 while (rprotolist_here != rprotolist_end) { 1607 comerror_t err; 1606 1608 if ((*rprotolist_here).p != NULL) { 1607 if ((*rprotolist_here).p->get_protocol_name ( ) == "nullproto") {1609 if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") { 1608 1610 (*rprotolist_here).p->remove_collection (collection, logout); 1609 1611 return; -
trunk/gsdl/src/recpt/corbaclient.mpp
r1982 r2113 49 49 #include "authenaction.h" 50 50 #include "extlinkaction.h" 51 #include "delhistoryaction.h"52 51 #include "tipaction.h" 53 52 #include "collectoraction.h" … … 126 125 recpt.add_action (&aauthenaction); 127 126 128 delhistoryaction adelhistoryaction;129 recpt.add_action(&adelhistoryaction);130 131 127 collectoraction acollectoraction; 132 128 acollectoraction.set_receptionist (&recpt); -
trunk/gsdl/src/recpt/corbaproto.h
r1860 r2113 56 56 57 57 // this configure will configure each of the collection servers 58 void configure (const text_t &key, const text_tarray &cfgline );58 void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err); 59 59 60 60 // this init will init each of the collection servers 61 bool init ( ostream &logout);61 bool init (comerror_t &err,ostream &logout); 62 62 63 63 // used to check for icons and retrieve them from the collection … … 67 67 text_t& httpprefix); 68 68 69 text_t get_site_name ( );69 text_t get_site_name (comerror_t &err); 70 70 71 text_t get_protocol_name ( );71 text_t get_protocol_name (comerror_t &err); 72 72 void get_collection_list (text_tarray &collist, comerror_t &err, 73 73 ostream &logout); -
trunk/gsdl/src/recpt/corbaproto.mpp
r1983 r2113 369 369 370 370 // this configure will configure each of the collection servers 371 void corbaproto::configure (const text_t &key, const text_tarray &cfgline) { 371 void corbaproto::configure (const text_t &key, const text_tarray &cfgline, 372 comerror_t &err) { 372 373 // the naming of the collection should not be done here, 373 374 // it should be done just after the collection server has been … … 399 400 400 401 // this init will configure and init each of the collection servers 401 bool corbaproto::init ( ostream &logout) {402 bool corbaproto::init (comerror_t &err, ostream &logout) { 402 403 // cout << "Corbaproto::Init" << endl; 403 404 … … 478 479 } 479 480 480 text_t corbaproto::get_site_name ( ) {481 text_t corbaproto::get_site_name (comerror_t &err) { 481 482 return site_name; 482 483 } 483 484 484 text_t corbaproto::get_protocol_name ( ) {485 text_t corbaproto::get_protocol_name (comerror_t &err) { 485 486 return "corbaproto"; 486 487 } … … 700 701 // convert the response back to normal form 701 702 response.numDocs = corbaResponse.numDocs; 702 response.isApprox = corbaResponse.isApprox;703 response.isApprox = (enum isapprox) corbaResponse.isApprox; 703 704 corbaresponse_resultDocInfoToC(corbaResponse.docInfo, response.docInfo); 704 705 -
trunk/gsdl/src/recpt/documentaction.cpp
r2020 r2113 579 579 metadata.insert ("archivedir"); 580 580 581 comerror_t err; 581 582 OptionValue_tarray options; 582 583 // we need to know what the query was for the z3950proto 583 if (collectproto->get_protocol_name( )=="z3950proto") {584 if (collectproto->get_protocol_name(err)=="z3950proto") { 584 585 OptionValue_t opt; 585 586 opt.name="Query"; -
trunk/gsdl/src/recpt/nullproto.cpp
r1892 r2113 64 64 65 65 // this configure will configure each of the collection servers 66 void nullproto::configure (const text_t &key, const text_tarray &cfgline) { 66 void nullproto::configure (const text_t &key, const text_tarray &cfgline, 67 comerror_t &err) { 67 68 // the naming of the collection should not be done here, 68 69 // it should be done just after the collection server has been … … 77 78 78 79 // this init will configure and init each of the collection servers 79 bool nullproto::init ( ostream &logout) {80 bool nullproto::init (comerror_t &err, ostream &logout) { 80 81 return cset->init(logout); 81 82 } 82 83 83 text_t nullproto::get_site_name ( ) {84 return " ";84 text_t nullproto::get_site_name (comerror_t &err) { 85 return "localhost"; 85 86 } 86 87 87 text_t nullproto::get_protocol_name ( ) {88 text_t nullproto::get_protocol_name (comerror_t &err) { 88 89 return "nullproto"; 89 90 } -
trunk/gsdl/src/recpt/nullproto.h
r1892 r2113 55 55 56 56 // this configure will configure each of the collection servers 57 void configure (const text_t &key, const text_tarray &cfgline); 57 void configure (const text_t &key, const text_tarray &cfgline, 58 comerror_t &err); 58 59 59 60 // this init will init each of the collection servers 60 bool init ( ostream &logout);61 bool init (comerror_t &err, ostream &logout); 61 62 62 text_t get_protocol_name ( );63 text_t get_site_name ( );63 text_t get_protocol_name (comerror_t &err); 64 text_t get_site_name (comerror_t &err); 64 65 65 66 void get_collection_list (text_tarray &collist, comerror_t &err, -
trunk/gsdl/src/recpt/pageaction.cpp
r2105 r2113 164 164 homeextra += "</tr><tr valign=top>\n"; 165 165 166 comerror_t err; 166 167 text_t optsite = ""; 167 text_t site_name = (*rprotolist_here).p->get_site_name ( );168 text_t site_name = (*rprotolist_here).p->get_site_name (err); 168 169 if (!site_name.empty()) { optsite = "site="+site_name+"&"; } 169 170 -
trunk/gsdl/src/recpt/receptionist.cpp
r1927 r2113 359 359 while (protohere != protoend) { 360 360 assert ((*protohere).p != NULL); 361 comerror_t err; 361 362 if ((*protohere).p != NULL) 362 (*protohere).p->configure(key, cfgline );363 (*protohere).p->configure(key, cfgline, err); 363 364 364 365 protohere++; … … 472 473 recptprotolistclass::iterator protoend = protocols.end (); 473 474 while (protohere != protoend) { 475 comerror_t err; 474 476 if (((*protohere).p == NULL) || 475 !(*protohere).p->init( logout)) return false;477 !(*protohere).p->init(err, logout)) return false; 476 478 protohere++; 477 479 } -
trunk/gsdl/src/recpt/recptproto.cpp
r1860 r2113 37 37 38 38 // configure should be called for each line in the configuration file 39 void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/ ) {39 void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/, comerror_t &) { 40 40 } 41 41 … … 43 43 // functions are called. If init returns false a message will be written 44 44 // out to the log file and no other output should be produced. 45 bool recptproto::init ( ostream &/*logout*/) {45 bool recptproto::init (comerror_t &err, ostream &/*logout*/) { 46 46 return true; 47 47 } … … 51 51 // connection to a site is being used then this should return the name 52 52 // used to label a site 53 text_t recptproto::get_site_name( ) {54 return " ";53 text_t recptproto::get_site_name(comerror_t &err) { 54 return "localhost"; 55 55 } 56 56 … … 58 58 // that can be used to do run time type identification and display information 59 59 // about the protocol. 60 text_t recptproto::get_protocol_name ( ) {60 text_t recptproto::get_protocol_name (comerror_t &err) { 61 61 return "recptproto"; 62 62 } -
trunk/gsdl/src/recpt/recptproto.h
r1860 r2113 61 61 62 62 // configure should be called for each line in the configuration file 63 virtual void configure (const text_t &key, const text_tarray &cfgline );63 virtual void configure (const text_t &key, const text_tarray &cfgline, comerror_t &err); 64 64 65 65 // init should be called after the configuration but before any other 66 66 // functions are called. If init returns false a message will be written 67 67 // out to the log file and no other output should be produced. 68 virtual bool init ( ostream &logout);68 virtual bool init (comerror_t &err, ostream &logout); 69 69 70 70 // get_site_name should return the name of the site used. … … 72 72 // connection to a site is being used then this should return the name 73 73 // used to label a site 74 virtual text_t get_site_name( );74 virtual text_t get_site_name(comerror_t &err); 75 75 76 76 // get_protocol_name should return the name of this protocol (e.g. recptproto) 77 77 // that can be used to do run time type identification and display information 78 78 // about the protocol. 79 virtual text_t get_protocol_name ( );79 virtual text_t get_protocol_name (comerror_t &err); 80 80 81 81 // get_collection_list returns the list of collections that -
trunk/gsdl/src/recpt/statusaction.cpp
r1860 r2113 62 62 while (rprotolist_here != rprotolist_end) { 63 63 if ((*rprotolist_here).p != NULL) { 64 text_t protoname = (*rprotolist_here).p->get_protocol_name(); 64 comerror_t err; 65 text_t protoname = (*rprotolist_here).p->get_protocol_name(err); 65 66 text_tarray collist; 66 comerror_t err;67 67 (*rprotolist_here).p->get_collection_list (collist, err, logout); 68 68 if (err == noError) { … … 263 263 bool protofirst = true; 264 264 while (protohere != protoend) { 265 comerror_t err; 265 266 if (!protofirst) textout << outconvert << ", "; 266 267 protofirst = false; 267 268 if ((*protohere).p != NULL) { 268 textout << outconvert << "\"" << (*protohere).p->get_protocol_name( ) << "\"";269 textout << outconvert << "\"" << (*protohere).p->get_protocol_name(err) << "\""; 269 270 } 270 271 protohere++; … … 452 453 while (rprotolist_here != rprotolist_end) { 453 454 if ((*rprotolist_here).p != NULL) { 454 protoname = (*rprotolist_here).p->get_protocol_name(); 455 comerror_t err; 456 protoname = (*rprotolist_here).p->get_protocol_name(err); 455 457 textout << outconvert 456 458 << "<tr><td>" … … 459 461 460 462 text_tarray collist; 461 comerror_t err;462 463 (*rprotolist_here).p->get_collection_list (collist, err, logout); 463 464 if (err == noError) { … … 527 528 while (rprotolist_here != rprotolist_end) { 528 529 rproto = (*rprotolist_here).p; 529 if (rproto != NULL && rproto->get_protocol_name() == arg_pr) { 530 comerror_t err; 531 if (rproto != NULL && rproto->get_protocol_name(err) == arg_pr) { 530 532 // see if the protocol has the collection 531 533 bool hascollection; 532 comerror_t err;533 534 rproto->has_collection (arg_c, hascollection, err, logout); 534 535 if (err == noError && hascollection) break;
Note:
See TracChangeset
for help on using the changeset viewer.