Salome HOME
Initial commit
[modules/jobmanager.git] / src / engine / BL_SALOMEServices.hxx
1 //  Copyright (C) 2009 CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _BL_SALOMESERVICES_HXX_
21 #define _BL_SALOMESERVICES_HXX_
22
23 #include "BL_Traces.hxx"
24 #include "BL_Job.hxx"
25
26 #include "SALOME_NamingService.hxx"
27 #include "SALOME_LifeCycleCORBA.hxx"
28 #include "SALOME_ContainerManager.hh"
29
30 #include <map>
31 #include <list>
32 #include <string>
33
34 namespace BL{
35
36   class SALOMEServices
37   {
38     public:
39       SALOMEServices();
40       virtual ~SALOMEServices();
41
42       bool initNS();
43
44       std::list<std::string> getMachineList();
45
46       std::string start_job(BL::Job * job);
47       std::string refresh_job(BL::Job * job);
48       std::string delete_job(BL::Job * job);
49       std::string get_results_job(BL::Job * job);
50
51     protected:
52       std::string start_yacs_job(BL::Job * job);
53
54     private:
55       CORBA::ORB_var _orb;
56       SALOME_NamingService * _salome_naming_service;
57       SALOME_LifeCycleCORBA * _lcc;
58       Engines::SalomeLauncher_var _salome_launcher;
59       Engines::ResourcesManager_var _resources_manager;
60
61       bool _state;
62   };
63
64 }
65
66 #endif
67
68