1 // SALOME Registry : Registry server implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : RegistryService.hxx
25 // Author : Pascale NOYRET - Antoine YESSAYAN, EDF
29 # ifndef __RegistryService_h__
30 # define __RegistryService_h__
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(SALOME_Registry)
37 #if defined REGISTRY_EXPORTS
39 #define REGISTRY_EXPORT __declspec( dllexport )
41 #define REGISTRY_EXPORT
45 #define REGISTRY_EXPORT __declspec( dllimport )
47 #define REGISTRY_EXPORT
51 class REGISTRY_EXPORT RegistryService : public POA_Registry::Components //, public PortableServer::RefCountServantBase
55 enum Status { UNDEF=-1 , TERMINATED=0 , RUNNING=1 } ;
60 const char* const _ior;
61 const char* const _name;
63 const char* const _machine;
64 const char* const _adip;
66 const char* const _pwname;
67 const long _ts_start ;
69 const char* const _cdir ;
74 friend class RegistryService ;
76 client_infos( const Registry::Infos &infos );
83 RegistryService(void);
84 virtual ~RegistryService(void);
87 virtual CORBA::ULong add (const Registry::Infos & infos);
88 virtual CORBA::ULong size ( void );
90 virtual void remove( const CORBA::ULong id );
91 virtual void hello( const CORBA::ULong id );
93 virtual void remove( CORBA::ULong id );
94 virtual void hello( CORBA::ULong id );
96 virtual void end(void);
98 virtual Registry::AllInfos *getall(void);
99 virtual Registry::AllInfos *history(void);
101 void SessionName( const char *sessionName ) ;
106 const char *_SessionName ;
108 std::map<int,client_infos *> _reg ;
109 std::map<int,client_infos *> _fin ;
111 Registry::AllInfos* makeseq(std::map<int,client_infos *> &mymap );