2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file ss_system_manager_conf.h
18 * @brief \~english This file contains declaration of structures T_SS_SM_INIT_HOOK_IN_PARAM, T_SS_SM_INIT_HOOK_OUT_PARAM and api initial Hook
20 /** @addtogroup BaseSystem
23 /** @addtogroup system_service
27 /** @addtogroup config
28 * @ingroup system_service
31 #ifndef CONFIG_LIBRARY_SYSTEM_MANAGER_CONFIG_INCLUDE_SYSTEM_SERVICE_SS_SYSTEM_MANAGER_CONF_H_
32 #define CONFIG_LIBRARY_SYSTEM_MANAGER_CONFIG_INCLUDE_SYSTEM_SERVICE_SS_SYSTEM_MANAGER_CONF_H_
34 #include <native_service/frameworkunified_types.h>
39 * @struct T_SS_SM_INIT_HOOK
40 * @brief \~english Version up mode, Callback function
42 typedef struct T_SS_SM_INIT_HOOK {
43 //! \~english Version up mode
45 //! \~english Call back function
46 EFrameworkunifiedStatus (*cbRebootNoticeFunc)(HANDLE hApp);
50 cbRebootNoticeFunc(NULL) {
52 } T_SS_SM_INIT_HOOK_IN_PARAM;
56 * @struct T_SS_SM_INIT_HOOK_OUT_PARAM
57 * @brief \~english Not in OOM Killer's service object, Group Relaunch service.
60 std::vector<std::string> protectedSvcs;
61 //! \~english Not in OOM Killer's service object.
62 std::vector<std::string> groupRelaunchSvcs;
63 //! \~english Group Relaunch service.
64 } T_SS_SM_INIT_HOOK_OUT_PARAM;
66 /////////////////////////////////////////////////////////////////////////////////////
67 /// \ingroup ss_sm_initHook
68 /// \~english @par Summary
70 /// \~english @param [in] hApp
71 /// HANDLE - HANDLE Application
72 /// \~english @param [in] inPrm
73 /// T_SS_SM_INIT_HOOK_IN_PARAM -
74 /// \~english @param [in] outPrm
75 /// T_SS_SM_INIT_HOOK_OUT_PARAM -
77 /// T_SS_SM_INIT_HOOK_IN_PARAM struct
79 /// typedef struct T_SS_SM_INIT_HOOK {
80 /// BOOL bIsVupMode; /* version up model */
81 /// EFrameworkunifiedStatus (*cbRebootNoticeFunc)(HANDLE hApp); /* call back function */
82 /// T_SS_SM_INIT_HOOK()
83 /// : bIsVupMode(FALSE),
84 /// cbRebootNoticeFunc(NULL) {
85 /// } /* constructor */
86 /// } T_SS_SM_INIT_HOOK_IN_PARAM;
89 /// T_SS_SM_INIT_HOOK_IN_PARAM struct
92 /// std::vector<std::string> protectedSvcs; /* OOM Killer's protected service */
93 /// std::vector<std::string> groupRelaunchSvcs; /* group relunch service */
94 /// } T_SS_SM_INIT_HOOK_OUT_PARAM;
96 /// \~english @retval eFrameworkunifiedStatusOK Success
97 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
98 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
99 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
100 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
101 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
102 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
103 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
104 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
105 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
106 /// \~english @retval eFrameworkunifiedStatusErrOther Other error(It failed to open/allocation of shared memory)
107 /// \~english @par Preconditions
109 /// \~english @par Change of the internal state
110 /// - save inPrm->cbRebootNoticeFunc to s_confCtx.cbRebootNoticeFunc.
111 /// \~english @par Causes of failures
113 /// - System Manager of the session does not exist. [eFrameworkunifiedStatusNullPointer]
114 /// - System Manager handle for the session is NULL. [eFrameworkunifiedStatusInvldHandle]
115 /// - System Manager handle type for the session is not a transmission type. [eFrameworkunifiedStatusInvldHndlType]
116 /// - System Manager message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
117 /// - Transmission for the file descriptor of System Manager message for the session is invalid. \n
118 /// [eFrameworkunifiedStatusErrNoEBADF]
119 /// - Place to interrupt by the system call (signal) has occurred during the transmission of \n
120 /// the System Manager message for the session. [eFrameworkunifiedStatusErrNoEINTR]
121 /// - Size of the transmission buffer of the System Manager message for the session is invalid. \n
122 /// [eFrameworkunifiedStatusInvldBufSize]
123 /// - Any error has occurred at the time of transmission of the System Manager message for the session. \n
124 /// [eFrameworkunifiedStatusFail]
125 /// - Transmission of System Manager message for the session fails to shared memory access. \n
126 /// [eFrameworkunifiedStatusErrOther]
127 /// \~english @par Classification
129 /// \~english @par Type
131 /// \~english @par Detail
132 /// get env val from application,and write these to Launch Config file.
134 /// eFrameworkunifiedStatus:Result
135 /// - eFrameworkunifiedStatusOK:Success
136 /// - Except eFrameworkunifiedStatusOK:Fail
137 /// \~english @see None
138 ////////////////////////////////////////////////////////////////////////////////////
139 EFrameworkunifiedStatus ss_sm_initHook(HANDLE hApp, const T_SS_SM_INIT_HOOK_IN_PARAM *inPrm,
140 T_SS_SM_INIT_HOOK_OUT_PARAM *outPrm);
142 #endif // CONFIG_LIBRARY_SYSTEM_MANAGER_CONFIG_INCLUDE_SYSTEM_SERVICE_SS_SYSTEM_MANAGER_CONF_H_