common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / systemservice / task_manager / client / ss_data_init / include / system_service / tskm_data_init.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 /**
19  * @file tskm_data_init.h
20  * @brief \~english This file contains API of initial task manager data
21  */
22 /** @addtogroup BaseSystem
23  *  @{
24  */
25 /** @addtogroup system_service
26  *  @ingroup BaseSystem
27  *  @{
28  */
29 /** @addtogroup task_manager
30  *  @ingroup system_service
31  *  @{
32  */
33
34 #ifndef TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_SYSTEM_SERVICE_TSKM_DATA_INIT_H_
35 #define TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_SYSTEM_SERVICE_TSKM_DATA_INIT_H_
36
37 #include <native_service/frameworkunified_types.h>
38 #include <system_service/ss_system_manager_if.h>
39 #include "system_service/tskm_type.h"
40
41 /////////////////////////////////////////////////////////////////////////////////////
42 /// \ingroup TSKM_GetExtBootInfo
43 /// \~english @par Summary
44 ///        Gets boot extended information.
45 /// \~english @param [in] p_info
46 ///        T_SS_SM_START_ExtDataStructType *   - Boot extended information
47 /// \~english @code
48 ///            typedef struct {
49 ///                BOOL             isProgUpdated;
50 ///                EMRelaunchStatus relaunchStatus;
51 ///                BOOL             isMapUpdated;
52 ///                BOOL             isMapDiffUpdated;
53 ///                uint8_t          reserved[];
54 ///            }T_SS_SM_START_ExtDataStructType;
55 ///            @endcode
56 /// \~english @retval TSKM_E_OK Normal end
57 /// \~english @retval TSKM_E_PAR %Parameter error
58 /// \~english @par Preconditions
59 ///       - None
60 /// \~english @par Change of the internal state
61 ///       - The internal state is not changed.
62 /// \~english @par Causes of failures
63 ///       - p_info is NULL. [TSKM_E_PAR]
64 /// \~english @par Classification
65 ///       Public
66 /// \~english @par Type
67 ///       Sync only
68 /// \~english @par Detail
69 ///       Is available only at the functions defined by using TSKM_DATA_INIT_FUNC.
70 /// \~english @see  TSKM_DATA_INIT_FUNC
71 ////////////////////////////////////////////////////////////////////////////////////
72 TSKM_ERR_t TSKM_GetExtBootInfo(T_SS_SM_START_ExtDataStructType *p_info);
73
74 /////////////////////////////////////////////////////////////////////////////////////
75 /// \ingroup TSKM_DATA_INIT_FUNC
76 /// \~english @par Summary
77 ///       Defines callback functions to initialize data.
78 /// \~english @param [in] serviceName
79 ///        const char*   - Service name
80 /// \~english @param [in] argName
81 ///        const T_SS_SM_START_DataStructType*   - Argument name
82 /// \~english @code
83 ///            typedef struct T_SS_SM_START_DataStruct{
84 ///                EPWR_WAKEUP_FACTOR_TYPE  startupReason;
85 ///                BOOL                     isUserModeOn;
86 ///                ESMDataResetModeInfo       dataResetMode;
87 ///                EPWR_SC_SECURITY_STATUS  securityStatus;
88 ///                EPWR_SC_WAKEUP_TYPE    wakeupType;
89 ///                ESMDramBackupStatus    dramBackupStatus;
90 ///                ESMResetStatus   resetStatus;
91 ///                UI_32                        resetCount;
92 ///            } T_SS_SM_START_DataStructType;
93 ///            @endcode
94 /// \~english @retval eFrameworkunifiedStatusOK Normal
95 /// \~english @retval eFrameworkunifiedStatusFail Check error
96 /// \~english @par Preconditions
97 ///       - None
98 /// \~english @par Change of the internal state
99 ///       - The internal state is not changed.
100 /// \~english @par Causes of failures
101 ///       - Return values depend on the mount of callback functions. [eFrameworkunifiedStatusFail]
102 /// \~english @par Classification
103 ///       Public
104 /// \~english @par Detail
105 ///      Defines the callback functions to initialize data. \n
106 ///       The callback functions defined by this macro are executed at a timing
107 ///        when boot factor is fixed after booting the system. \n
108 ///       (Task_Manager executes Callback prior to the boot of ActivityManager.)\n
109 ///       If each service mounts and installs initialization functions, Task_Manager boots it
110 ///        at a timing when data initialization is necessary. \n
111 ///       Each service can install the object file of initialization functions by setting them
112 ///        to MAKE variables INST_DATAINITOBJ of Makefile.
113 /// \~english @see  None
114 ////////////////////////////////////////////////////////////////////////////////////
115 #define TSKM_DATA_INIT_FUNC(ServiceName, ArgName) \
116   EFrameworkunifiedStatus tskm_ ## ServiceName ## _data_init(T_SS_SM_START_DataStructType* ArgName)
117
118 #endif  // TASK_MANAGER_CLIENT_SS_DATA_INIT_INCLUDE_SYSTEM_SERVICE_TSKM_DATA_INIT_H_
119 /** @}*/  // end of Task_Manager
120 /** @}*/  // end of SystemService
121 /** @}*/  // end of BaseSystem