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 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup tag_NSFramework
19 /// \brief System callbacks that applications should address.
23 ///////////////////////////////////////////////////////////////////////////////
26 * @file frameworkunified_application.h
27 * @brief \~english This file contains the base api of an application that must be provided.
30 /** @addtogroup BaseSystem
33 /** @addtogroup native_service
37 /** @addtogroup framework_unified
38 * @ingroup native_service
41 /** @addtogroup framework
42 * @ingroup native_service
45 #ifndef __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_APPLICATION_H__ // NOLINT (build/header_guard)
46 #define __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_APPLICATION_H__
48 #include <native_service/frameworkunified_types.h>
49 ////////////////////////////////////////////////////////////////////////////////
51 /// \~english @par Brief
52 /// Base class of application
53 /// \~english @param None
54 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
55 /// \~english @par Prerequisite
56 /// - depends on the implement of derived class
57 /// \~english @par Inside state change
58 /// - depends on the implement of derived class
59 /// \~english @par None
60 /// \~english @par Classification
62 /// \~english @par Type
64 /// \~english @par Detail
65 /// The callback of applicaiton initialize
66 ////////////////////////////////////////////////////////////////////////////////
67 EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp);
69 /// \~english @par Brief
70 /// Base class of application
71 /// \~english @param None
72 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
73 /// \~english @par Prerequisite
74 /// - depends on the implement of derived class
75 /// \~english @par Inside state change
76 /// - depends on the implement of derived class
77 /// \~english @par None
78 /// \~english @par Classification
80 /// \~english @par Type
82 /// \~english @par Detail
83 /// The callback of applicaiton WaleUp
84 ////////////////////////////////////////////////////////////////////////////////
85 EFrameworkunifiedStatus FrameworkunifiedOnWakeup(HANDLE hApp); /// << deprecated
87 /// \~english @par Brief
88 /// Base class of application
89 /// \~english @param None
90 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
91 /// \~english @par Prerequisite
92 /// - depends on the implement of derived class
93 /// \~english @par Inside state change
94 /// - depends on the implement of derived class
95 /// \~english @par None
96 /// \~english @par Classification
98 /// \~english @par Type
100 /// \~english @par Detail
101 /// The callback of applicaiton shutdown
102 ////////////////////////////////////////////////////////////////////////////////
103 EFrameworkunifiedStatus FrameworkunifiedOnShutdown(HANDLE hApp); /// << deprecated
105 /// \~english @par Brief
106 /// Base class of application
107 /// \~english @param None
108 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
109 /// \~english @par Prerequisite
110 /// - depends on the implement of derived class
111 /// \~english @par Inside state change
112 /// - depends on the implement of derived class
113 /// \~english @par None
114 /// \~english @par Classification
116 /// \~english @par Type
118 /// \~english @par Detail
119 /// The callback of applicaiton EShutdown
120 ////////////////////////////////////////////////////////////////////////////////
121 EFrameworkunifiedStatus FrameworkunifiedOnEShutdown(HANDLE hApp); /// << deprecated
123 /// \~english @par Brief
124 /// Base class of application
125 /// \~english @param None
126 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
127 /// \~english @par Prerequisite
128 /// - depends on the implement of derived class
129 /// \~english @par Inside state change
130 /// - depends on the implement of derived class
131 /// \~english @par None
132 /// \~english @par Classification
134 /// \~english @par Type
136 /// \~english @par Detail
137 /// The callback of applicaiton start
138 ////////////////////////////////////////////////////////////////////////////////
139 EFrameworkunifiedStatus FrameworkunifiedOnStart(HANDLE hApp);
141 /// \~english @par Brief
142 /// Base class of application
143 /// \~english @param None
144 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
145 /// \~english @par Prerequisite
146 /// - depends on the implement of derived class
147 /// \~english @par Inside state change
148 /// - depends on the implement of derived class
149 /// \~english @par None
150 /// \~english @par Classification
152 /// \~english @par Type
154 /// \~english @par Detail
155 /// The callback of applicaiton stop
156 ////////////////////////////////////////////////////////////////////////////////
157 EFrameworkunifiedStatus FrameworkunifiedOnStop(HANDLE hApp);
159 /////////////////////////////////////////////////////////////////////////////////////
160 /// \ingroup FrameworkunifiedOnPreStart
161 /// \~english @par Brief
162 /// callback of Application Life cycle event
163 /// \~english @param [in] hApp
164 /// HANDLE - Application Handle
165 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
166 /// \~english @par Prerequisite
167 /// Depend on the implementation in the inheriting class
168 /// \~english @par Change of internal state
169 /// Depend on the implementation in the inheriting class
170 /// \~english @par Conditions of processing failure
172 /// \~english @par Classification
174 /// \~english @par Type
176 /// \~english @par Detail
177 /// callback of Application Pre start
179 /// - include frameworkunified_application.h
180 /// - Library libNS_FrameworkUnified.so
181 /// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
184 /////////////////////////////////////////////////////////////////////////////////////
185 EFrameworkunifiedStatus FrameworkunifiedOnPreStart(HANDLE hApp);
187 /////////////////////////////////////////////////////////////////////////////////////
188 /// \ingroup FrameworkunifiedOnPreStop
189 /// \~english @par Brief
190 /// callback of Application Life cycle event
191 /// \~english @param [in] hApp
192 /// HANDLE - Application Handle
193 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
194 /// \~english @par Prerequisite
195 /// Depend on the implementation in the inheriting class
196 /// \~english @par Change of internal state
197 /// Depend on the implementation in the inheriting class
198 /// \~english @par Conditions of processing failure
200 /// \~english @par Classification
202 /// \~english @par Type
204 /// \~english @par Detail
205 /// callback of Application Pre stop
207 /// - include frameworkunified_application.h
208 /// - Library libNS_FrameworkUnified.so
209 /// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
212 /////////////////////////////////////////////////////////////////////////////////////
213 EFrameworkunifiedStatus FrameworkunifiedOnPreStop(HANDLE hApp);
215 /////////////////////////////////////////////////////////////////////////////////////
216 /// \ingroup FrameworkunifiedOnBackgroundStart
217 /// \~english @par Brief
218 /// callback of Application Life cycle event
219 /// \~english @param [in] hApp
220 /// HANDLE - Application Handle
221 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
222 /// \~english @par Prerequisite
223 /// Depend on the implementation in the inheriting class
224 /// \~english @par Change of internal state
225 /// Depend on the implementation in the inheriting class
226 /// \~english @par Conditions of processing failure
228 /// \~english @par Classification
230 /// \~english @par Type
232 /// \~english @par Detail
233 /// callback of Application Background start
235 /// - include frameworkunified_application.h
236 /// - Library libNS_FrameworkUnified.so
237 /// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
240 /////////////////////////////////////////////////////////////////////////////////////
241 EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStart(HANDLE hApp);
243 /////////////////////////////////////////////////////////////////////////////////////
244 /// \ingroup FrameworkunifiedOnBackgroundStop
245 /// \~english @par Brief
246 /// callback of Application Life cycle event
247 /// \~english @param [in] hApp
248 /// HANDLE - Application Handle
249 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
250 /// \~english @par Prerequisite
251 /// Depend on the implementation in the inheriting class
252 /// \~english @par Change of internal state
253 /// Depend on the implementation in the inheriting class
254 /// \~english @par Conditions of processing failure
256 /// \~english @par Classification
258 /// \~english @par Type
260 /// \~english @par Detail
261 /// callback of Application Background stop
263 /// - include frameworkunified_application.h
264 /// - Library libNS_FrameworkUnified.so
265 /// - Set compile option for "-DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND" when this API in the each application implements.
268 /////////////////////////////////////////////////////////////////////////////////////
269 EFrameworkunifiedStatus FrameworkunifiedOnBackgroundStop(HANDLE hApp);
271 /// \~english @par Brief
272 /// Base class of application
273 /// \~english @param None
274 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
275 /// \~english @par Prerequisite
276 /// - depends on the implement of derived class
277 /// \~english @par Inside state change
278 /// - depends on the implement of derived class
279 /// \~english @par None
280 /// \~english @par Classification
282 /// \~english @par Type
284 /// \~english @par Detail
285 /// The callback of applicaiton reinit
286 ////////////////////////////////////////////////////////////////////////////////
287 EFrameworkunifiedStatus FrameworkunifiedOnReinit(HANDLE hApp);
289 /// \~english @par Brief
290 /// Base class of application
291 /// \~english @param None
292 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
293 /// \~english @par Prerequisite
294 /// - depends on the implement of derived class
295 /// \~english @par Inside state change
296 /// - depends on the implement of derived class
297 /// \~english @par None
298 /// \~english @par Classification
300 /// \~english @par Type
302 /// \~english @par Detail
303 /// The callback of applicaiton destroy
304 ////////////////////////////////////////////////////////////////////////////////
305 EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp);
307 /// \~english @par Brief
308 /// Base class of application
309 /// \~english @param None
310 /// \~english @retval EFrameworkunifiedStatus depends on the implement of derived class
311 /// \~english @par Prerequisite
312 /// - depends on the implement of derived class
313 /// \~english @par Inside state change
314 /// - depends on the implement of derived class
315 /// \~english @par None
316 /// \~english @par Classification
318 /// \~english @par Type
320 /// \~english @par Detail
321 /// The callback of applicaiton debugdump
322 ////////////////////////////////////////////////////////////////////////////////
323 EFrameworkunifiedStatus FrameworkunifiedOnDebugDump(HANDLE hApp); // << Used for CCR Debugging
326 /// \~english @par Brief
327 /// Base class of application
328 /// \~english @param None
329 /// \~english @retval PCSTR depends on the implement of derived class
330 /// \~english @par Prerequisite
331 /// - depends on the implement of derived class
332 /// \~english @par Inside state change
333 /// - depends on the implement of derived class
334 /// \~english @par None
335 /// \~english @par Classification
337 /// \~english @par Type
339 /// \~english @par Detail
340 /// The callback of get applicaiton servcice avaible
341 ////////////////////////////////////////////////////////////////////////////////
342 PCSTR FrameworkunifiedGetServiceAvailabilityNotification(HANDLE hApp);
344 /////////////////////////////////////////////////////////////////////////////////////
345 /// \ingroup FrameworkunifiedOnDummy
346 /// \~english @par Brief
347 /// dummy callback of Application Life cycle event
348 /// \~english @param [in] hApp
349 /// HANDLE - Application Handle
350 /// \~english @retval EFrameworkunifiedStatus eFrameworkunifiedStatusOK
351 /// \~english @par Prerequisite
352 /// Prerequisites are nothing.
353 /// \~english @par Change of internal state
354 /// Change of internal state according to the API does not occur.
355 /// \~english @par Conditions of processing failure
357 /// \~english @par Classification
359 /// \~english @par Type
361 /// \~english @par Detail
362 /// Registered dummy callback when not processing
364 /// - include frameworkunified_application.h
365 /// - Library libNS_FrameworkUnified.so
368 /////////////////////////////////////////////////////////////////////////////////////
369 EFrameworkunifiedStatus FrameworkunifiedOnDummy(HANDLE hApp);
371 #endif /* __NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_APPLICATION_H__ */ // NOLINT (build/header_guard)