Changeset 2113


Ignore:
Timestamp:
2001-03-05T13:54:26+13:00 (23 years ago)
Author:
say1
Message:

integrated the new mico package. updated corba to 2.3.7. fixed the c++ corba code. added error messages in the first few calls in the corba protocol. misc corba fixes

Location:
trunk/gsdl
Files:
2 added
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/cgi-bin/gsdlsite.cfg

    r1157 r2113  
    33
    44# points to the GSDLHOME directory
    5 gsdlhome    **GSDLHOME**
     5gsdlhome    /home/say1/auto/gsdl
    66
    77# this is the http address of GSDLHOME
  • trunk/gsdl/lib/Makefile.in

    r1939 r2113  
    3131#CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
    3232CCFLAGS = @CFLAGS@
    33 MCFLAGS = @CFLAGS@ -Wall -Wunused
     33MCFLAGS = -Wall -Wunused
    3434DEFS = @DEFS@
    3535INCLUDES = -I../packages/mg/lib -I..
     
    4444endif
    4545endif
    46 MINCLUDES = -I. -I../packages/mg/lib $(MICO_INC) -I..
     46MINCLUDES = -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..
    4747RANLIB = @RANLIB@
    4848USE_CORBA = @USE_CORBA@
  • trunk/gsdl/lib/corbaconv_text_t.mpp

    r1860 r2113  
    5252#  include "WIN32cfg.h"
    5353# else
    54 #  include "config.h"
     54#  include "mico/config.h"
    5555# endif
    5656#endif
  • trunk/gsdl/lib/corbaiface.h

    r1860 r2113  
    2626#endif
    2727typedef TSeqVar<SequenceTmpl<CORBA::UShort,MICO_TID_DEF> > usString_var;
    28 typedef usString_var usString_out;
     28typedef TSeqOut<SequenceTmpl<CORBA::UShort,MICO_TID_DEF> > usString_out;
    2929
    3030typedef StringSequenceTmpl<CORBA::String_var> stringSeq;
     
    3333#endif
    3434typedef TSeqVar<StringSequenceTmpl<CORBA::String_var> > stringSeq_var;
    35 typedef stringSeq_var stringSeq_out;
     35typedef TSeqOut<StringSequenceTmpl<CORBA::String_var> > stringSeq_out;
    3636
    3737struct corbatext_t;
    3838typedef TVarVar<corbatext_t> corbatext_t_var;
    39 typedef corbatext_t_var corbatext_t_out;
     39typedef TVarOut<corbatext_t> corbatext_t_out;
    4040
    4141struct corbatext_t {
     
    6060#endif
    6161typedef TSeqVar<SequenceTmpl<corbatext_t,MICO_TID_DEF> > corbatext_tarray_var;
    62 typedef corbatext_tarray_var corbatext_tarray_out;
     62typedef TSeqOut<SequenceTmpl<corbatext_t,MICO_TID_DEF> > corbatext_tarray_out;
    6363
    6464typedef corbatext_tarray corbatext_tset;
     
    6767#endif
    6868typedef TSeqVar<corbatext_tarray > corbatext_tset_var;
    69 typedef corbatext_tset_var corbatext_tset_out;
     69typedef TSeqOut<corbatext_tarray > corbatext_tset_out;
    7070
    7171struct corbatext_tmap;
    7272typedef TVarVar<corbatext_tmap> corbatext_tmap_var;
    73 typedef corbatext_tmap_var corbatext_tmap_out;
     73typedef TVarOut<corbatext_tmap> corbatext_tmap_out;
    7474
    7575struct corbatext_tmap {
     
    100100struct corbaShortColInfo;
    101101typedef TVarVar<corbaShortColInfo> corbaShortColInfo_var;
    102 typedef corbaShortColInfo_var corbaShortColInfo_out;
     102typedef TVarOut<corbaShortColInfo> corbaShortColInfo_out;
    103103
    104104struct corbaShortColInfo {
     
    120120struct corbaColInfoResponse;
    121121typedef TVarVar<corbaColInfoResponse> corbaColInfoResponse_var;
    122 typedef corbaColInfoResponse_var corbaColInfoResponse_out;
     122typedef TVarOut<corbaColInfoResponse> corbaColInfoResponse_out;
    123123
    124124struct corbaColInfoResponse {
     
    152152struct corbaDocRequest;
    153153typedef TVarVar<corbaDocRequest> corbaDocRequest_var;
    154 typedef corbaDocRequest_var corbaDocRequest_out;
     154typedef TVarOut<corbaDocRequest> corbaDocRequest_out;
    155155
    156156struct corbaDocRequest {
     
    172172struct corbaDocResponse;
    173173typedef TVarVar<corbaDocResponse> corbaDocResponse_var;
    174 typedef corbaDocResponse_var corbaDocResponse_out;
     174typedef TVarOut<corbaDocResponse> corbaDocResponse_out;
    175175
    176176struct corbaDocResponse {
     
    207207struct corbaFilterOption;
    208208typedef TVarVar<corbaFilterOption> corbaFilterOption_var;
    209 typedef corbaFilterOption_var corbaFilterOption_out;
     209typedef TVarOut<corbaFilterOption> corbaFilterOption_out;
    210210
    211211struct corbaFilterOption {
     
    232232#endif
    233233typedef TSeqVar<SequenceTmpl<corbaFilterOption,MICO_TID_DEF> > corbaFilterOptionList_var;
    234 typedef corbaFilterOptionList_var corbaFilterOptionList_out;
     234typedef TSeqOut<SequenceTmpl<corbaFilterOption,MICO_TID_DEF> > corbaFilterOptionList_out;
    235235
    236236struct corbaFilterOptionsResponse;
    237237typedef TVarVar<corbaFilterOptionsResponse> corbaFilterOptionsResponse_var;
    238 typedef corbaFilterOptionsResponse_var corbaFilterOptionsResponse_out;
     238typedef TVarOut<corbaFilterOptionsResponse> corbaFilterOptionsResponse_out;
    239239
    240240struct corbaFilterOptionsResponse {
     
    255255struct corbaOptionValue;
    256256typedef TVarVar<corbaOptionValue> corbaOptionValue_var;
    257 typedef corbaOptionValue_var corbaOptionValue_out;
     257typedef TVarOut<corbaOptionValue> corbaOptionValue_out;
    258258
    259259struct corbaOptionValue {
     
    277277#endif
    278278typedef TSeqVar<SequenceTmpl<corbaOptionValue,MICO_TID_DEF> > corbaOptionValue_array_var;
    279 typedef corbaOptionValue_array_var corbaOptionValue_array_out;
     279typedef TSeqOut<SequenceTmpl<corbaOptionValue,MICO_TID_DEF> > corbaOptionValue_array_out;
    280280
    281281struct corbaFilterRequest;
    282282typedef TVarVar<corbaFilterRequest> corbaFilterRequest_var;
    283 typedef corbaFilterRequest_var corbaFilterRequest_out;
     283typedef TVarOut<corbaFilterRequest> corbaFilterRequest_out;
    284284
    285285struct corbaFilterRequest {
     
    306306struct corbaTermInfo;
    307307typedef TVarVar<corbaTermInfo> corbaTermInfo_var;
    308 typedef corbaTermInfo_var corbaTermInfo_out;
     308typedef TVarOut<corbaTermInfo> corbaTermInfo_out;
    309309
    310310struct corbaTermInfo {
     
    329329#endif
    330330typedef TSeqVar<SequenceTmpl<corbaTermInfo,MICO_TID_DEF> > corbaTermInfo_array_var;
    331 typedef corbaTermInfo_array_var corbaTermInfo_array_out;
     331typedef TSeqOut<SequenceTmpl<corbaTermInfo,MICO_TID_DEF> > corbaTermInfo_array_out;
    332332
    333333struct corbaMetadataInfo;
    334334typedef TVarVar<corbaMetadataInfo> corbaMetadataInfo_var;
    335 typedef corbaMetadataInfo_var corbaMetadataInfo_out;
     335typedef TVarOut<corbaMetadataInfo> corbaMetadataInfo_out;
    336336
    337337struct corbaMetadataInfo {
     
    358358#endif
    359359typedef TSeqVar<SequenceTmpl<corbaMetadataInfo,MICO_TID_DEF> > corbaMetadataInfo_array_var;
    360 typedef corbaMetadataInfo_array_var corbaMetadataInfo_array_out;
     360typedef TSeqOut<SequenceTmpl<corbaMetadataInfo,MICO_TID_DEF> > corbaMetadataInfo_array_out;
    361361
    362362struct corbaMetadataInfo_map;
    363363typedef TVarVar<corbaMetadataInfo_map> corbaMetadataInfo_map_var;
    364 typedef corbaMetadataInfo_map_var corbaMetadataInfo_map_out;
     364typedef TVarOut<corbaMetadataInfo_map> corbaMetadataInfo_map_out;
    365365
    366366struct corbaMetadataInfo_map {
     
    384384#endif
    385385typedef TSeqVar<SequenceTmpl<CORBA::Long,MICO_TID_DEF> > corbaDocFreq_array_var;
    386 typedef corbaDocFreq_array_var corbaDocFreq_array_out;
     386typedef TSeqOut<SequenceTmpl<CORBA::Long,MICO_TID_DEF> > corbaDocFreq_array_out;
    387387
    388388struct corbaResultDocInfo;
    389389typedef TVarVar<corbaResultDocInfo> corbaResultDocInfo_var;
    390 typedef corbaResultDocInfo_var corbaResultDocInfo_out;
     390typedef TVarOut<corbaResultDocInfo> corbaResultDocInfo_out;
    391391
    392392struct corbaResultDocInfo {
     
    418418#endif
    419419typedef TSeqVar<SequenceTmpl<corbaResultDocInfo,MICO_TID_DEF> > corbaResultDocInfo_array_var;
    420 typedef corbaResultDocInfo_array_var corbaResultDocInfo_array_out;
     420typedef TSeqOut<SequenceTmpl<corbaResultDocInfo,MICO_TID_DEF> > corbaResultDocInfo_array_out;
    421421
    422422enum corbaIsApprox {
     
    430430struct corbaFilterResponse;
    431431typedef TVarVar<corbaFilterResponse> corbaFilterResponse_var;
    432 typedef corbaFilterResponse_var corbaFilterResponse_out;
     432typedef TVarOut<corbaFilterResponse> corbaFilterResponse_out;
    433433
    434434struct corbaFilterResponse {
     
    453453typedef corbaiface_ptr corbaifaceRef;
    454454typedef ObjVar<corbaiface> corbaiface_var;
    455 typedef corbaiface_var corbaiface_out;
     455typedef ObjOut<corbaiface> corbaiface_out;
    456456
    457457
     
    485485    static bool _narrow_helper2( CORBA::Object_ptr obj );
    486486
    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;
    490490    virtual void hasCollection( const corbatext_t& corbaCollection, CORBA::Boolean& has, corbaComError& error ) = 0;
    491491    virtual CORBA::Boolean ping( const corbatext_t& collection, corbaComError& error ) = 0;
     
    509509  public:
    510510    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 );
    514514    void hasCollection( const corbatext_t& corbaCollection, CORBA::Boolean& has, corbaComError& error );
    515515    CORBA::Boolean ping( const corbatext_t& collection, corbaComError& error );
     
    524524};
    525525
    526 class corbaiface_skel :
    527   virtual public StaticMethodDispatcher,
     526#ifndef MICO_CONF_NO_POA
     527
     528class 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
     566MICO_NAMESPACE_DECL POA_gsdlInterface {
     567#endif
     568
     569#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_gsdlInterface)
     570
     571
     572class 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
     608template<class T>
     609class corbaiface_tie :
     610  virtual public POA_Tie_Base<T>,
    528611  virtual public corbaiface
    529612{
    530613  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
     649template<class T>
     650corbaiface_tie<T>::~corbaiface_tie ()
     651{
     652}
     653
     654template<class T>
     655PortableServer::POA_ptr
     656corbaiface_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
     665template<class T>
     666CORBA::Boolean
     667corbaiface_tie<T>::initialise (gsdlInterface::corbaComError& error)
     668{
     669  return POA_Tie_Base<T>::ptr->initialise (error);
     670}
     671
     672template<class T>
     673void
     674corbaiface_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
     679template<class T>
     680void
     681corbaiface_tie<T>::collectionList (gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error)
     682{
     683  POA_Tie_Base<T>::ptr->collectionList (collist, error);
     684}
     685
     686template<class T>
     687void
     688corbaiface_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
     693template<class T>
     694CORBA::Boolean
     695corbaiface_tie<T>::ping (const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error)
     696{
     697  return POA_Tie_Base<T>::ptr->ping (collection, error);
     698}
     699
     700template<class T>
     701void
     702corbaiface_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
     707template<class T>
     708void
     709corbaiface_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
     714template<class T>
     715void
     716corbaiface_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
     721template<class T>
     722void
     723corbaiface_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
     728template<class T>
     729void
     730corbaiface_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)
    540738
    541739#ifndef MICO_NO_TOPLEVEL_MODULES
    542740
    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
     748template<class T>
     749class 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
     789template<class T>
     790POA_gsdlInterface_corbaiface_tie<T>::~POA_gsdlInterface_corbaiface_tie ()
     791{
     792}
     793
     794template<class T>
     795PortableServer::POA_ptr
     796POA_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
     805template<class T>
     806CORBA::Boolean
     807POA_gsdlInterface_corbaiface_tie<T>::initialise (gsdlInterface::corbaComError& error)
     808{
     809  return POA_Tie_Base<T>::ptr->initialise (error);
     810}
     811
     812template<class T>
     813void
     814POA_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
     819template<class T>
     820void
     821POA_gsdlInterface_corbaiface_tie<T>::collectionList (gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error)
     822{
     823  POA_Tie_Base<T>::ptr->collectionList (collist, error);
     824}
     825
     826template<class T>
     827void
     828POA_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
     833template<class T>
     834CORBA::Boolean
     835POA_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
     840template<class T>
     841void
     842POA_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
     847template<class T>
     848void
     849POA_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
     854template<class T>
     855void
     856POA_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
     861template<class T>
     862void
     863POA_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
     868template<class T>
     869void
     870POA_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
    549876
    550877#endif // MICO_CONF_NO_POA
  • trunk/gsdl/lib/corbaiface.idl

    r1860 r2113  
    201201interface corbaiface
    202202{
    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);
    206208  void      hasCollection(in corbatext_t corbaCollection, inout boolean has,
    207209               inout corbaComError error);
  • trunk/gsdl/lib/corbaiface.mpp

    r1860 r2113  
    13861386}
    13871387
    1388 void *gsdlInterface::corbaiface::_narrow_helper( const char *_repoid )
    1389 {
    1390   if( strcmp( _repoid, "IDL:gsdlInterface/corbaiface:1.0" ) == 0 )
     1388void *gsdlInterface::corbaiface::_narrow_helper( const char *_rid )
     1389{
     1390  if( strcmp( _rid, "IDL:gsdlInterface/corbaiface:1.0" ) == 0 )
    13911391    return (void *)this;
    13921392  return NULL;
     
    14151415      return _duplicate( (gsdlInterface::corbaiface_ptr) _p );
    14161416    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" ) ) ) {
    14181418      _o = new gsdlInterface::corbaiface_stub;
    14191419      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );
     
    14341434}
    14351435
    1436 CORBA::Boolean gsdlInterface::corbaiface_stub::initialise()
    1437 {
     1436#ifndef MICO_CONF_NO_POA
     1437
     1438void *
     1439POA_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
     1447POA_gsdlInterface::corbaiface *
     1448POA_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
     1458gsdlInterface::corbaiface_stub_clp::corbaiface_stub_clp ()
     1459{
     1460}
     1461
     1462gsdlInterface::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
     1467gsdlInterface::corbaiface_stub_clp::~corbaiface_stub_clp ()
     1468{
     1469}
     1470
     1471#endif // MICO_CONF_NO_POA
     1472
     1473CORBA::Boolean gsdlInterface::corbaiface_stub::initialise( gsdlInterface::corbaComError& error )
     1474{
     1475  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    14381476  CORBA::Boolean _res;
    14391477  CORBA::StaticAny __res( CORBA::_stc_boolean, &_res );
    14401478
    14411479  CORBA::StaticRequest __req( this, "initialise" );
     1480  __req.add_inout_arg( &_error );
    14421481  __req.set_result( &__res );
    14431482
     
    14501489
    14511490
    1452 void gsdlInterface::corbaiface_stub::configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline )
     1491#ifndef MICO_CONF_NO_POA
     1492
     1493CORBA::Boolean
     1494gsdlInterface::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
     1528void gsdlInterface::corbaiface_stub::configure( const gsdlInterface::corbatext_t& key, const gsdlInterface::corbatext_tarray& cfgline, gsdlInterface::corbaComError& error )
    14531529{
    14541530  CORBA::StaticAny _key( _marshaller_gsdlInterface_corbatext_t, &key );
    14551531  CORBA::StaticAny _cfgline( _marshaller__seq_gsdlInterface_corbatext_t, &cfgline );
     1532  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    14561533  CORBA::StaticRequest __req( this, "configure" );
    14571534  __req.add_in_arg( &_key );
    14581535  __req.add_in_arg( &_cfgline );
     1536  __req.add_inout_arg( &_error );
    14591537
    14601538  __req.invoke();
     
    14651543
    14661544
    1467 void gsdlInterface::corbaiface_stub::collectionList( gsdlInterface::corbatext_tarray& collist )
     1545#ifndef MICO_CONF_NO_POA
     1546
     1547void
     1548gsdlInterface::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
     1580void gsdlInterface::corbaiface_stub::collectionList( gsdlInterface::corbatext_tarray& collist, gsdlInterface::corbaComError& error )
    14681581{
    14691582  CORBA::StaticAny _collist( _marshaller__seq_gsdlInterface_corbatext_t, &collist );
     1583  CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    14701584  CORBA::StaticRequest __req( this, "collectionList" );
    14711585  __req.add_inout_arg( &_collist );
     1586  __req.add_inout_arg( &_error );
    14721587
    14731588  __req.invoke();
     
    14771592}
    14781593
     1594
     1595#ifndef MICO_CONF_NO_POA
     1596
     1597void
     1598gsdlInterface::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
    14791629
    14801630void gsdlInterface::corbaiface_stub::hasCollection( const gsdlInterface::corbatext_t& corbaCollection, CORBA::Boolean& has, gsdlInterface::corbaComError& error )
     
    14951645
    14961646
     1647#ifndef MICO_CONF_NO_POA
     1648
     1649void
     1650gsdlInterface::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
    14971682CORBA::Boolean gsdlInterface::corbaiface_stub::ping( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaComError& error )
    14981683{
     
    15141699}
    15151700
     1701
     1702#ifndef MICO_CONF_NO_POA
     1703
     1704CORBA::Boolean
     1705gsdlInterface::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
    15161738
    15171739void gsdlInterface::corbaiface_stub::getDocument( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaDocRequest& request, gsdlInterface::corbaDocResponse& response, gsdlInterface::corbaComError& error )
     
    15341756
    15351757
     1758#ifndef MICO_CONF_NO_POA
     1759
     1760void
     1761gsdlInterface::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
    15361793void gsdlInterface::corbaiface_stub::getCollectInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbaColInfoResponse& response, gsdlInterface::corbaComError& error )
    15371794{
     
    15511808
    15521809
     1810#ifndef MICO_CONF_NO_POA
     1811
     1812void
     1813gsdlInterface::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
    15531845void gsdlInterface::corbaiface_stub::getFilterInfo( const gsdlInterface::corbatext_t& collection, gsdlInterface::corbatext_tarray& filterNames, gsdlInterface::corbaComError& error )
    15541846{
     
    15671859}
    15681860
     1861
     1862#ifndef MICO_CONF_NO_POA
     1863
     1864void
     1865gsdlInterface::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
    15691896
    15701897void gsdlInterface::corbaiface_stub::getFilterOptions( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbatext_t& option, gsdlInterface::corbaFilterOptionsResponse& response, gsdlInterface::corbaComError& error )
     
    15871914
    15881915
     1916#ifndef MICO_CONF_NO_POA
     1917
     1918void
     1919gsdlInterface::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
    15891951void gsdlInterface::corbaiface_stub::filter( const gsdlInterface::corbatext_t& collection, const gsdlInterface::corbaFilterRequest& request, gsdlInterface::corbaFilterResponse& response, gsdlInterface::corbaComError& error )
    15901952{
     
    16061968
    16071969
     1970#ifndef MICO_CONF_NO_POA
     1971
     1972void
     1973gsdlInterface::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
    16082005#ifdef HAVE_NAMESPACE
    1609 namespace gsdlInterface { vector<CORBA::Narrow_proto> * corbaiface::_narrow_helpers; };
     2006namespace gsdlInterface { vector<CORBA::Narrow_proto> * corbaiface::_narrow_helpers; }
    16102007#else
    16112008vector<CORBA::Narrow_proto> * gsdlInterface::corbaiface::_narrow_helpers;
     
    19962393//--------------------------------------------------------
    19972394
    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
     2396POA_gsdlInterface::corbaiface::~corbaiface()
     2397{
     2398}
     2399
     2400gsdlInterface::corbaiface_ptr
     2401POA_gsdlInterface::corbaiface::_this ()
     2402{
     2403  CORBA::Object_var obj = MICO_SCOPE(PortableServer,ServantBase::_this) ();
     2404  return gsdlInterface::corbaiface::_narrow (obj);
     2405}
     2406
     2407CORBA::Boolean
     2408POA_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
     2416CORBA::InterfaceDef_ptr
     2417POA_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
     2428CORBA::RepositoryId
     2429POA_gsdlInterface::corbaiface::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr)
     2430{
     2431  return CORBA::string_dup ("IDL:gsdlInterface/corbaiface:1.0");
     2432}
     2433
     2434CORBA::Object_ptr
     2435POA_gsdlInterface::corbaiface::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
     2436{
     2437  return new gsdlInterface::corbaiface_stub_clp (poa, obj);
     2438}
     2439
     2440bool
     2441POA_gsdlInterface::corbaiface::dispatch (CORBA::StaticServerRequest_ptr _req)
    20272442{
    20282443  #ifdef HAVE_EXCEPTIONS
    20292444  try {
    20302445  #endif
    2031     extern CORBA::ULong mico_string_hash (const char *, CORBA::ULong);
    20322446    switch (mico_string_hash (_req->op_name(), 17)) {
    20332447    case 0:
    20342448      if( strcmp( _req->op_name(), "collectionList" ) == 0 ) {
    2035         corbatext_tarray collist;
     2449        gsdlInterface::corbatext_tarray collist;
    20362450        CORBA::StaticAny _collist( _marshaller__seq_gsdlInterface_corbatext_t, &collist );
     2451        gsdlInterface::corbaComError error;
     2452        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    20372453
    20382454        _req->add_inout_arg( &_collist );
     2455        _req->add_inout_arg( &_error );
    20392456
    20402457        if( !_req->read_args() )
    20412458          return true;
    20422459
    2043         collectionList( collist );
     2460        collectionList( collist, error );
    20442461        _req->write_results();
    20452462        return true;
     
    20482465    case 3:
    20492466      if( strcmp( _req->op_name(), "ping" ) == 0 ) {
    2050         corbatext_t collection;
     2467        gsdlInterface::corbatext_t collection;
    20512468        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
    2052         corbaComError error;
     2469        gsdlInterface::corbaComError error;
    20532470        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    20542471
     
    20692486    case 7:
    20702487      if( strcmp( _req->op_name(), "filter" ) == 0 ) {
    2071         corbatext_t collection;
     2488        gsdlInterface::corbatext_t collection;
    20722489        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
    2073         corbaFilterRequest request;
     2490        gsdlInterface::corbaFilterRequest request;
    20742491        CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaFilterRequest, &request );
    2075         corbaFilterResponse response;
     2492        gsdlInterface::corbaFilterResponse response;
    20762493        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterResponse, &response );
    2077         corbaComError error;
     2494        gsdlInterface::corbaComError error;
    20782495        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    20792496
     
    20932510    case 9:
    20942511      if( strcmp( _req->op_name(), "getFilterOptions" ) == 0 ) {
    2095         corbatext_t collection;
     2512        gsdlInterface::corbatext_t collection;
    20962513        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
    2097         corbatext_t option;
     2514        gsdlInterface::corbatext_t option;
    20982515        CORBA::StaticAny _option( _marshaller_gsdlInterface_corbatext_t, &option );
    2099         corbaFilterOptionsResponse response;
     2516        gsdlInterface::corbaFilterOptionsResponse response;
    21002517        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaFilterOptionsResponse, &response );
    2101         corbaComError error;
     2518        gsdlInterface::corbaComError error;
    21022519        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    21032520
     
    21172534    case 10:
    21182535      if( strcmp( _req->op_name(), "getCollectInfo" ) == 0 ) {
    2119         corbatext_t collection;
     2536        gsdlInterface::corbatext_t collection;
    21202537        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
    2121         corbaColInfoResponse response;
     2538        gsdlInterface::corbaColInfoResponse response;
    21222539        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaColInfoResponse, &response );
    2123         corbaComError error;
     2540        gsdlInterface::corbaComError error;
    21242541        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    21252542
     
    21382555    case 11:
    21392556      if( strcmp( _req->op_name(), "initialise" ) == 0 ) {
     2557        gsdlInterface::corbaComError error;
     2558        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
     2559
    21402560        CORBA::Boolean _res;
    21412561        CORBA::StaticAny __res( CORBA::_stc_boolean, &_res );
     2562        _req->add_inout_arg( &_error );
    21422563        _req->set_result( &__res );
    21432564
     
    21452566          return true;
    21462567
    2147         _res = initialise();
     2568        _res = initialise( error );
    21482569        _req->write_results();
    21492570        return true;
    21502571      }
    21512572      if( strcmp( _req->op_name(), "getFilterInfo" ) == 0 ) {
    2152         corbatext_t collection;
     2573        gsdlInterface::corbatext_t collection;
    21532574        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
    2154         corbatext_tarray filterNames;
     2575        gsdlInterface::corbatext_tarray filterNames;
    21552576        CORBA::StaticAny _filterNames( _marshaller__seq_gsdlInterface_corbatext_t, &filterNames );
    2156         corbaComError error;
     2577        gsdlInterface::corbaComError error;
    21572578        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    21582579
     
    21712592    case 12:
    21722593      if( strcmp( _req->op_name(), "hasCollection" ) == 0 ) {
    2173         corbatext_t corbaCollection;
     2594        gsdlInterface::corbatext_t corbaCollection;
    21742595        CORBA::StaticAny _corbaCollection( _marshaller_gsdlInterface_corbatext_t, &corbaCollection );
    21752596        CORBA::Boolean has;
    21762597        CORBA::StaticAny _has( CORBA::_stc_boolean, &has );
    2177         corbaComError error;
     2598        gsdlInterface::corbaComError error;
    21782599        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    21792600
     
    21922613    case 13:
    21932614      if( strcmp( _req->op_name(), "configure" ) == 0 ) {
    2194         corbatext_t key;
     2615        gsdlInterface::corbatext_t key;
    21952616        CORBA::StaticAny _key( _marshaller_gsdlInterface_corbatext_t, &key );
    2196         corbatext_tarray cfgline;
     2617        gsdlInterface::corbatext_tarray cfgline;
    21972618        CORBA::StaticAny _cfgline( _marshaller__seq_gsdlInterface_corbatext_t, &cfgline );
     2619        gsdlInterface::corbaComError error;
     2620        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    21982621
    21992622        _req->add_in_arg( &_key );
    22002623        _req->add_in_arg( &_cfgline );
     2624        _req->add_inout_arg( &_error );
    22012625
    22022626        if( !_req->read_args() )
    22032627          return true;
    22042628
    2205         configure( key, cfgline );
     2629        configure( key, cfgline, error );
    22062630        _req->write_results();
    22072631        return true;
    22082632      }
    22092633      if( strcmp( _req->op_name(), "getDocument" ) == 0 ) {
    2210         corbatext_t collection;
     2634        gsdlInterface::corbatext_t collection;
    22112635        CORBA::StaticAny _collection( _marshaller_gsdlInterface_corbatext_t, &collection );
    2212         corbaDocRequest request;
     2636        gsdlInterface::corbaDocRequest request;
    22132637        CORBA::StaticAny _request( _marshaller_gsdlInterface_corbaDocRequest, &request );
    2214         corbaDocResponse response;
     2638        gsdlInterface::corbaDocResponse response;
    22152639        CORBA::StaticAny _response( _marshaller_gsdlInterface_corbaDocResponse, &response );
    2216         corbaComError error;
     2640        gsdlInterface::corbaComError error;
    22172641        CORBA::StaticAny _error( _marshaller_gsdlInterface_corbaComError, &error );
    22182642
     
    22412665  }
    22422666  #endif
     2667
    22432668  return false;
    22442669}
    22452670
    2246 gsdlInterface::corbaiface_ptr gsdlInterface::corbaiface_skel::_this()
    2247 {
    2248   return gsdlInterface::corbaiface::_duplicate( this );
    2249 }
    2250 
     2671void
     2672POA_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  
    3636endif
    3737
    38 PACKAGEDIRS = wv/wv-gs  pdftohtml/pdftohtml_0_22  wget/wget-1.5.3  $(YAZ)
     38USE_CORBA=@USE_CORBA@
     39ifeq ($(USE_CORBA), 1)
     40CORBA=mico/mico
     41else
     42CORBA=
     43endif
     44
     45PACKAGEDIRS = wv/wv-gs  pdftohtml/pdftohtml_0_22  wget/wget-1.5.3  $(YAZ) $(CORBA)
    3946
    4047all:
     
    4350          (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
    4451        done
     52    for idir in $(PACKAGEDIRS); do \
     53          echo installing $$idir; \
     54          (cd $$idir && $(MAKE) install) || exit 1; \
     55        done
     56
    4557
    4658install:
  • trunk/gsdl/packages/configure

    r2052 r2113  
    2929        USE_Z3950=true
    3030        ;;
     31    --enable-corba)
     32        USE_CORBA=true
     33        ;;
    3134    --bindir=*)
    3235        bindira=`echo $1 | sed s/--bindir=//`
     
    4447done
    4548
     49if test -n "$USE_CORBA"; then
     50  # configure the MICO CORBA ORB
     51  echo ""
     52  echo "Configuring MICO CORBA"
     53  echo ""
    4654
     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
     61fi
    4762
    4863# configure the wvWare Word document converter
  • trunk/gsdl/src/colservr/corbaServer.mpp

    r1860 r2113  
    6363}
    6464
    65 class corbaServer : virtual public corbaiface_skel
     65class corbaServer : virtual public corbaiface_stub
    6666{
    6767private:
     
    103103  CORBA::Boolean initialise()
    104104  {
    105       ofstream    logout;
    106       int         reply;
     105      ofstream      logout;
     106      int           reply;
     107      comerror_t    error;
    107108
    108109      this->openLogfile("/etc/corbaout.txt", logout);
    109       reply = protocol->init(logout);
     110      reply = protocol->init(error, logout);
    110111      logout.close();
    111112      return (reply != 0 ? 1 : 0);
     
    114115  void configure(const corbatext_t &corbaKey, const corbatext_tarray &corbaCfgline)
    115116    {
    116       text_t key;
    117       text_tarray cfgline;
     117      text_t        key;
     118      text_tarray   cfgline;
     119      comerror_t    error;
    118120
    119121      corbaconv_text_t::setCorbatext(key,corbaKey);
     
    123125      // ****
    124126      cout << "Recieved " << key << " = ";
    125       for (int i=0; i<cfgline.size(); i++)
     127      for (int unsigned i=0; i<cfgline.size(); i++)
    126128    {
    127129      cout << cfgline[i] << " ";
     
    135137      cfgline.push_back (gsdlhome);
    136138      cout << "Changing gsdlhome to " << gsdlhome << endl;
    137       protocol->configure(key,cfgline);
     139      protocol->configure(key, cfgline, error);
    138140    }
    139141      else if (key=="httpdomain")
     
    148150      else
    149151    {
    150       protocol->configure(key, cfgline);
     152      protocol->configure(key, cfgline,error);
    151153    }
    152154    }
     
    233235    // copy response values
    234236    corbaResponse.numDocs = response.numDocs;
    235     corbaResponse.isApprox = response.isApprox;
     237    corbaResponse.isApprox = (::gsdlInterface::corbaIsApprox) response.isApprox;
    236238    corbaresponse_termInfoToCorba(response.termInfo, corbaResponse.termInfo);
    237239    corbaresponse_resultDocInfoToCorba(response.docInfo, corbaResponse.docInfo);
     
    327329    // get right-hand side of map
    328330    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;
    331335    corbaconv_text_t::getCorbatext((*here).second.defaultValue,corbaResponse.options[i].defaultValue);
    332336    corbatext_arrayToCorbaArray((*here).second.validValues, &corbaResponse.options[i].validValues);
     
    420424    cout << "Replying " << collist.size() << ": " << endl;
    421425
    422     for (int i = 0; i < collist.size(); i ++)
     426    for (int unsigned i = 0; i < collist.size(); i ++)
    423427      {
    424428    cout << collist[i];
  • trunk/gsdl/src/recpt/Makefile.in

    r1937 r2113  
    8686MCOMPILE = mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
    8787MLINK = mico-ld -static $(LDFLAGS) $(MICO_LIB) -o  $@
    88 MLIBS = $(LIBS) -lmico2.2.7                
     88MLIBS = $(LIBS) -L../../lib/ -lmico2.3.5 -lmicoaux2.3.5         
    8989
    9090.SUFFIXES:
     
    328328
    329329corbaserver: $(RECPTLIB_OBJS)
     330    echo -e building corbaserver
    330331    $(MLINK) $(RECPTLIB_OBJS) $(MLIBS)
    331332
     
    335336ifneq ($(USE_FASTCGI), 1)
    336337CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
     338    ../../lib/corbaiface.o \
     339    ../../lib/corbaconv_text_t.o \
     340    ../../lib/corbatext_t.o \
    337341    ../../lib/gsdllib.a  \
    338342    ../../packages/mg/src/text/libtextin.a \
     
    342346else
    343347CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
     348    ../../lib/corbaiface.o \
     349    ../../lib/corbaconv_text_t.o \
     350    ../../lib/corbatext_t.o \
    344351    ../../lib/gsdllib.a  \
    345352    ../../packages/mg/src/text/libtextin.a \
     
    351358
    352359corbarecptldd: $(CORBARECPT_OBJS)
    353     $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
     360    echo -e building corbarecptldd:
     361    $(MLINK)  $(CORBARECPT_OBJS)  $(MLIBS)
    354362
    355363test:
  • trunk/gsdl/src/recpt/cgiwrapper.cpp

    r1864 r2113  
    380380  bool found_valid_col = false;
    381381
     382
    382383  while (rprotolist_here != rprotolist_end) {
     384    comerror_t err;   
    383385    if ((*rprotolist_here).p == NULL) continue;
    384386    else if (is_z3950==false &&
    385          (*rprotolist_here).p->get_protocol_name() == "z3950proto") {
     387         (*rprotolist_here).p->get_protocol_name(err) == "z3950proto") {
    386388      cout << "\nZ39.50 Servers:   (always public)\n"
    387389       << "---------------\n";
     
    390392
    391393    text_tarray collist;
    392     comerror_t err;
    393394    (*rprotolist_here).p->get_collection_list (collist, err, cerr);
    394395    if (err == noError) {
  • trunk/gsdl/src/recpt/collectoraction.cpp

    r2112 r2113  
    676676
    677677      // 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") {
    679680    rprotolist_here ++;
    680681    continue;
     
    682683
    683684      text_tarray collist;
    684       comerror_t err;
    685685      (*rprotolist_here).p->get_collection_list (collist, err, logout);
    686686      if (err == noError) {
     
    15761576  recptprotolistclass::iterator rprotolist_end = protos->end();
    15771577  while (rprotolist_here != rprotolist_end) {
     1578    comerror_t err;
    15781579    if ((*rprotolist_here).p != NULL) {
    1579       if ((*rprotolist_here).p->get_protocol_name () == "nullproto") {
     1580      if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") {
    15801581    // create collection server and add it to nullproto
    15811582    (*rprotolist_here).p->add_collection (collection, recpt, gsdlhome, gsdlhome);
     
    15831584    text_tarray tmp;
    15841585    tmp.push_back (gsdlhome);
    1585     (*rprotolist_here).p->configure ("gsdlhome", tmp);
     1586    (*rprotolist_here).p->configure ("gsdlhome", tmp, err);
    15861587    // re-initialize the null protocol
    1587     if (!(*rprotolist_here).p->init (logout)) {
     1588    if (!(*rprotolist_here).p->init (err, logout)) {
    15881589      logout << "collectoraction::create_colserver: nullproto init failed\n";
    15891590    }
     
    16041605  recptprotolistclass::iterator rprotolist_end = protos->end();
    16051606  while (rprotolist_here != rprotolist_end) {
     1607    comerror_t err;
    16061608    if ((*rprotolist_here).p != NULL) {
    1607       if ((*rprotolist_here).p->get_protocol_name () == "nullproto") {
     1609      if ((*rprotolist_here).p->get_protocol_name (err) == "nullproto") {
    16081610    (*rprotolist_here).p->remove_collection (collection, logout);
    16091611    return;
  • trunk/gsdl/src/recpt/corbaclient.mpp

    r1982 r2113  
    4949#include "authenaction.h"
    5050#include "extlinkaction.h"
    51 #include "delhistoryaction.h"
    5251#include "tipaction.h"
    5352#include "collectoraction.h"
     
    126125  recpt.add_action (&aauthenaction);
    127126
    128   delhistoryaction adelhistoryaction;
    129   recpt.add_action(&adelhistoryaction);
    130 
    131127  collectoraction acollectoraction;
    132128  acollectoraction.set_receptionist (&recpt);
  • trunk/gsdl/src/recpt/corbaproto.h

    r1860 r2113  
    5656
    5757  // 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);
    5959
    6060  // this init will init each of the collection servers
    61   bool init (ostream &logout);
     61  bool init (comerror_t &err,ostream &logout);
    6262
    6363  // used to check for icons and retrieve them from the collection
     
    6767                text_t& httpprefix);
    6868
    69   text_t get_site_name ();
     69  text_t get_site_name (comerror_t &err);
    7070
    71   text_t get_protocol_name ();
     71  text_t get_protocol_name (comerror_t &err);
    7272  void get_collection_list (text_tarray &collist, comerror_t &err,
    7373                ostream &logout);
  • trunk/gsdl/src/recpt/corbaproto.mpp

    r1983 r2113  
    369369
    370370// this configure will configure each of the collection servers
    371 void corbaproto::configure (const text_t &key, const text_tarray &cfgline) {
     371void corbaproto::configure (const text_t &key, const text_tarray &cfgline,
     372                comerror_t &err) {
    372373  // the naming of the collection should not be done here,
    373374  // it should be done just after the collection server has been
     
    399400
    400401// this init will configure and init each of the collection servers
    401 bool corbaproto::init (ostream &logout) {
     402bool corbaproto::init (comerror_t &err, ostream &logout) {
    402403//  cout << "Corbaproto::Init" << endl;
    403404
     
    478479}
    479480
    480 text_t corbaproto::get_site_name () {
     481text_t corbaproto::get_site_name (comerror_t &err) {
    481482  return site_name;
    482483}
    483484
    484 text_t corbaproto::get_protocol_name () {
     485text_t corbaproto::get_protocol_name (comerror_t &err) {
    485486  return "corbaproto";
    486487}
     
    700701  // convert the response back to normal form
    701702  response.numDocs = corbaResponse.numDocs;
    702   response.isApprox = corbaResponse.isApprox;
     703  response.isApprox = (enum isapprox) corbaResponse.isApprox;
    703704  corbaresponse_resultDocInfoToC(corbaResponse.docInfo, response.docInfo);
    704705
  • trunk/gsdl/src/recpt/documentaction.cpp

    r2020 r2113  
    579579    metadata.insert ("archivedir");
    580580
     581    comerror_t err;
    581582    OptionValue_tarray options;
    582583    // 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") {
    584585      OptionValue_t opt;
    585586      opt.name="Query";
  • trunk/gsdl/src/recpt/nullproto.cpp

    r1892 r2113  
    6464
    6565// this configure will configure each of the collection servers
    66 void nullproto::configure (const text_t &key, const text_tarray &cfgline) {
     66void nullproto::configure (const text_t &key, const text_tarray &cfgline,
     67               comerror_t &err) {
    6768  // the naming of the collection should not be done here,
    6869  // it should be done just after the collection server has been
     
    7778
    7879// this init will configure and init each of the collection servers
    79 bool nullproto::init (ostream &logout) {
     80bool nullproto::init (comerror_t &err, ostream &logout) {
    8081  return cset->init(logout);
    8182}
    8283
    83 text_t nullproto::get_site_name () {
    84   return "";
     84text_t nullproto::get_site_name (comerror_t &err) {
     85  return "localhost";
    8586}
    8687
    87 text_t nullproto::get_protocol_name () {
     88text_t nullproto::get_protocol_name (comerror_t &err) {
    8889  return "nullproto";
    8990}
  • trunk/gsdl/src/recpt/nullproto.h

    r1892 r2113  
    5555
    5656  // 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);
    5859
    5960  // this init will init each of the collection servers
    60   bool init (ostream &logout);
     61  bool init (comerror_t &err, ostream &logout);
    6162
    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);
    6465
    6566  void get_collection_list (text_tarray &collist, comerror_t &err,
  • trunk/gsdl/src/recpt/pageaction.cpp

    r2105 r2113  
    164164        homeextra += "</tr><tr valign=top>\n";
    165165         
     166          comerror_t err;
    166167          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);
    168169          if (!site_name.empty()) { optsite = "site="+site_name+"&"; }
    169170
  • trunk/gsdl/src/recpt/receptionist.cpp

    r1927 r2113  
    359359  while (protohere != protoend) {
    360360    assert ((*protohere).p != NULL);
     361    comerror_t err;
    361362    if ((*protohere).p != NULL)
    362       (*protohere).p->configure(key, cfgline);
     363      (*protohere).p->configure(key, cfgline, err);
    363364   
    364365    protohere++;
     
    472473  recptprotolistclass::iterator protoend = protocols.end ();
    473474  while (protohere != protoend) {
     475    comerror_t err;   
    474476    if (((*protohere).p == NULL) ||
    475     !(*protohere).p->init(logout)) return false;
     477    !(*protohere).p->init(err, logout)) return false;
    476478    protohere++;
    477479  }
  • trunk/gsdl/src/recpt/recptproto.cpp

    r1860 r2113  
    3737
    3838// configure should be called for each line in the configuration file
    39 void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/) {
     39void recptproto::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/, comerror_t &) {
    4040}
    4141
     
    4343// functions are called. If init returns false a message will be written
    4444// out to the log file and no other output should be produced.
    45 bool recptproto::init (ostream &/*logout*/) {
     45bool recptproto::init (comerror_t &err, ostream &/*logout*/) {
    4646  return true;
    4747}
     
    5151// connection to a site is being used then this should return the name
    5252// used to label a site
    53 text_t recptproto::get_site_name() {
    54   return "";
     53text_t recptproto::get_site_name(comerror_t &err) {
     54  return "localhost";
    5555}
    5656
     
    5858// that can be used to do run time type identification and display information
    5959// about the protocol.
    60 text_t recptproto::get_protocol_name () {
     60text_t recptproto::get_protocol_name (comerror_t &err) {
    6161  return "recptproto";
    6262}
  • trunk/gsdl/src/recpt/recptproto.h

    r1860 r2113  
    6161
    6262  // 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);
    6464
    6565  // init should be called after the configuration but before any other
    6666  // functions are called. If init returns false a message will be written
    6767  // 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);
    6969
    7070  // get_site_name should return the name of the site used.
     
    7272  // connection to a site is being used then this should return the name
    7373  // used to label a site
    74   virtual text_t get_site_name();
     74  virtual text_t get_site_name(comerror_t &err);
    7575
    7676  // get_protocol_name should return the name of this protocol (e.g. recptproto)
    7777  // that can be used to do run time type identification and display information
    7878  // about the protocol.
    79   virtual text_t get_protocol_name ();
     79  virtual text_t get_protocol_name (comerror_t &err);
    8080
    8181  // get_collection_list returns the list of collections that
  • trunk/gsdl/src/recpt/statusaction.cpp

    r1860 r2113  
    6262  while (rprotolist_here != rprotolist_end) {
    6363    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);
    6566      text_tarray collist;
    66       comerror_t err;
    6767      (*rprotolist_here).p->get_collection_list (collist, err, logout);
    6868      if (err == noError) {
     
    263263    bool protofirst = true;
    264264    while (protohere != protoend) {
     265      comerror_t err;
    265266      if (!protofirst) textout << outconvert << ", ";
    266267      protofirst = false;
    267268      if ((*protohere).p != NULL) {
    268     textout << outconvert << "\"" << (*protohere).p->get_protocol_name() << "\"";
     269    textout << outconvert << "\"" << (*protohere).p->get_protocol_name(err) << "\"";
    269270      }
    270271      protohere++;
     
    452453  while (rprotolist_here != rprotolist_end) {
    453454    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);
    455457      textout << outconvert
    456458          << "<tr><td>"
     
    459461
    460462      text_tarray collist;
    461       comerror_t err;
    462463      (*rprotolist_here).p->get_collection_list (collist, err, logout);
    463464      if (err == noError) {
     
    527528  while (rprotolist_here != rprotolist_end) {
    528529    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) {
    530532      // see if the protocol has the collection
    531533      bool hascollection;
    532       comerror_t err;
    533534      rproto->has_collection (arg_c, hascollection, err, logout);
    534535      if (err == noError && hascollection) break;
Note: See TracChangeset for help on using the changeset viewer.