Re-organized sub-directory by category
[staging/basesystem.git] / service / system / system_manager / server / include / processlauncher / ProcessLauncher.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup  tag_SystemManager
19 /// \brief    This file provides support for process launching and termination.
20 ///
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #ifndef CPROCESSLAUNCHER_H_  // NOLINT
24 #define CPROCESSLAUNCHER_H_
25
26 #include <native_service/frameworkunified_types.h>
27 #include <system_service/ss_system_process.h>
28 #include <string>
29 #include "ss_system_manager.h"
30 #include "ss_sm_process_launcher.h"
31
32 /*
33  *
34  */
35 class CProcessLauncher {
36  public:
37   CProcessLauncher();
38   explicit CProcessLauncher(void *);
39   virtual ~CProcessLauncher();
40
41   EFrameworkunifiedStatus PLOnCmdTerminateModule(HANDLE hThread);
42   EFrameworkunifiedStatus PLOnCmdModuleStatus(HANDLE hThread);
43   EFrameworkunifiedStatus PLOnCmdLaunchModule(HANDLE hThread);
44   EFrameworkunifiedStatus PLOnCmdRelaunchModule(HANDLE hThread);
45   EFrameworkunifiedStatus PLOnCmdHeartbeatStatusReq(HANDLE hThread);
46   EFrameworkunifiedStatus PLOnCmdStop(HANDLE hThread);
47   EFrameworkunifiedStatus PLOnCmdStart(HANDLE hThread);
48  protected:
49   ProcessMap m_mapOfProcesses;
50
51  private:
52   EFrameworkunifiedStatus PLCmdLaunchModule(HANDLE         hThread,
53                                UI_32          f_protocol_ID,
54                                std::string    f_protocol_str);
55   EFrameworkunifiedStatus PLLaunchModule(HANDLE hThread, T_ProcessLaunchResp &f_LaunchRespData);  // NOLINT
56   EFrameworkunifiedStatus PLTerminateModule(HANDLE hThread, T_ProcessLauncherTerminationResp *f_pTerminateRespData = NULL);
57 };
58 #endif  // CPROCESSLAUNCHER_H_  // NOLINT