Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / include / native_service / frameworkunified_framework_if.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 // tag_NSFramework
19 // Application framework's interface header file.
20 //
21 // The interfaces exposed here are
22 //    - Application framework Dispatcher
23 //      - attaching/detaching service protocol callbacks
24 //      - attaching/detaching notification callbacks
25 //    - Message Center
26 //      - send messaging to services/clients
27 //      - read the incoming message information
28 //    - Service Directory
29 //      - open and close a service
30 //      - register/unregister a service
31 //    - Notification & Persistence Service
32 //      - register/unregister and publish a notification
33 //      - subscribe/unsubscribe to a notification
34 //
35 /////////////////////////////////////////////////////////////////////////////
36 //@{
37 /**
38  * @file frameworkunified_framework_if.h
39  * @brief \~english Application framework's interface header file.
40  *
41  */
42 /** @addtogroup BaseSystem
43  *  @{
44  */
45 /** @addtogroup native_service
46  *  @ingroup BaseSystem
47  *  @{
48  */
49 /** @addtogroup framework_unified
50  *  @ingroup Native_service
51  *  @{
52  */
53 /** @addtogroup framework
54  *  @ingroup native_service
55  *  @{
56  */
57 #ifndef __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__  // NOLINT  (build/header_guard)
58 #define __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__
59
60 #include <native_service/frameworkunified_types.h>
61 #include <native_service/frameworkunified_framework_types.h>
62 #include <native_service/frameworkunified_service_protocol.h>
63 #include <native_service/ns_shared_mem_if.h>
64 #include <native_service/ns_np_service.h>
65 ///////////////////////////////////
66 // To avoid integration build break: removing dependency on SM framework.
67 // #include <native_service/frameworkunified_sm_hsmframework.h>
68
69 // QUICK FIX Files added here, which was included by frameworkunified_sm_hsmframework.h
70 // if we simply comment frameworkunified_sm_hsmframework.h inclusion, then other modules build may
71 // break, if they are not including below files explicitly and was relying of frameworkunified_framework_if.h.
72 #include <native_service/ns_timer_if.h>
73 #include <native_service/ns_message_center_if.h>
74 #include <native_service/ns_logger_if.h>
75 #include <map>
76 #include <string>
77 #include <vector>
78 ///////////////////////////////////
79
80
81 ////////////////////////////////////////////////////////////////////////////////////////////
82 //    Dispatcher functions
83 ////////////////////////////////////////////////////////////////////////////////////////////
84
85
86
87 /////////////////////////////////////////////////////////////////////////////////////
88 /// \ingroup FrameworkunifiedAttachCallbacksToDispatcher
89 /// \~english @par Brief
90 ///       API to register multiple Callback-informations to the Dispatcher.
91 /// \~english @param [in] hApp
92 ///        HANDLE   - HANDLE for Application
93 /// \~english @param [in] pServiceName
94 ///        PCSTR    - Pointer to the service name
95 /// \~english @param [in] pMsgHandler
96 ///        FrameworkunifiedProtocolCallbackHandler*    - Pointer to the Message Handler structure
97 /// \~english @param [in] uiHandlerCount
98 ///        UI_32     - Message Handler count(1 to 4294967295)
99 /// \~english @param [in] hSession
100 ///        HANDLE    - Session handle (Default:NULL)
101 /// \~english @par
102 ///        FrameworkunifiedProtocolCallbackHandler Structure
103 /// \~english @code
104 ///            typedef struct _FrameworkunifiedProtocolCallbackHandler
105 ///            {
106 ///                  /* Command ID/request ID/approval ID  of protocol on the service */
107 ///                  UI_32 iCmd;
108 ///                  /* Pointer to Callback function that would be called on receiving iCmd from pServiceName. */
109 ///                  CbFuncPtr callBack;
110 ///            }FrameworkunifiedProtocolCallbackHandler;
111 ///            @endcode
112 /// \~english @retval eFrameworkunifiedStatusOK Success
113 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
114 /// \~english @par Prerequisite
115 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
116 ///       done.
117 /// \~english @par Change of internal state
118 ///       - Change of internal state according to the API does not occur.
119 /// \~english @par Conditions of processing failure
120 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
121 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
122 ///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
123 ///       - Message Handler number specified in the argument is 0.  [eFrameworkunifiedStatusInvldParam]
124 ///       - NULL Callback function pointer of the Message Handler structure specified by the argument.
125 ///       [eFrameworkunifiedStatusInvldParam]
126 /// \~english @par Detail
127 ///       Register multiple Callback-informations(iCmd,CbFuncPtr) of the service that has been specified by the argument
128 ///       \n
129 ///       to the Dispatcher.\n
130 ///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is called. \n
131 ///       When multiple registration, if an error occurs in the second and subsequent, becomes effective only \n
132 ///       information that has been registered so far. \n
133 ///       For number of upper limit of the registration possible message handler, depending on \n
134 ///       the securable size as the area of the message handler structure. Therefore, note to ensure \n
135 ///       the size of the area of the message handler structure at the call side of API, and define \n
136 ///       the number of message handler.
137 /// \~english @par
138 ///        Please note the following points when using this API for application.\n
139 ///       - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
140 ///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
141 ///       - It is not possible to register more than one callback with the same command ID (iCmd) for the same service/session ID,
142 ///         and the callback function will win.
143 ///       - Operatio is not guaranteed if the number of elements of the array indicated by the address of the pointer (pMsgHandler)
144 ///         to the message handler structure does not match the number of arrays specified by the number of
145 ///         party-specified message hadlers (uiHandlerCount).
146 ///       - The callback information is registered to the heap.
147 /// \~english @par Classification
148 ///          Public
149 /// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
150 ///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
151 ///                 FrameworkunifiedDetachServiceFromDispatcher
152 ////////////////////////////////////////////////////////////////////////////////////
153 EFrameworkunifiedStatus FrameworkunifiedAttachCallbacksToDispatcher(HANDLE hApp, PCSTR pServiceName,
154                                           const FrameworkunifiedProtocolCallbackHandler *pMsgHandler,
155                                           UI_32 uiHandlerCount, HANDLE hSession = NULL);
156
157 /////////////////////////////////////////////////////////////////////////////////////
158 /// \ingroup FrameworkunifiedAttachCallbackToDispatcher
159 /// \~english @par Brief
160 ///       API to register a Callback-information to the Dispatcher.
161 /// \~english @param [in] hApp
162 ///        HANDLE   - Handle for Application
163 /// \~english @param [in] pServiceName
164 ///        PCSTR    - Pointer to the service name
165 /// \~english @param [in] iCmd
166 ///        UI_32    - Command ID/request ID/approval ID  of protocol on the service
167 /// \~english @param [in] fpOnCmd
168 ///        CbFuncPtr  - Pointer to Callback function that would be called on receiving iCmd from pServiceName.
169 /// \~english @param [in] hSession
170 ///        HANDLE    - Session handle (Default:NULL)
171 /// \~english @retval eFrameworkunifiedStatusOK Success
172 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
173 /// \~english @par Prerequisite
174 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
175 ///       done.
176 /// \~english @par Change of internal state
177 ///       - Change of internal state according to the API does not occur.
178 /// \~english @par Conditions of processing failure
179 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
180 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
181 ///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
182 ///       - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
183 /// \~english @par Detail
184 ///       Register a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
185 ///       to the Dispatcher.\n
186 ///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is called.
187 /// \~english @par
188 ///        Please note the following points when using this API for application.\n
189 ///       - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
190 ///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.
191 ///       - The callback information is registered to the heap.
192 /// \~english @par Classification
193 ///          Public
194 /// \~english @see  FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
195 ///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
196 ///                 FrameworkunifiedDetachServiceFromDispatcher
197 ////////////////////////////////////////////////////////////////////////////////////
198 EFrameworkunifiedStatus FrameworkunifiedAttachCallbackToDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, CbFuncPtr fpOnCmd,
199                                          HANDLE hSession = NULL);
200
201 /////////////////////////////////////////////////////////////////////////////////////
202 /// \ingroup FrameworkunifiedAttachCallbacksToDispatcherWithFd
203 /// \~english @par Brief
204 ///       API to register multiple Callback and file descriptor set to the Dispatcher.
205 /// \~english @param [in] hApp
206 ///        HANDLE   - HANDLE for Application
207 /// \~english @param [in] handlers
208 ///        FrameworkunifiedFdProtocolCallbackHandler*  - Pointer to the Message Handler structure to be registered
209 /// \~english @param [in] handlerCount
210 ///        UI_32  - Message Handler Count(1 to 4294967295)
211 /// \~english @par
212 ///        FrameworkunifiedFdProtocolCallbackHandler Structure
213 /// \~english @code
214 ///            typedef struct _FrameworkunifiedFdProtocolCallbackHandler
215 ///            {
216 ///                  int fd;               /* File descriptor for message waiting control */
217 ///                  CbFuncPtr callBack;   /*  Pointer to Callback function               */
218 ///            }FrameworkunifiedFdProtocolCallbackHandler;
219 ///            @endcode
220 /// \~english @retval eFrameworkunifiedStatusOK Success
221 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
222 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
223 /// \~english @par Prerequisite
224 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
225 ///       done.
226 /// \~english @par Change of internal state
227 ///       - Change of internal state according to the API does not occur.
228 /// \~english @par Conditions of processing failure
229 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
230 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
231 ///       - Pointer (handlers) to the Message Handler structure of the registration object specified in the argument is
232 ///       NULL. [eFrameworkunifiedStatusInvldParam]
233 ///       - Message Handler number of registered specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
234 ///       - File descriptor in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler) specified in the argument is
235 ///       incorrect(If fd is less than or equal to 0). [eFrameworkunifiedStatusInvldParam]
236 ///       - Pointer(fpOnCmd) to the Callback function in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler)
237 ///       specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
238 ///       - File descriptor specified in the argument is incorrect(If fd is less than or equal to 0).
239 ///       [eFrameworkunifiedStatusInvldParam]
240 ///       - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
241 ///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
242 ///       appropriate. [eFrameworkunifiedStatusFail]
243 ///       - File descriptor in the Message Handler structure(FrameworkunifiedFdProtocolCallbackHandler) specified in the argument is
244 ///       already registered to the monitoring control(epoll_ctl). [eFrameworkunifiedStatusFail]
245 ///       - It failed to add the file descriptor of the message waiting control to the monitoring of epoll_ctl().
246 ///       [eFrameworkunifiedStatusFail]
247 /// \~english @par Detail
248 ///       Register multiple callbacks that link to file descriptor that has been specified by the argument to
249 ///       the Dispatcher.\n
250 ///       For epoll_ctl() of Dispatcher, add multiple file descriptor for the specified message waiting control \n
251 ///       by the argument.\n
252 ///       Thus, for the file descriptor registered in the message waiting control, when receiving a message, \n
253 ///       so the appropriate Callback function is called. \n
254 ///       When multiple registration, if an error occurs in the second and subsequent, becomes effective only \n
255 ///       information that has been registered so far. \n
256 ///       For number of upper limit of the registration possible message handler, depending on \n
257 ///       the securable size as the area of the message handler structure. Therefore, note to ensure \n
258 ///       the size of the area of the message handler structure at the call side of API, and define \n
259 ///       the number of message handler.
260 /// \~english @par
261 ///        Please note the following points when using this API for application.\n
262 ///       - The operation cannot be guaranteed if the number of elements of the array entity indicated by the address of the pointer (handlers)
263 ///         to the message handler structure to be registered does not match the number of arrays specified in the number of message handlers o be registered (handlerCount).\n
264 ///       - The callback information is registered to the heap.
265 /// \~english @par Classification
266 ///          Public
267 /// \~english @see  FrameworkunifiedAttachCallbackToDispatcherWithFd, FrameworkunifiedDetachCallbackFromDispatcherWithFd,
268 ///                  FrameworkunifiedDetachCallbacksFromDispatcherWithFd
269 ////////////////////////////////////////////////////////////////////////////////////
270 EFrameworkunifiedStatus FrameworkunifiedAttachCallbacksToDispatcherWithFd(HANDLE hApp, const FrameworkunifiedFdProtocolCallbackHandler *handlers,
271                                                 UI_32 handlerCount);
272
273 /////////////////////////////////////////////////////////////////////////////////////
274 /// \ingroup FrameworkunifiedAttachCallbackToDispatcherWithFd
275 /// \~english @par Brief
276 ///       API to register a callback that link to a single file descriptor to the Dispatcher.
277 /// \~english @param [in] hApp
278 ///        HANDLE   - HANDLE for Application
279 /// \~english @param [in] fd
280 ///        int        - File descriptor for message waiting control
281 /// \~english @param [in] fpOnCmd
282 ///        CbFuncPtr  - Pointer to Callback function
283 /// \~english @retval eFrameworkunifiedStatusOK Success
284 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
285 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
286 /// \~english @par Prerequisite
287 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
288 ///       done.
289 /// \~english @par Change of internal state
290 ///       - Change of internal state according to the API does not occur.
291 /// \~english @par Conditions of processing failure
292 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
293 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
294 ///       - File descriptor specified in the argument is incorrect(If fd is less than or equal to 0).
295 ///       [eFrameworkunifiedStatusInvldParam]
296 ///       - Pointer (fpOnCmd) is NULL to the Callback function specified in the argument. [eFrameworkunifiedStatusInvldParam]
297 ///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
298 ///       appropriate. [eFrameworkunifiedStatusFail]
299 ///       - File descriptor(fd) specified in the argument is already registered to the monitoring control(epoll_ctl).
300 ///       [eFrameworkunifiedStatusFail]
301 ///       - It failed to add the file descriptor(fd) of the message waiting control to the monitoring of epoll_ctl().
302 ///       [eFrameworkunifiedStatusFail]
303 /// \~english @par Detail
304 ///       Register a callback that link to a file descriptor that has been specified by the argument to
305 ///       the Dispatcher.\n
306 ///       For epoll_ctl() of Dispatcher, add a file descriptor(fd) for the specified message waiting control \n
307 ///       by the argument.\n
308 ///       Thus, for the file descriptor registered in the message waiting control, when receiving a message, \n
309 ///       so the appropriate Callback function is called.
310 /// \~english @par
311 ///        Please note the following points when using this API for application.\n
312 ///       - The callback information is registered to the heap.
313 /// \~english @par Classification
314 ///          Public
315 /// \~english @see  FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedDetachCallbackFromDispatcherWithFd,
316 ///                  FrameworkunifiedDetachCallbacksFromDispatcherWithFd
317 ////////////////////////////////////////////////////////////////////////////////////
318 EFrameworkunifiedStatus FrameworkunifiedAttachCallbackToDispatcherWithFd(HANDLE hApp, int fd, CbFuncPtr fpOnCmd);
319
320 /////////////////////////////////////////////////////////////////////////////////////
321 /// \ingroup FrameworkunifiedAttachParentCallbacksToDispatcher
322 /// \~english @par Brief
323 ///       API to register multiple callback information for the parent thread to the Dispatcher.
324 /// \~english @param [in] hChildApp
325 ///        HANDLE   - HANDLE for Application
326 /// \~english @param [in] pMsgHandler
327 ///        FrameworkunifiedProtocolCallbackHandler*    - Pointer to the Message Handler structure
328 /// \~english @param [in] uiHandlerCount
329 ///        UI_32     - Message Handler count(1 to 4294967295)
330 /// \~english @par
331 ///        FrameworkunifiedProtocolCallbackHandler Structure
332 /// \~english @code
333 ///            typedef struct _FrameworkunifiedProtocolCallbackHandler
334 ///            {
335 ///                  /* Command ID/request ID/approval ID  of protocol on the service */
336 ///                  UI_32 iCmd;
337 ///                  /* Pointer to Callback function that would be called on receiving iCmd from pServiceName. */
338 ///                  CbFuncPtr callBack;
339 ///            }FrameworkunifiedProtocolCallbackHandler;
340 ///            @endcode
341 /// \~english @retval eFrameworkunifiedStatusOK Success
342 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
343 /// \~english @par Prerequisite
344 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
345 ///       done.
346 /// \~english @par Change of internal state
347 ///       - Change of internal state according to the API does not occur.
348 /// \~english @par Conditions of processing failure
349 ///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
350 ///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
351 ///       - Parent service name in the HANDLE(hApp) specified in the argument is NULL . [eFrameworkunifiedStatusInvldParam]
352 ///       - Message Handler number specified in the argument is 0.  [eFrameworkunifiedStatusInvldParam]
353 ///       - NULL Callback function pointer of the Message Handler structure specified by the argument.
354 ///       [eFrameworkunifiedStatusInvldParam]
355 /// \~english @par Detail
356 ///       Register multiple Callback-informations(iCmd,CbFuncPtr) to the Dispatcher to process \n
357 ///       the message from the parent thread.  \n
358 ///       Thus, if the iCmd is requested from the parent service(application), so the appropriate \n
359 ///       Callback function is called. \n
360 ///       When multiple registration, if an error occurs in the second and subsequent, becomes \n
361 ///       effective only information that has been registered so far.\n
362 ///       For number of upper limit of the registration possible message handler, depending on \n
363 ///       the securable size as the area of the message handler structure. Therefore, note to ensure \n
364 ///       the size of the area of the message handler structure at the call side of API, and define \n
365 ///       the number of message handler.
366 /// \~english @par
367 ///        Please note the following points when using this API for application.\n
368 ///       - Operation is not guaranteed if the number of elements of the array indicated by the address of the pointer (pMsgHandler)
369 ///         to the message handler structure does not match the number of arrays specified by the number of
370 ///         party-specified message hadlers (uiHandlerCount).
371 ///       - The callback information is registered to the heap.
372 /// \~english @par Classification
373 ///          Public
374 /// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
375 ///                  FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
376 ///                  FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
377 ///                  FrameworkunifiedDetachServiceFromDispatcher
378 ////////////////////////////////////////////////////////////////////////////////////
379 EFrameworkunifiedStatus FrameworkunifiedAttachParentCallbacksToDispatcher(HANDLE hChildApp, const FrameworkunifiedProtocolCallbackHandler *pMsgHandler,
380                                                 UI_32 uiHandlerCount);
381
382 /////////////////////////////////////////////////////////////////////////////////////
383 /// \ingroup FrameworkunifiedDetachCallbacksFromDispatcher
384 /// \~english @par Brief
385 ///       API to cancel multiple Callback-informations from the Dispatcher.
386 /// \~english @param [in] hApp
387 ///        HANDLE   - HANDLE for Application
388 /// \~english @param [in] pServiceName
389 ///        PCSTR    - Pointer to the service name
390 /// \~english @param [in] puiCmdArray
391 ///        PUI_32    - Pointer to Command ID/request ID/approval ID  of protocol on the service
392 /// \~english @param [in] uiCommandCount
393 ///        UI_32    - Cancel handler count
394 /// \~english @param [in] hSession
395 ///        HANDLE    - Session handle (Default:NULL)
396 /// \~english @retval eFrameworkunifiedStatusOK Success
397 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
398 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
399 /// \~english @par Prerequisite
400 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
401 ///       done.
402 /// \~english @par Change of internal state
403 ///       - Change of internal state according to the API does not occur.
404 /// \~english @par Conditions of processing failure
405 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
406 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
407 ///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
408 ///       - Pointer(puiCmdArray) to cancel target ID specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
409 ///       - The number(uiCommandCount) of handlers to cancel specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
410 ///       - Specified service (ServiceName) in the argument is not present. [eFrameworkunifiedStatusFail]
411 /// \~english @par Detail
412 ///       Cancel a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
413 ///       from the Dispatcher.\n
414 ///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is not called. \n
415 ///       If you have already specified the iCmd of revocation has been subject, to return the eFrameworkunifiedStatusOK.
416 /// \~english @par
417 ///        Please note the following points when using this API for application.\n
418 ///       - If the iCmad to be canceled is specified, the eFrameworkunifiedStatusOK is returned.
419 ///       - Event if an error occurs during deletion of two or more iCmd, the subsequent iCmd is deleted.
420 ///       - If a iCmd larger than the iCmd array is specified eFrameworkunifiedStatusOK is returned and all iCmd is deleted.\n
421 ///       - If the hade (hSession) for the session specified by the arguments is not appropriate (disabled),
422 ///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
423 /// \~english @par Classification
424 ///          Public
425 /// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbackFromDispatcher,
426 ///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
427 ///                 FrameworkunifiedDetachServiceFromDispatcher
428 ////////////////////////////////////////////////////////////////////////////////////
429 EFrameworkunifiedStatus FrameworkunifiedDetachCallbacksFromDispatcher(HANDLE hApp, PCSTR pServiceName, const PUI_32 puiCmdArray,
430                                             UI_32 uiCommandCount, HANDLE hSession = NULL);
431
432 /////////////////////////////////////////////////////////////////////////////////////
433 /// \ingroup FrameworkunifiedDetachCallbackFromDispatcher
434 /// \~english @par Brief
435 ///       API to cancel a Callback-information from the Dispatcher.
436 /// \~english @param [in] hApp
437 ///        HANDLE   - HANDLE for Application
438 /// \~english @param [in] pServiceName
439 ///        PCSTR    - Pointer to the service name
440 /// \~english @param [in] iCmd
441 ///        UI_32    - Command ID/request ID/approval ID  of protocol on the service
442 /// \~english @param [in] hSession
443 ///        HANDLE    - Session handle (Default:NULL)
444 /// \~english @retval eFrameworkunifiedStatusOK Success
445 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
446 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
447 /// \~english @par Prerequisite
448 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
449 ///       done.
450 /// \~english @par Change of internal state
451 ///       - Change of internal state according to the API does not occur.
452 /// \~english @par Conditions of processing failure
453 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
454 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
455 ///       - Pointer(pServiceName) is NULL to the service name specified in the argument. [eFrameworkunifiedStatusInvldParam]
456 ///       - Specified service (ServiceName) in the argument is not present. [eFrameworkunifiedStatusFail]
457 /// \~english @par Detail
458 ///       Cancel a Callback-information(iCmd,CbFuncPtr) of the service that has been specified by the argument \n
459 ///       from the Dispatcher.\n
460 ///       Thus, if the iCmd is requested from the service, so the appropriate Callback function is not called. \n
461 ///       If you have already specified the cancellation has been the subject or unregistered iCmd, to return \n
462 ///       the eFrameworkunifiedStatusOK.
463 /// \~english @par
464 ///        Please note the following points when using this API for application.\n
465 ///       - If the handle (hSession) for the session specified by the arguments is not appropriate (disabled),
466 ///         the system assumes that the session ID = MAX_SESSION_ID_VAL(0xFFFF) is specified.\n
467 /// \~english @par Classification
468 ///          Public
469 /// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
470 ///                 FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
471 ///                 FrameworkunifiedDetachServiceFromDispatcher
472 ////////////////////////////////////////////////////////////////////////////////////
473 EFrameworkunifiedStatus FrameworkunifiedDetachCallbackFromDispatcher(HANDLE hApp, PCSTR pServiceName, UI_32 iCmd, HANDLE hSession = NULL);
474
475 /////////////////////////////////////////////////////////////////////////////////////
476 /// \ingroup FrameworkunifiedDetachCallbacksFromDispatcherWithFd
477 /// \~english @par Brief
478 ///       API to cancel multiple Callback and file descriptor set from the Dispatcher.
479 /// \~english @param [in] hApp
480 ///        HANDLE   - HANDLE for Application
481 /// \~english @param [in] fdArray
482 ///        int*  - Pointer to cancel the target file descriptor array
483 /// \~english @param [in] handlerCount
484 ///        UI_32  - Handler count of cancellation
485 /// \~english @retval eFrameworkunifiedStatusOK Success
486 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
487 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
488 /// \~english @par Prerequisite
489 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
490 ///       done.
491 /// \~english @par Change of internal state
492 ///       - Change of internal state according to the API does not occur.
493 /// \~english @par Conditions of processing failure
494 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
495 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
496 ///       - Pointer(fdArray) is NULL to cancel the target file descriptor array specified in the argument.
497 ///       [eFrameworkunifiedStatusInvldParam]
498 ///       - Handler count(handlerCount) of canceled specified by the argument is 0. [eFrameworkunifiedStatusInvldParam]
499 ///       - File descriptor of the file descriptor in the array(fdArray) specified by the argument is incorrect(If fd is
500 ///       less than or equal to 0). [eFrameworkunifiedStatusInvldParam]
501 ///       - File descriptor in the file descriptor array(fdArray) specified in the argument is already deleted from the
502 ///       management table, and can not search. [eFrameworkunifiedStatusFail]
503 ///       - There is no file descriptor management table of the specified HANDLE(hApp) in argument. [eFrameworkunifiedStatusFail]
504 ///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
505 ///       appropriate. [eFrameworkunifiedStatusFail]
506 ///       - It failed to delete the file descriptor(fd) of the message waiting control from the monitoring of
507 ///       epoll_ctl(). [eFrameworkunifiedStatusFail]
508 /// \~english @par Detail
509 ///       Cancel Callback and file descriptor set that has been specified by the argument from the Dispatcher.\n
510 ///       For epoll_ctl() of Dispatcher, delete multiple file descriptor for the specified message waiting control \n
511 ///       by the argument.\n
512 ///       Thus, for the file descriptor became cancellation target, when receiving the message, the appropriate \n
513 ///       Callback function is not called.
514 /// \~english @par
515 ///        Please note the following points when using this API for application.\n
516 ///       - Operation cannot be guaranteed if the number of elements of the array specified by the address of the pointer
517 ///         to the file descriptor array to be canceled (fdArray) does not match the number of arrays specified by the number of
518 ///         file descriptors to be canceled (uiCommandCount).
519 /// \~english @par Classification
520 ///          Public
521 /// \~english @see  FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackFromDispatcherWithFd,
522 ///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd
523 ////////////////////////////////////////////////////////////////////////////////////
524 EFrameworkunifiedStatus FrameworkunifiedDetachCallbacksFromDispatcherWithFd(HANDLE hApp, const int *fdArray, UI_32 uiCommandCount);
525
526 /////////////////////////////////////////////////////////////////////////////////////
527 /// \ingroup FrameworkunifiedDetachCallbackFromDispatcherWithFd
528 /// \~english @par Brief
529 ///       API to cancel a Callback and file descriptor from the Dispatcher.
530 /// \~english @param [in] hApp
531 ///        HANDLE   - HANDLE for Application
532 /// \~english @param [in] fd
533 ///        int        - Cancel the target file descriptor
534 /// \~english @retval eFrameworkunifiedStatusOK Success
535 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
536 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
537 /// \~english @par Prerequisite
538 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
539 ///       done.
540 /// \~english @par Change of internal state
541 ///       - Change of internal state according to the API does not occur.
542 /// \~english @par Conditions of processing failure
543 ///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
544 ///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
545 ///       - File descriptor(fd) specified in the argument is incorrect(If fd is less than or equal to 0).
546 ///       [eFrameworkunifiedStatusInvldParam]
547 ///       - File descriptor specified in the argument is already deleted from the management table, and can not search.
548 ///       [eFrameworkunifiedStatusFail]
549 ///       - There is no file descriptor management table of the specified HANDLE(hApp) in argument. [eFrameworkunifiedStatusFail]
550 ///       - Monitoring file descriptor for epoll managed by the HANDLE(hApp) specified in the argument is not
551 ///       appropriate. [eFrameworkunifiedStatusFail]
552 ///       - It failed to delete the file descriptor(fd) of the message waiting control from the monitoring of
553 ///       epoll_ctl(). [eFrameworkunifiedStatusFail]
554 /// \~english @par Detail
555 ///       Cancel a Callback and file descriptor that has been specified by the argument from the Dispatcher.\n
556 ///       For epoll_ctl() of Dispatcher, delete a file descriptor(fd) for the specified message waiting control \n
557 ///       by the argument.\n
558 ///       Thus, for the file descriptor became cancellation target, when receiving the message, the appropriate \n
559 ///       Callback function is not called.
560 /// \~english @par Classification
561 ///          Public
562 /// \~english @see  FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackFromDispatcherWithFd,
563 ///                 FrameworkunifiedDetachCallbacksFromDispatcherWithFd
564 ////////////////////////////////////////////////////////////////////////////////////
565 EFrameworkunifiedStatus FrameworkunifiedDetachCallbackFromDispatcherWithFd(HANDLE hApp, int fd);
566
567 /////////////////////////////////////////////////////////////////////////////////////
568 /// \ingroup FrameworkunifiedDetachParentCallbacksFromDispatcher
569 /// \~english @par Brief
570 ///       API to cancel the multiple of Callback information for the parent thread from Dispatcher.
571 /// \~english @param [in] hApp
572 ///        HANDLE   - HANDLE for Application
573 /// \~english @param [in] puiCmdArray
574 ///        PUI_32    -  Pointer to an array of command/request on the service protocol
575 /// \~english @param [in] uiCommandCount
576 ///        UI_32     - Handler count of cancellation
577 /// \~english @retval eFrameworkunifiedStatusOK Success
578 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
579 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
580 /// \~english @par Prerequisite
581 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
582 ///       done.
583 /// \~english @par Change of internal state
584 ///       - Change of internal state according to the API does not occur.
585 /// \~english @par Conditions of processing failure
586 ///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
587 ///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
588 ///       - Pointer(puiCmdArray) to an array of command/request that you specified in the argument is NULL.
589 ///       [eFrameworkunifiedStatusInvldParam]
590 ///       - Handler count(uiCommandCount) of canceled specified by the argument is 0.  [eFrameworkunifiedStatusInvldParam]
591 ///       [eFrameworkunifiedStatusInvldParam]
592 ///       - Parent service name in the HANDLE(hApp) specified in the argument is NULL . [eFrameworkunifiedStatusInvldParam]
593 ///       - There is no parent service of the target in the HANDLE(hApp) specified in the argument. [eFrameworkunifiedStatusFail]
594 /// \~english @par Detail
595 ///       Cancel multiple Callback-informations(iCmd,CbFuncPtr) from the Dispatcher to process \n
596 ///       the message from the parent thread.  \n
597 ///       Thus, if iCmd has been requested from the parent service (application), the corresponding \n
598 ///       Callback function is no longer referred to. \n
599 ///       If you have already specified the iCmd of revocation has been subject, to return the eFrameworkunifiedStatusOK.
600 /// \~english @par
601 ///        Please note the following points when using this API for application.\n
602 ///       - Operation cannot be guaranteed if the number of elements of the array specified by the address of the pointer (puiCmdArray)
603 ///         to the array of commands/requests on the service protocol does not match the number of arrays specified by the number of hadles to cancel (uiCommandCount).
604 /// \~english @par Classification
605 ///          Public
606 /// \~english @see  FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
607 ///                  FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
608 ///                  FrameworkunifiedAttachParentCallbacksToDispatcher, FrameworkunifiedDetachParentCallbacksFromDispatcher,
609 ///                  FrameworkunifiedDetachServiceFromDispatcher
610 ////////////////////////////////////////////////////////////////////////////////////
611 EFrameworkunifiedStatus FrameworkunifiedDetachParentCallbacksFromDispatcher(HANDLE hApp, const PUI_32 puiCmdArray, UI_32 uiCommandCount);
612
613 /////////////////////////////////////////////////////////////////////////////////////
614 /// \ingroup FrameworkunifiedDetachServiceFromDispatcher
615 /// \~english @par Brief
616 ///       Disconnect the service from Dispatcher, and API to cancel all the associated callbacks.
617 /// \~english @param [in] hApp
618 ///        HANDLE   - HANDLE for Application
619 /// \~english @param [in] pServiceName
620 ///        PCSTR    -  Pointer to the service name
621 /// \~english @retval eFrameworkunifiedStatusOK Success
622 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
623 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
624 /// \~english @par Prerequisite
625 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
626 ///       done.
627 /// \~english @par Change of internal state
628 ///       - Change of internal state according to the API does not occur.
629 /// \~english @par Conditions of processing failure
630 ///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
631 ///       - HANDLE(hApp) specified in the argument is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
632 ///       - Pointer (pServiceName) to the service name specified in the argument is NULL. [eFrameworkunifiedStatusInvldParam]
633 ///       - Information corresponding to the service name(pServiceName) specified in the argument is not registered in
634 ///       Dispatcher. [eFrameworkunifiedStatusFail]
635 ///       - Callback information(Event information) of the service name(pServiceName) specified in the argument is not
636 ///       registered. [eFrameworkunifiedStatusFail]
637 /// \~english @par Detail
638 ///       Cancel the entry of service information from Dispatcher, and cancel all callback \n
639 ///       information(event information) related to the service.
640 /// \~english @par
641 ///        Please note the following points when using this API for application.\n
642 ///       - Service registration available/API processing when an event is registered:delete service, delete event, return eFrameworkunifiedStatusOK
643 ///       - Service registration available/API processing when an event is registered:delete service, return eFrameworkunifiedStatusOK
644 ///       - Service registration available/API processing when an event is registered:delete event, return eFrameworkunifiedStatusOK
645 ///       - Service registration available/API processing when an event is registered:nothing, return eFrameworkunifiedStatusFail
646 /// \~english @par Classification
647 ///          Public
648 /// \~english @see  FrameworkunifiedAttachCallbacksToDispatcher,  FrameworkunifiedAttachCallbackToDispatcher,
649 ///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedAttachParentCallbacksToDispatcher
650 ////////////////////////////////////////////////////////////////////////////////////
651 EFrameworkunifiedStatus FrameworkunifiedDetachServiceFromDispatcher(HANDLE hApp, PCSTR pServiceName);
652
653 /////////////////////////////////////////////////////////////////////////////////////
654 /// \ingroup FrameworkunifiedSubscribeNotificationsWithCallback
655 /// \~english @par Brief
656 ///       API to send a message to the notification service in order to register multiple Notification of list format.
657 /// \~english @param [in] hApp
658 ///        HANDLE   - HANDLE for Application
659 /// \~english @param [in] pNtfyHandler
660 ///        FrameworkunifiedNotificationCallbackHandler   - Pointer to a structure of the Notification Handler
661 /// \~english @param [in] uiHandlerCount
662 ///        UI_32    - Notification Handler number
663 /// \~english @par
664 ///        FrameworkunifiedNotificationCallbackHandler Structure
665 /// \~english @code
666 ///                 #define MAX_STRING_SIZE_NOTIFICATION  64
667 ///                 typedef struct _FrameworkunifiedNotificationCallbackHandler
668 ///                 {
669 ///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name          */
670 ///                       CbFuncPtr callBack;                               /* Callback function pointer  */
671 ///                 }FrameworkunifiedNotificationCallbackHandler;
672 ///            @endcode
673 /// \~english @retval eFrameworkunifiedStatusOK Success
674 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
675 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
676 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
677 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
678 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
679 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
680 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
681 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
682 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
683 /// \~english @par Prerequisite
684 ///       - NS_NPPService of the process has been started.
685 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
686 ///       done.
687 /// \~english @par Change of internal state
688 ///       - Change of internal state according to the API does not occur.
689 /// \~english @par Conditions of processing failure
690 ///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
691 ///       [eFrameworkunifiedStatusInvldParam]
692 ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
693 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
694 ///       - HANDLE specified in the argument (hApp) is not appropriate(which is invalid). [eFrameworkunifiedStatusInvldParam]
695 ///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded the maximum number of
696 ///       Notification. [eFrameworkunifiedStatusFail]
697 ///       - The acquisition of the buffer for storing a plurality of information of Notification Handler specified by
698 ///       the argument has failed. [eFrameworkunifiedStatusInvldParam]
699 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
700 ///       [eFrameworkunifiedStatusFail]
701 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
702 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
703 ///       [eFrameworkunifiedStatusInvldParam]
704 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
705 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
706 ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
707 ///       [eFrameworkunifiedStatusInvldHndlType]
708 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
709 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
710 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
711 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
712 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
713 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
714 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
715 ///       [eFrameworkunifiedStatusErrOther]
716 /// \~english @par Detail
717 ///       The Callback information of multiple Notification upon receipt that is specified in the form of a list, \n
718 ///       set to the notification service (NS_NPPService). \n
719 ///       In addition, collectively set the Callback information at the time of multiple Notification received that \n
720 ///       have been specified in the list format to Dispatcher.\n
721 ///       When the notification service receives the public message of the Notification, it sends a NPS_NOTIFY_EV_REQ \n
722 ///       message to the client that has registered the Notification. The client having received the NPS_NOTIFY_EV_REQ
723 ///       \n
724 ///       message, based on the Callback information registered in the Dispatcher, call a Callback corresponding to the
725 ///       \n
726 ///       Notification.
727 /// \~english @par
728 ///        Please note the following points when using this API for application.\n
729 ///       - Operation is not guaranteed if the number of elemets of the array entity indicated by the address of the pointer (pNtfyHandler)
730 ///         to the Notification Handler structure does not match the number of arrays specified by the Notification Handler number (uiHandlerCount).
731 /// \~english @par Classification
732 ///          Public
733 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
734 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
735 ///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
736 ///                 FrameworkunifiedUnsubscribeNotificationsWithCallback
737 ////////////////////////////////////////////////////////////////////////////////////
738 EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationsWithCallback(HANDLE hApp,  const FrameworkunifiedNotificationCallbackHandler *pNtfyHandler,
739                                                  UI_32 uiHandlerCount);
740
741 ////////////////////////////////////////////////////////////////////////////////////////////
742 /// \ingroup FrameworkunifiedSubscribeNotificationWithCallback
743 /// \~english @par Brief
744 ///       API to set the Callback information at the time of Notification received Dispatcher.
745 /// \~english @param [in] hApp
746 ///         HANDLE - Application handle
747 /// \~english @param [in] pNotification
748 ///         PCSTR - Notification String.
749 /// \param [in] fpOnCmd
750 ///         CbFuncPtr - Callback function that will be called on receiving pNotification.
751 /// \~english @retval eFrameworkunifiedStatusOK Success
752 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
753 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
754 /// \~english @retval eFrameworkunifiedStatusDuplicate Duplication error of entry
755 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
756 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
757 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
758 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
759 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
760 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
761 /// \~english @par Prerequisite
762 ///       - NS_NPPService of the process has been started.
763 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
764 ///       done.
765 /// \~english @par Change of internal state
766 ///       - Change of internal state according to the API does not occur.
767 /// \~english @par Conditions of processing failure
768 ///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
769 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
770 ///       - CbFuncPtr specified in the argument (fpOnCmd) is NULL. [eFrameworkunifiedStatusInvldParam]
771 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
772 ///       - Can not add HANDLE specified in the argument (hApp) and CbFuncPtr specified in the argument (fpOnCmd) to
773 ///       notification list [eFrameworkunifiedStatusDuplicate]
774 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
775 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
776 ///       [eFrameworkunifiedStatusInvldParam]
777 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
778 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
779 ///       - Notification name specified by the argument has already been registered in the Dispatcher.
780 ///       [eFrameworkunifiedStatusDuplicate]
781 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
782 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
783 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
784 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
785 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
786 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
787 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
788 ///       [eFrameworkunifiedStatusErrOther]
789 /// \~english @par Detail
790 ///      The Callback information at the time of Notification received that has been specified by the argument, \n
791 ///      set in the notification service (NS_NPPService).\n
792 ///      Also, it sets the Callback information at the time of Notification received that has been specified by \n
793 ///      the argument to the Dispatcher.\n
794 ///       When the notification service receives the public message of the Notification, it sends a NPS_NOTIFY_EV_REQ \n
795 ///       message to the client that has registered the Notification. The client having received the NPS_NOTIFY_EV_REQ
796 ///       \n
797 ///       message, based on the Callback information registered in the Dispatcher, call a Callback corresponding to the
798 ///       \n
799 ///       Notification.
800 /// \~english @par Classification
801 ///          Public
802 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
803 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedUnsubscribeNotificationWithCallback,
804 ///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
805 ////////////////////////////////////////////////////////////////////////////////////////////
806 EFrameworkunifiedStatus FrameworkunifiedSubscribeNotificationWithCallback(HANDLE hApp, PCSTR pNotification, CbFuncPtr fpOnCmd);
807
808 /////////////////////////////////////////////////////////////////////////////////////
809 /// \ingroup FrameworkunifiedUnsubscribeNotificationsWithCallback
810 /// \~english @par Brief
811 ///       API to bulk delete the Callback information at the time of multiple Notification received from the Dispatcher.
812 /// \~english @param [in] hApp
813 ///        HANDLE   - HANDLE for Application
814 /// \~english @param [in] pNtfyHandler
815 ///        FrameworkunifiedNotificationCallbackHandler   - Pointer to a structure of the Notification Handler
816 /// \~english @param [in] uiHandlerCount
817 ///        UI_32    - Notification Handler number
818 /// \~english @par
819 ///        FrameworkunifiedNotificationCallbackHandler Structure
820 /// \~english @code
821 ///                 #define MAX_STRING_SIZE_NOTIFICATION  64
822 ///                 typedef struct _FrameworkunifiedNotificationCallbackHandler
823 ///                 {
824 ///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name          */
825 ///                       CbFuncPtr callBack;                               /* Callback function pointer  */
826 ///                 }FrameworkunifiedNotificationCallbackHandler;
827 ///            @endcode
828 /// \~english @retval eFrameworkunifiedStatusOK Success
829 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
830 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
831 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
832 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
833 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
834 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
835 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
836 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
837 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
838 /// \~english @par Prerequisite
839 ///       - NS_NPPService of the process has been started.
840 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
841 ///       done.
842 /// \~english @par Change of internal state
843 ///       - Change of internal state according to the API does not occur.
844 /// \~english @par Conditions of processing failure
845 ///       - Pointer (pNtfyHandler) is NULL to the structure of the Notification Handler specified in the argument.
846 ///       [eFrameworkunifiedStatusInvldParam]
847 ///       - Notification Handler number specified in the argument (uiHandlerCount) 0. [eFrameworkunifiedStatusInvldParam]
848 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
849 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
850 ///       - Notification Handler number specified in the argument (uiHandlerCount) has exceeded the maximum number of
851 ///       Notification. [eFrameworkunifiedStatusFail]
852 ///       - In Notification name in the structure of the Notification Handler specified in the argument, there is not
853 ///       applicable in those registered as Callback information. [eFrameworkunifiedStatusFail]
854 ///       - The acquisition of the buffer for storing a plurality of information of Notification Handler specified by
855 ///       the argument has failed. [eFrameworkunifiedStatusInvldParam]
856 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
857 ///       [eFrameworkunifiedStatusFail]
858 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
859 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
860 ///       [eFrameworkunifiedStatusInvldParam]
861 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
862 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
863 ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
864 ///       [eFrameworkunifiedStatusInvldHndlType]
865 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
866 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
867 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
868 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
869 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
870 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
871 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
872 ///       [eFrameworkunifiedStatusErrOther]
873 /// \~english @par Detail
874 ///       The Callback information of multiple Notification upon receipt that is specified in the form of a list, \n
875 ///       collectively removed from the notification service (NS_NPPService). \n
876 ///       In addition, the bulk delete the Callback information at the time of multiple Notification received that \n
877 ///       are specified in the form of a list from the Dispatcher.\n
878 ///       By bulk delete the Callback information, if the notification services receives the public message
879 ///       Notification, \n
880 ///       because the Notification information applicable also been deleted, Callback does not occur.
881 /// \~english @par Classification
882 ///          Public
883 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPRegisterNotifications,
884 /// FrameworkunifiedNPUnRegisterNotifications,
885 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
886 ///                 FrameworkunifiedSubscribeNotificationsWithCallback,
887 ///                 FrameworkunifiedUnsubscribeNotificationWithCallback
888 ////////////////////////////////////////////////////////////////////////////////////
889 EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationsWithCallback(HANDLE hApp, const FrameworkunifiedNotificationCallbackHandler *pNtfyHandler,
890                                                    UI_32 uiHandlerCount);
891
892
893 ////////////////////////////////////////////////////////////////////////////////////////////
894 /// \ingroup FrameworkunifiedUnsubscribeNotificationWithCallback
895 /// \~english @par Brief
896 ///       API to detach a notification callback from the dispatcher.
897 /// \~english @param [in] hApp
898 ///         HANDLE - Application handle
899 /// \~english @param [in] pNotification
900 ///         PCSTR - Notification String.
901 /// \~english @retval eFrameworkunifiedStatusOK Success
902 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
903 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
904 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
905 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
906 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
907 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
908 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
909 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
910 /// \~english @par Prerequisite
911 ///       - NS_NPPService of the process has been started.
912 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
913 ///       done.
914 /// \~english @par Change of internal state
915 ///       - Change of internal state according to the API does not occur.
916 /// \~english @par Conditions of processing failure
917 ///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
918 ///       - Length of pointer (pNotification) is 0 to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
919 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
920 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
921 ///       - Missing HANDLE specified in the argument (hApp) in notification list [eFrameworkunifiedStatusFail]
922 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
923 ///       [eFrameworkunifiedStatusFail]
924 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
925 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
926 ///       [eFrameworkunifiedStatusInvldParam]
927 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
928 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
929 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
930 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
931 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
932 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
933 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
934 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
935 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
936 ///       [eFrameworkunifiedStatusErrOther]
937 /// \~english @par Detail
938 ///      The Callback information at the time of Notification received that has been specified by the argument, \n
939 ///      to remove from the notification service (NS_NPPService).\n
940 ///      Also, delete the Callback information of Notification upon receipt, which is specified by the argument \n
941 ///      from the Dispatcher.
942 ///       By bulk delete the Callback information, if the notification services receives the public message
943 ///       Notification, \n
944 ///       because the Notification information applicable also been deleted, Callback does not occur.
945 /// \~english @par Classification
946 ///          Public
947 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPRegisterNotifications,
948 /// FrameworkunifiedNPUnRegisterNotifications,
949 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
950 ///                 FrameworkunifiedSubscribeNotificationsWithCallback,
951 ///                 FrameworkunifiedUnsubscribeNotificationsWithCallback
952 ////////////////////////////////////////////////////////////////////////////////////////////
953 EFrameworkunifiedStatus FrameworkunifiedUnsubscribeNotificationWithCallback(HANDLE hApp, PCSTR pNotification);
954
955
956
957 ////////////////////////////////////////////////////////////////////////////////////////////
958 /// \ingroup FrameworkunifiedGetAppName
959 /// \~english @par Brief
960 ///        Get the application thread name that is registered with the dispatcher.
961 /// \~english @param [in] hApp
962 ///        HANDLE   - Handle for Application
963 /// \~english @retval PCSTR Pointer to application thread name
964 /// \~english @retval NULL  NULL pointer (Failed to get application name)
965 /// \~english @par Prerequisite
966 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
967 ///       done.
968 /// \~english @par Change of internal state
969 ///       - Change of internal state according to the API does not occur.
970 /// \~english @par Conditions of processing failure
971 ///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
972 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
973 /// \~english @par Detail
974 ///        Get the application thread name that was registered at initialization of dispatcher.
975 /// \~english @par Classification
976 ///          Public
977 /// \~english @see FrameworkunifiedDispatcherWithArguments, FrameworkunifiedDispatcher, FrameworkunifiedCreateDispatcherWithoutLoop
978 ////////////////////////////////////////////////////////////////////////////////////////////
979 PCSTR FrameworkunifiedGetAppName(HANDLE hApp);
980
981
982
983 ////////////////////////////////////////////////////////////////////////////////////////////
984 /// \ingroup FrameworkunifiedSetThreadSpecificData
985 /// \~english @par Brief
986 ///        Set pointer to the application-specific data to the application HANDLE.
987 /// \~english @param [in] hApp
988 ///        HANDLE   - HANDLE for Application
989 /// \~english @param [in] data
990 ///        PVOID   - Pointer to the application-specific data
991 /// \~english @retval eFrameworkunifiedStatusOK Success
992 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
993 /// \~english @par Prerequisite
994 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
995 ///       done.
996 /// \~english @par Change of internal state
997 ///       - Change of internal state according to the API does not occur.
998 /// \~english @par Conditions of processing failure
999 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
1000 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
1001 /// \~english @par Detail
1002 ///        This API sets application-specific data to internal pointer inside application framwork HANDLE.\n
1003 ///        You can share data in callback function or thread.
1004 /// \~english @par Classification
1005 ///          Public
1006 /// \~english @see FrameworkunifiedGetThreadSpecificData
1007 ////////////////////////////////////////////////////////////////////////////////////////////
1008 EFrameworkunifiedStatus FrameworkunifiedSetThreadSpecificData(HANDLE hApp, PVOID data);
1009
1010
1011
1012 ////////////////////////////////////////////////////////////////////////////////////////////
1013 /// \ingroup FrameworkunifiedGetThreadSpecificData
1014 /// \~english @par Brief
1015 ///        Get pointer to the application-specific data from the application HANDLE.
1016 /// \~english @param [in] hApp
1017 ///        HANDLE   - HANDLE for Application
1018 /// \~english @retval PVOID pointer to application-specific data.
1019 /// \~english @retval NULL NULL pointer(failed to get data)
1020 /// \~english @par Prerequisite
1021 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1022 ///       done.
1023 /// \~english @par Change of internal state
1024 ///       - Change of internal state according to the API does not occur.
1025 /// \~english @par Conditions of processing failure
1026 ///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
1027 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
1028 /// \~english @par Detail
1029 ///        This API gets application-specific data that set with FrameworkunifiedSetThreadSpecificData from internal pointer inside
1030 ///        application framwork HANDLE.\n
1031 ///        You can share data in callback function or thread.
1032 /// \~english @par Classification
1033 ///          Public
1034 /// \~english @see FrameworkunifiedSetThreadSpecificData
1035 ////////////////////////////////////////////////////////////////////////////////////////////
1036 PVOID FrameworkunifiedGetThreadSpecificData(HANDLE hApp);
1037
1038
1039
1040 ////////////////////////////////////////////////////////////////////////////////////////////
1041 /// \ingroup FrameworkunifiedOpenService
1042 /// \~english @par Brief
1043 ///        API to acquire a service HANDLE.
1044 /// \~english @param [in] hApp
1045 ///        HANDLE   - HANDLE for Application
1046 /// \~english @param [in] pServiceName
1047 ///        PCSTR   - Pointer to service name
1048 /// \~english @retval HANDLE Handle to the service
1049 /// \~english @retval NULL NULL pointer (Failed to get service handle)
1050 /// \~english @par Prerequisite
1051 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1052 ///       done.
1053 ///       - Only when will open the session by FrameworkunifiedOpenSession, you can use the handle obtained by this API.
1054 /// \~english @par Change of internal state
1055 ///       - Change of internal state according to the API does not occur.
1056 /// \~english @par Conditions of processing failure
1057 ///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
1058 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
1059 ///       - Service name specified in the argument (pServiceName) is NULL. [NULL]
1060 ///       - Service name specified in the argument (pServiceName) is not appropriate (NULL, over 20byte). [NULL]
1061 ///       - Normalized service name for message queue is not appropriate (over 15byte). [NULL]
1062 ///       - Can not be acquired memory for message queue infomation(malloc). [NULL]
1063 ///       - Can not be acquired memory for message queue name(malloc). [NULL]
1064 ///       - Failed to open message queue(mq_open). [NULL]
1065 /// \~english @par Detail
1066 ///        Create a communication resource for communicating with the specified service , return the HANDLE.
1067 /// \~english @par Classification
1068 ///          Public
1069 /// \~english @see FrameworkunifiedCloseService, FrameworkunifiedOpenSession
1070 ////////////////////////////////////////////////////////////////////////////////////////////
1071 HANDLE FrameworkunifiedOpenService(HANDLE hApp, PCSTR pServiceName);
1072
1073
1074
1075 ////////////////////////////////////////////////////////////////////////////////////////////
1076 /// \ingroup FrameworkunifiedCloseService
1077 /// \~english @par Brief
1078 ///        API to close service HANDLE.
1079 /// \~english @param [in] hApp
1080 ///        HANDLE   - Handle for Application
1081 /// \~english @param [in] hService
1082 ///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
1083 /// \~english @retval eFrameworkunifiedStatusOK Success
1084 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1085 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
1086 /// \~english @par Prerequisite
1087 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1088 ///       done.
1089 /// \~english @par Change of internal state
1090 ///       - Change of internal state according to the API does not occur.
1091 /// \~english @par Conditions of processing failure
1092 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
1093 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
1094 ///       - HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
1095 ///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldHandle]
1096 ///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
1097 ///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
1098 ///       [eFrameworkunifiedStatusInvldHandle]
1099 ///       - Message queue type of HANDLE specified in the argument (hService) is mismatch.(eQTypeSender or
1100 ///       eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
1101 ///       - Failed to close message queue specified in the argument (hService). [eFrameworkunifiedStatusInvldHandle]
1102 /// \~english @par Detail
1103 ///       This API closes service HANDLE specified by argument.\n
1104 ///       And close message queue of the service.
1105 /// \~english @par Classification
1106 ///          Public
1107 /// \~english @see FrameworkunifiedOpenService
1108 ////////////////////////////////////////////////////////////////////////////////////////////
1109 EFrameworkunifiedStatus FrameworkunifiedCloseService(HANDLE hApp, HANDLE hService);
1110
1111 //////////////////////////////////////////////////
1112 // message center functions
1113 //////////////////////////////////////////////////
1114
1115 ////////////////////////////////////////////////////////////////////////////////////////////
1116 /// \ingroup FrameworkunifiedMcOpenSender
1117 /// \~english @par Brief
1118 ///        Generate a handle to the message queue for sending.
1119 /// \~english @param [in] hApp
1120 ///        HANDLE   - Handle for Application
1121 /// \~english @param [in] pName
1122 ///        PCSTR   - Message queue name of destination service
1123 /// \~english @retval eFrameworkunifiedStatusOK Success
1124 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1125 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
1126 /// \~english @par Prerequisite
1127 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1128 ///       done.
1129 /// \~english @par Change of internal state
1130 ///       - Change of internal state according to the API does not occur.
1131 /// \~english @par Conditions of processing failure
1132 ///       - HANDLE specified in the argument (hApp) is NULL. [NULL]
1133 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [NULL]
1134 ///       - Message queue name specified in the argument (pName) is NULL. [NULL]
1135 ///       - Message queue name specified in the argument (pName) is not appropriate (NULL, over 20byte). [NULL]
1136 ///       - Normalized message queue name is not appropriate (over 15byte). [NULL]
1137 ///       - Can not be acquired memory for message queue infomation(malloc). [NULL]
1138 ///       - Can not be acquired memory for message queue name(malloc). [NULL]
1139 ///       - Failed to open message queue(mq_open). [NULL]
1140 /// \~english @par Detail
1141 ///       This API generates and returns a handle to the message queue for sending of service.
1142 /// \~english @par Classification
1143 ///          Public
1144 /// \~english @see FrameworkunifiedMcClose
1145 ////////////////////////////////////////////////////////////////////////////////////////////
1146 HANDLE FrameworkunifiedMcOpenSender(HANDLE hApp, PCSTR pName);
1147
1148 ////////////////////////////////////////////////////////////////////////////////////////////
1149 /// \ingroup FrameworkunifiedMcClose
1150 /// \~english @par Brief
1151 ///        API for closing a message queue handle
1152 /// \~english @param [in] hService
1153 ///        HANDLE   - Handle for services (handle obtained by FrameworkunifiedMcOpenSender)
1154 /// \~english @retval eFrameworkunifiedStatusOK success
1155 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1156 /// \~english @par Prerequisite
1157 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1158 /// \~english @par Change of internal state
1159 ///       - The internal state is not changed.
1160 /// \~english @par Conditions of processing failure
1161 ///       - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
1162 ///       - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
1163 ///       - When the message queue handle in the handle (hService) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
1164 ///       - When the message queue handle specified in the argument (hService) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
1165 ///       - If the message queue types of the handles (hService) specified in the arguments do not match, [eFrameworkunifiedStatusInvldHandle]
1166 ///       - Closing the message queue for the handle (hService) specified in the arguments fails, [eFrameworkunifiedStatusInvldHandle]
1167 /// \~english @par Detail
1168 ///        Closes the message queue for the specified service.
1169 /// \~english @par Classification
1170 ///          Public
1171 /// \~english @par Type
1172 ///          Sync
1173 /// \~english @see FrameworkunifiedMcOpenSender
1174 ///
1175 /// To close message queue handle to a service
1176 ///
1177 /// \param [in] hService
1178 ///         HANDLE - Handle to a service
1179 ///
1180 /// \return status
1181 ///         EFrameworkunifiedStatus - success or error
1182 ///
1183 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
1184 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1185 ////////////////////////////////////////////////////////////////////////////////////////////
1186 EFrameworkunifiedStatus FrameworkunifiedMcClose(HANDLE hService);
1187
1188 ////////////////////////////////////////////////////////////////////////////////////////////
1189 /// \ingroup FrameworkunifiedSendMsg
1190 /// \~english @par Brief
1191 ///        Asynchronous API that sends messages to the service
1192 /// \~english @param [in] hService
1193 ///        HANDLE   - Handle for services (handle acquired by FrameworkunifiedMcOpenSender, etc.)
1194 /// \~english @param [in] uiCmd
1195 ///        UI_32   - Command ID, Request ID, and Authorization ID on the service's protocol
1196 /// \~english @param [in] uiLength
1197 ///        UI_32   - Data size to be sent (0 to 4294967255)
1198 /// \~english @param [in] pData
1199 ///        PCVOID   - Pointer to the data to send
1200 /// \~english @retval eFrameworkunifiedStatusOK success
1201 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
1202 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1203 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
1204 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
1205 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
1206 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
1207 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
1208 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
1209 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
1210 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
1211 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
1212 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
1213 /// \~english @par Prerequisite
1214 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1215 ///       - Handles for services must be acquired (FrameworkunifiedMcOpenSender, etc.).
1216 /// \~english @par Change of internal state
1217 ///       - The internal state is not changed.
1218 /// \~english @par Conditions of processing failure
1219 ///       - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusNullPointer]
1220 ///       - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
1221 ///       - When the message queue name of the handle (hService) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
1222 ///       - When the name of the message queue of the handle (hService) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
1223 ///       - When the message queue handle in the handle (hService) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
1224 ///       - When the message queue handle specified in the argument (hService) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
1225 ///       - When the send data (pData) specified in the parameter is NULL and the data length (uiLength) is not 0, [eFrameworkunifiedStatusInvldBuf]
1226 ///       - When the name of the message queue handle in the handle (hService) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldQName]
1227 ///       - If the name of the message queue handle (hService) specified in the argument exceeds 20 bytes, [eFrameworkunifiedStatusInvldQName]
1228 ///       - When the message queue type of the handle (hService) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
1229 ///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
1230 ///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
1231 ///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
1232 ///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
1233 ///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
1234 ///       - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
1235 ///       - When the size (uiLength) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
1236 /// \~english @par Detail
1237 ///       Messages are sent to the service using the message queue associated with the service handle.\n
1238 ///       A destination is a service specified as arguments such as FrameworkunifiedMcOpenSender when a service handle was created.\n
1239 ///       This API operates asynchronously.
1240 /// \~english @par
1241 ///       - The consistency between the size of the data to be sent and the size of the area indicated by the pointer to the data to be sent is ensure by the caller.
1242 ///       - The maximum data size (uiLength) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
1243 ///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
1244 ///         Message header section\n
1245 /// \~english @par Classification
1246 ///          Public
1247 /// \~english @par Type
1248 ///          Method
1249 /// \~english @see FrameworkunifiedMcOpenSender, FrameworkunifiedOpenService
1250 ///
1251 /// Send message to the service.
1252 ///
1253 /// \param [in] hService
1254 ///         HANDLE - Handle to the service.
1255 /// \param [in] uiCmd
1256 ///         UI_32 - Protocol message id.
1257 /// \param [in] uiLength
1258 ///         UI_32 - Length of the data to be send.
1259 /// \param [in] pData
1260 ///         PVOID - Pointer to the data.
1261 ///
1262 /// \return status
1263 ///         EFrameworkunifiedStatus - success or error
1264 ///
1265 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
1266 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1267 ////////////////////////////////////////////////////////////////////////////////////////////
1268 EFrameworkunifiedStatus FrameworkunifiedSendMsg(HANDLE hService, UI_32 uiCmd, UI_32 uiLength, PCVOID pData);
1269
1270
1271 ////////////////////////////////////////////////////////////////////////////////////////////
1272 /// FrameworkunifiedSendPriorityMsg
1273 /// Send message to a service. It places your message at the top of the services message queue.
1274 /// \b Applications should not use this unless absolutely required - use cases must be reviewed by
1275 /// \b Framework Team.
1276 ///
1277 /// \param [in] hService
1278 ///         HANDLE - Handle to the service.
1279 /// \param [in] uiCmd
1280 ///         UI_32 - Protocol message id.
1281 /// \param [in] uiLength
1282 ///         UI_32 - Length of the data to be send.
1283 /// \param [in] pData
1284 ///         PVOID - Pointer to the data.
1285 ///
1286 /// \return status
1287 ///         EFrameworkunifiedStatus - success or error
1288 ///
1289 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
1290 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1291 ///
1292 ////////////////////////////////////////////////////////////////////////////////////////////
1293 EFrameworkunifiedStatus FrameworkunifiedSendPriorityMsg(HANDLE hService, UI_32 uiCmd, UI_32 uiLength, PCVOID pData);
1294
1295 ////////////////////////////////////////////////////////////////////////////////////////////
1296 /// \ingroup FrameworkunifiedSendSelf
1297 /// \~english @par Brief
1298 ///        Asynchronous APIs that send messages to the application's own Dispatcher
1299 /// \~english @param [in] hApp
1300 ///        HANDLE   - Handle for the application
1301 /// \~english @param [in] iCmd
1302 ///        UI_32   - Command ID, Request ID, and Authorization ID on the service's protocol
1303 /// \~english @param [in] length
1304 ///        UI_32   - Data size to be sent (0 to 4294967255)
1305 /// \~english @param [in] data
1306 ///        PCVOID   - Pointer to the data to send
1307 /// \~english @retval eFrameworkunifiedStatusOK success
1308 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
1309 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1310 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
1311 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
1312 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
1313 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
1314 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
1315 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
1316 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
1317 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
1318 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
1319 /// \~english @par Prerequisite
1320 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1321 /// \~english @par Change of internal state
1322 ///       - The internal state is not changed.
1323 /// \~english @par Conditions of processing failure
1324 ///       - If the hService specified in the arguments is NULL, [eFrameworkunifiedStatusNullPointer]
1325 ///       - If the hService specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
1326 ///       - When the message queue handle for the own Dispatcher in the handle (hService) specified by the arguments is NULL [eFrameworkunifiedStatusInvldHandle]
1327 ///       - Invalid message queue handle for its own Dispatcher in the handle (hService) specified by the arguments [eFrameworkunifiedStatusInvldHandle]
1328 ///       - When the send data (data) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldBuf]
1329 ///       - When the service name of the handle (hService) specified in the arguments is not appropriate (when the service name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldQName]
1330 ///       - When the name of the message queue handle for the own Dispatcher in the handle (hService) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
1331 ///       - Failed to access shared memory for sending messages for its own Dispatcher [eFrameworkunifiedStatusErrOther]
1332 ///       - When the message queue type for the own Dispatcher of the handle (hService) specified in the parameter is not the send type [eFrameworkunifiedStatusInvldHndlType]
1333 ///       - If the message queue for your Dispatcher is full [eFrameworkunifiedStatusMsgQFull]
1334 ///       - Incorrect file descriptor for sending messages for own Dispatcher [eFrameworkunifiedStatusErrNoEBADF]
1335 ///       - When an interrupt by a system call (signal) occurs while sending messages for the Dispatcher itself [eFrameworkunifiedStatusErrNoEINTR]
1336 ///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
1337 ///       - If there are any errors sending messages for your Dispatcher [eFrameworkunifiedStatusFail]
1338 ///       - When the size (length) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
1339 /// \~english @par Detail
1340 ///       Send messages to the application's own Dispatcher.\n
1341 ///       This API operates asynchronously.
1342 /// \~english @par
1343 ///        Please note the following points when using this API for application.\n
1344 ///       - The maximum data size (length) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
1345 ///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
1346 ///         Message header section\n
1347 ///       - Operation cannot be guaranteed when the size of the allocated area indicated by the address of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
1348 /// \~english @par Classification
1349 ///          Public
1350 /// \~english @par Type
1351 ///          Method
1352 /// \~english @see FrameworkunifiedSendMsg
1353 ///
1354 /// Send message to the hApp.
1355 ///
1356 /// \param [in] hApp
1357 ///         HANDLE - Handle to the dispatcher to receive message
1358 /// \param [in] iCmd
1359 ///         UI_32 - Protocol message id.
1360 /// \param [in] length
1361 ///         UI_32 - Length of the data to be send.
1362 /// \param [in] data
1363 ///         PVOID - Pointer to the data.
1364 ///
1365 /// \return status
1366 ///         EFrameworkunifiedStatus - success or error
1367 ///
1368 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
1369 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1370 ////////////////////////////////////////////////////////////////////////////////////////////
1371 EFrameworkunifiedStatus FrameworkunifiedSendSelf(HANDLE hApp, UI_32 iCmd, UI_32 length, PCVOID data);
1372
1373 ////////////////////////////////////////////////////////////////////////////////////////////
1374 /// \ingroup FrameworkunifiedInvokeSync
1375 /// \~english @par Brief
1376 ///        API for synchronous communication of the message.
1377 /// \~english @param [in] hService
1378 ///        HANDLE   - Handle for the message queue
1379 /// \~english @param [in] iCmd
1380 ///        UI_32   -  Command ID
1381 /// \~english @param [in] msgLenght
1382 ///        UI_32   -  Data length of the send message
1383 /// \~english @param [in] msgData
1384 ///        PCVOID   - Pointer to send the message
1385 /// \~english @param [in] responseLength
1386 ///        UI_32   -  Size of the received message storage buffer
1387 /// \~english @param [out] responseData
1388 ///        PVOID   -  Pointer to the received message storage buffer
1389 /// \~english @param [out] receivedLength
1390 ///        UI_32 * -  Data length of the received message
1391 /// \~english @retval eFrameworkunifiedStatusOK Success
1392 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
1393 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1394 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
1395 /// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
1396 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
1397 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
1398 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
1399 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
1400 /// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
1401 /// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
1402 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
1403 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
1404 /// \~english @par Prerequisite
1405 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1406 ///       done.
1407 ///       - Handles for message queue must be acquired (FrameworkunifiedMcOpenSender, etc.).
1408 /// \~english @par Change of internal state
1409 ///       - Change of internal state according to the API does not occur.
1410 /// \~english @par Conditions of processing failure
1411 ///       - HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
1412 ///       - HANDLE(hService) specified in the argument is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
1413 ///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
1414 ///       - Send message queue HANDLE in HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
1415 ///       - Send message queue HANDLE in HANDLE(hService) specified in the argument is not appropriate (which is
1416 ///       invalid). [eFrameworkunifiedStatusInvldHandle]
1417 ///       - Message queue HANDLE for the response received is NULL. [eFrameworkunifiedStatusInvldHandle]
1418 ///       - Message queue HANDLE for the response received is not appropriate (which is invalid).
1419 ///       [eFrameworkunifiedStatusInvldHandle]
1420 ///       - The size of the received message storage buffer specified by the argument is not 0, and the pointer is NULL
1421 ///       to the received message storage buffer. [eFrameworkunifiedStatusInvldHandle]
1422 ///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
1423 ///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
1424 ///       - Message queue name of HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldQName]
1425 ///       - Message queue name of HANDLE(hService) specified in the argument exceeds 20byte. [eFrameworkunifiedStatusInvldQName]
1426 ///       - Message queue HANDLE name in the HANDLE(hService) specified in the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
1427 ///       - Message queue HANDLE name in the HANDLE(hService) specified in the argument exceeds 20byte.
1428 ///       [eFrameworkunifiedStatusInvldHandle]
1429 ///       - Message queue type of HANDLE(hService) specified in the argument is not a transmission type.
1430 ///       [eFrameworkunifiedStatusInvldHndlType]
1431 ///       - To the session message queue is full. [eFrameworkunifiedStatusMsgQFull]
1432 ///       - It is invalid transmit and receive file descriptor of the session message. [eFrameworkunifiedStatusErrNoEBADF]
1433 ///       - Interruption by the system call (signal) occurs during the transmission and reception of the session
1434 ///       message. [eFrameworkunifiedStatusErrNoEINTR]
1435 ///       - Size of the transmit buffer of the message for the session to the service is illegal.
1436 ///       [eFrameworkunifiedStatusInvldBufSize]
1437 ///       - Any errors occur during the sending and receiving of a session message. [eFrameworkunifiedStatusFail]
1438 ///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
1439 ///       - It failed to Socket connection of the response message for the reception. [eFrameworkunifiedStatusFail]
1440 ///       - The wait control of the response message received failed. [eFrameworkunifiedStatusFail]
1441 ///       - Interruption by the system call (signal) to wait in the response message received has occurred.
1442 ///       [eFrameworkunifiedStatusFail]
1443 ///       - In response message at the time of failure to receive, it failed to re-connection of the Socket.
1444 ///       [eFrameworkunifiedStatusBadConnection]
1445 /// \~english @par Detail
1446 ///       Under the following procedure, perform synchronous communication of the message.
1447 ///        - During the first call, it generates a message queue name for the response message received by the
1448 ///        McCreateInvokerName(),
1449 ///          and to open the message queue for the response message received by the McOpenSyncReceiver ().
1450 ///        - By the McInvokeSync(), perform synchronous communication of the message.
1451 /// \~english @par
1452 ///       If the received response message is greater than the storage buffer, to store up to store buffer length.\n
1453 ///       The user is able to detect an abnormality by comparing store buffer length and a received message length.
1454 /// \~english @par Classification
1455 ///          Public
1456 /// \~english @see FrameworkunifiedSendMsg
1457 ////////////////////////////////////////////////////////////////////////////////////////////
1458 EFrameworkunifiedStatus FrameworkunifiedInvokeSync(HANDLE hService, UI_32 iCmd, UI_32 msgLenght, PCVOID msgData, UI_32 responseLength,
1459                          PVOID responseData, UI_32 *receivedLength);
1460
1461 ////////////////////////////////////////////////////////////////////////////////////////////
1462 /// \ingroup FrameworkunifiedSetSyncResponseData
1463 /// \~english @par Brief
1464 ///        API to set the response data of the synchronization communication.
1465 /// \~english @param [in] hApp
1466 ///        HANDLE   - Handle for Application
1467 /// \~english @param [in] data
1468 ///        PVOID   - Pointer to the response data
1469 /// \~english @param [in] size
1470 ///        UI_32   - The response data size
1471 /// \~english @retval eFrameworkunifiedStatusOK Success
1472 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
1473 /// \~english @par Prerequisite
1474 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1475 ///       done.
1476 /// \~english @par Change of internal state
1477 ///       - Change of internal state according to the API does not occur.
1478 /// \~english @par Conditions of processing failure
1479 ///       - HANDLE(hApp) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
1480 ///       - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
1481 ///       - Pointer to the response data(data) specified in the argument is NULL. [eFrameworkunifiedStatusNullPointer]
1482 ///       - If the size (size) of the response data specified in the arguments cannot be allocated, [eFrameworkunifiedStatusFail]
1483 ///       - When the response data size (size) specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
1484 /// \~english @par Detail
1485 ///       Store the response data specified in the storage area of the response data \n
1486 ///       in the handle specified by the argument.
1487 /// \~english @par
1488 ///        Response data set by this PROCESS is automatically sent by the Dispatcher after the callback function completes execution, so the API does not need to send the response data.
1489 /// \~english @par
1490 ///       - The response data is registered to the heap.
1491 ///       - If the pointer (data) to the response data is normal (not NULL) and 0 is specified for the size (size) of the response data, the response data is set to empty.
1492 ///       - The maximum size (size) of the response data described above is a theoretical value. The maximum size that can be used is environment-dependent.\n
1493 ///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
1494 ///         Message header section and response message header section\n
1495 /// \~english @par Classification
1496 ///          Public
1497 /// \~english @see FrameworkunifiedInvokeSync
1498 ////////////////////////////////////////////////////////////////////////////////////////////
1499 EFrameworkunifiedStatus FrameworkunifiedSetSyncResponseData(HANDLE hApp, PVOID data, UI_32 size);
1500
1501 ////////////////////////////////////////////////////////////////////////////////////////////
1502 /// \ingroup FrameworkunifiedGetMsgLength
1503 /// \~english @par Brief
1504 ///        API to retrieve the data length of the received message.
1505 /// \~english @param [in] hApp
1506 ///        HANDLE   - Handle for Application
1507 /// \~english @retval UI_32 The data length of the received message
1508 /// \~english @retval 0     Error or No data
1509 /// \~english @par Prerequisite
1510 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1511 ///       done.
1512 /// \~english @par Change of internal state
1513 ///       - Change of internal state according to the API does not occur.
1514 /// \~english @par Conditions of processing failure
1515 ///       - HANDLE(hApp) specified in the argument is NULL. [0]
1516 ///       - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [0]
1517 /// \~english @par Detail
1518 ///       To return the data length of the received messages in the handle(hApp) \n
1519 ///       that you specified in the argument  as a return value.  \n
1520 ///       It is possible to get by to use when the message was received. \n
1521 ///       If the return value is 0, there is a need for caution because of either \n
1522 ///       error or no data.
1523 /// \~english @par Classification
1524 ///        Public
1525 /// \~english @par Type
1526 ///        Sync
1527 /// \~english @see None
1528 ////////////////////////////////////////////////////////////////////////////////////////////
1529 UI_32 FrameworkunifiedGetMsgLength(HANDLE hApp);
1530
1531 ////////////////////////////////////////////////////////////////////////////////////////////
1532 /// \ingroup FrameworkunifiedGetMsgProtocol
1533 /// \~english @par Brief
1534 ///        API to get the Command ID/Request ID/Approval ID on the protocol.
1535 /// \~english @param [in] hApp
1536 ///        HANDLE   - Handle for Application
1537 /// \~english @retval UI_32 Command ID/Request ID/Approval ID
1538 /// \~english @retval 0     Error
1539 /// \~english @par Prerequisite
1540 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1541 ///       done.
1542 /// \~english @par Change of internal state
1543 ///       - Change of internal state according to the API does not occur.
1544 /// \~english @par Conditions of processing failure
1545 ///       - HANDLE(hApp) specified in the argument is NULL. [0]
1546 ///       - HANDLE(hApp) specified in the argument is not appropriate (which is invalid). [0]
1547 /// \~english @par Detail
1548 ///       To return the Command ID/Request ID/Approval ID that are within  \n
1549 ///       the handle(hApp) specified in the argument as a return value.
1550 /// \~english @par
1551 ///        The application shall execute this API using an application handle passed as an argument to the callback function.
1552 ///        (Messages are received within the framework, stored in the application handles (hApp),
1553 ///        and then executed by the application callback functions.)
1554 /// \~english @par Classification
1555 ///        Public
1556 /// \~english @par Type
1557 ///        Sync
1558 /// \~english @see None
1559 ////////////////////////////////////////////////////////////////////////////////////////////
1560 UI_32 FrameworkunifiedGetMsgProtocol(HANDLE hApp);
1561
1562 ////////////////////////////////////////////////////////////////////////////////////////////
1563 /// \ingroup FrameworkunifiedGetMsgDataOfSize
1564 /// \~english @par Brief
1565 ///        API to get the data of the received message
1566 /// \~english @param [in] hApp
1567 ///        HANDLE   - Handle for the application
1568 /// \~english @param [out] pData
1569 ///        PVOID   - Pointer to the buffer where the received message data will be copied
1570 /// \~english @param [in] uiSize
1571 ///        UI_32   - Size of the buffer to which received message data is copied
1572 /// \~english @param [in] eRetrieveMethod
1573 ///        ESMRetrieveTypes  - Shared memory-acquisition-type (optional; eSMRRelease if not specified)
1574 /// \~english @par
1575 ///       enum ESMRetrieveTypes variables
1576 ///       - eSMRRelease = 0 : The shared memory data is deleted after acquisition.
1577 ///       - eSMRRetain = 1 : Shared memory data is maintained.
1578 /// \~english @retval eFrameworkunifiedStatusOK success
1579 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
1580 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
1581 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
1582 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
1583 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors
1584 /// \~english @par Prerequisite
1585 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1586 /// \~english @par Change of internal state
1587 ///       - The internal state is not changed.
1588 /// \~english @par Conditions of processing failure
1589 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
1590 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
1591 ///       - When the data size is larger than the buffer size (uiSize) specified by the parameter, [eFrameworkunifiedStatusInvldBufSize]
1592 ///       - If the buffer (pData) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldBuf]
1593 ///       - Incoming messages are incorrect [eFrameworkunifiedStatusInvldHndlType]
1594 ///       - If the shared memory ID specified in the received message is invalid [FrameworkunifiedStatusErrOther]
1595 ///       - If accessing shared memory (shm_open/fstat/mmap) fails [eFrameworkunifiedStatusErrOther]
1596 ///       - If the size of the data in shared memory is larger than the buffer size (uiSize) specified by the arguments [FrameworkunifiedStatusErrOther]
1597 /// \~english @par Detail
1598 ///        Receive message data is acquired from the receive buffer in the application handle (hApp) or the shared memory (message is stored in the shared memory when the size is 4096 bytes or more), and is stored in the area passed in the parameter pData.\n
1599 ///        When data exists in the shared memory, the data is held or deleted in the shared memory by specifying the eRetrieveMethod of arguments of this API
1600 /// \~english @par
1601 ///        Please note the following points when using this API for application.\n
1602 ///        - Execute this API using an application handle passed as an argument of a callback function.
1603 ///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
1604 ///        - Before executing this API, the size of the received message must be checked by the FrameworkunifiedGetMsgLength to determine whether data is to be retained in the shared memory.
1605 ///        - If it is kept in shared memory, the application must execute the FrameworkunifiedClearMsgData and delete it.
1606 ///        - If an invalid value other than the ESMRetrieveTypes defined value is specified for the shared memory allocation type (eRetrieveMethod), the shared memory allocation type behaves as if eSMRRetain were specified.
1607 /// \~english @par Classification
1608 ///          Public
1609 /// \~english @par Type
1610 ///        Sync
1611 /// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedClearMsgData
1612 ///
1613 /// \param [in] hApp
1614 ///         HANDLE - Application framework handle
1615 /// \param [out] pData
1616 ///         PVOID - Buffer to which the received message data will be copied.
1617 /// \param [out] uiSize
1618 ///         UI_32 - Size of the buffer to which the received message data will be copied.
1619 /// \param [in] eRetrieveMethod
1620 ///         ESMRetrieveTypes -
1621 ///
1622 /// \return status
1623 ///         EFrameworkunifiedStatus - success or error
1624 ///
1625 /// \~english @par Type
1626 ///        Sync
1627 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc,
1628 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1629 ////////////////////////////////////////////////////////////////////////////////////////////
1630 EFrameworkunifiedStatus FrameworkunifiedGetMsgDataOfSize(HANDLE hApp, PVOID pData, UI_32 uiSize, ESMRetrieveTypes eRetrieveMethod = eSMRRelease);
1631
1632 ////////////////////////////////////////////////////////////////////////////////////////////
1633 /// \ingroup FrameworkunifiedGetDataPointer
1634 /// \~english @par Brief
1635 ///        API to get start address of data from received message
1636 /// \~english @param [in] hApp
1637 ///        HANDLE   - Handle for the application
1638 /// \~english @param [out] datap
1639 ///        void**   - Pointer to the data of the received message
1640 /// \~english @retval eFrameworkunifiedStatusOK success
1641 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1642 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
1643 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
1644 /// \~english @par Prerequisite
1645 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1646 /// \~english @par Change of internal state
1647 ///       - The internal state is not changed.
1648 /// \~english @par Conditions of processing failure
1649 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
1650 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
1651 ///       - When the receive buffer address of the handle (hApp) specified in the parameter is NULL [eFrameworkunifiedStatusInvldBufSize]
1652 ///       - When the pointer (datap) to the data of the received message specified by the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
1653 /// \~english @par Detail
1654 ///        This function gets the received message data from the receive buffer in the application handle (hApp)
1655 ///        and returns the start address of the received message in the argument datap.\n
1656 /// \~english @par
1657 ///        Please note the following points when using this API for application.\n
1658 ///        - This API can be executed for messages that do not use shared memory (messages with a message size less than 4096 bytes).
1659 ///          Check the size of received messages in the FrameworkunifiedGetMsgLength prior to executing this API.
1660 ///        - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
1661 ///        - Execute this API using an application handle passed as an argument of a callback function.
1662 ///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
1663 /// \~english @par Classification
1664 ///          Public
1665 /// \~english @par Type
1666 ///        Sync
1667 /// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize
1668 ///
1669 /// \param [in] hApp
1670 ///         HANDLE - Application framework handle
1671 /// \param [out] datap
1672 ///         void ** - Pointer to which the receive message data.
1673 ///
1674 /// \return status
1675 ///         EFrameworkunifiedStatus - success or error
1676 /// \~english @par Type
1677 ///        Sync
1678 ///
1679 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
1680 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1681 ////////////////////////////////////////////////////////////////////////////////////////////
1682 EFrameworkunifiedStatus FrameworkunifiedGetDataPointer(HANDLE hApp, void **datap);
1683
1684 ////////////////////////////////////////////////////////////////////////////////////////////
1685 /// \ingroup FrameworkunifiedGetMsgSrc
1686 /// \~english @par Brief
1687 ///        API to get the application name of the sender of the received message
1688 /// \~english @param [in] hApp
1689 ///        HANDLE   - Handle for the application
1690 /// \~english @retval PCSTR Name of the application from which the message was sent
1691 /// \~english @retval NULL NULL pointer (Acquisition failure)
1692 /// \~english @par Prerequisite
1693 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1694 /// \~english @par Change of internal state
1695 ///       - The internal state is not changed.
1696 /// \~english @par Conditions of processing failure
1697 ///       - If the hApp specified in the parameter is NULL, [NULL]
1698 ///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
1699 /// \~english @par Detail
1700 ///        This API returns the application name of the sender of the received message.\n
1701 ///        The application name acquired by this API is used for establishing sessions, creating message queues for responses,
1702 ///        and registering/releasing callbacks to the Dispatcher.
1703 /// \~english @par
1704 ///        Please note the following points when using this API for application.\n
1705 ///        - Execute this API using an application handle passed as an argument of a callback function.
1706 ///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
1707 ///        - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
1708 /// \~english @par Classification
1709 ///          Public
1710 /// \~english @par Type
1711 ///        Sync
1712 /// \~english @see FrameworkunifiedOpenService, FrameworkunifiedCreateSession, FrameworkunifiedMcOpenSender, \n
1713 ///            FrameworkunifiedAttachCallbackToDispatcher, FrameworkunifiedAttachCallbacksToDispatcher, \n
1714 ///            FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher, FrameworkunifiedDetachServiceFromDispatcher
1715 ///
1716 /// Source of the message.
1717 ///
1718 /// \param [in] hApp
1719 ///         HANDLE - Application framework handle
1720 ///
1721 /// \return pSourceName
1722 ///         PCSTR - Source name of the message.
1723 /// \~english @par Type
1724 ///        Sync
1725 ///
1726 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
1727 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1728 ////////////////////////////////////////////////////////////////////////////////////////////
1729 PCSTR FrameworkunifiedGetMsgSrc(HANDLE hApp);
1730
1731 ////////////////////////////////////////////////////////////////////////////////////////////
1732 /// \ingroup FrameworkunifiedGetLastNotification
1733 /// \~english @par Brief
1734 ///        Get the most recent Notification names
1735 /// \~english @param [in] hApp
1736 ///        HANDLE   - Handle for the application
1737 /// \~english @retval PCSTR Pointers to Notification
1738 /// \~english @retval NULL NULL pointer (Acquisition failure)
1739 /// \~english @par Prerequisite
1740 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1741 /// \~english @par Change of internal state
1742 ///       - The internal state is not changed.
1743 /// \~english @par Conditions of processing failure
1744 ///       - If the hApp specified in the parameter is NULL, [NULL]
1745 ///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
1746 /// \~english @par Detail
1747 ///        This API acquires and returns the most recent Notification name from the received data.
1748 /// \~english @par
1749 ///        Please note the following points when using this API for application.\n
1750 ///        - Execute this API using an application handle passed as an argument of a callback function.
1751 ///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
1752 ///        - Since the pointers acquired by this API are part of the Dispatcher, the pointers acquired by this API must not be released by the application.
1753 /// \~english @par Classification
1754 ///          Public
1755 /// \~english @par Type
1756 ///        Sync
1757 /// \~english @see FrameworkunifiedNPPublishNotification
1758 ///
1759 /// Returns the last notification string that was received.
1760 ///
1761 /// \param [in] hApp
1762 ///         HANDLE - Application framework handle
1763 ///
1764 /// \return pSourceName
1765 ///         PCSTR - the last notification name that has been received.
1766 /// \~english @par Type
1767 ///        Sync
1768 ///
1769 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgDataOfSize,
1770 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1771 ////////////////////////////////////////////////////////////////////////////////////////////
1772 PCSTR FrameworkunifiedGetLastNotification(HANDLE hApp);
1773
1774 ////////////////////////////////////////////////////////////////////////////////////////////
1775 /// \ingroup FrameworkunifiedClearMsgData
1776 /// \~english @par Brief
1777 ///        API to delete shared memory used for sending and receiving messages
1778 /// \~english @param [in] hApp
1779 ///        HANDLE   - Handle for the application
1780 /// \~english @retval eFrameworkunifiedStatusOK Successful or Use Shared Memory Messages
1781 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
1782 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
1783 /// \~english @retval eFrameworkunifiedStatusInvldID Invalid ID
1784 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
1785 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
1786 /// \~english @par Prerequisite
1787 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1788 /// \~english @par Change of internal state
1789 ///       - The internal state is not changed.
1790 /// \~english @par Conditions of processing failure
1791 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
1792 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
1793 ///       - Framework generating failure [eFrameworkunifiedStatusInvldParam]
1794 ///       - If the shared memory ID specified in the message is invalid [eFrameworkunifiedStatusInvldParam]
1795 ///       - If an attempt is made to remove a non-existent shared memory, [eFrameworkunifiedStatusInvldID]
1796 ///       - If accessing shared memory (shm_unlink) fails, [eFrameworkunifiedStatusFail]
1797 ///       - When the receive buffer address of the handle (hApp) specified in the parameter is NULL [eFrameworkunifiedStatusInvldBuf]
1798 /// \~english @par Detail
1799 ///        This API deletes the shared memory used for sending and receiving messages.\n
1800 ///        When an application gets received messages by specifying eSMRRetain as FrameworkunifiedGetMsgDataOfSize, it deletes the shared memories by using this API...\n
1801 /// \~english @par
1802 ///        Please note the following points when using this API for application.\n
1803 ///        - The shared memory information to be deleted by this API shall be executed by the application on the message receiving side because it is obtained from the received message.\n
1804 ///        - Execute this API using an application handle passed as an argument of a callback function.
1805 ///          (Messages are received within the framework, stored in the application handles (hApp), and then executed by the application callback functions.)
1806 /// \~english @par Classification
1807 ///          Public
1808 /// \~english @par Type
1809 ///        Sync
1810 /// \~english @see FrameworkunifiedSendMsg, FrameworkunifiedGetMsgDataOfSize
1811 ///
1812 /// Explicit call to clear the data from shared memory.
1813 /// To be used incase of forwarding messages ???
1814 ///
1815 /// \param [in] hApp
1816 ///         HANDLE - Application framework handle
1817 ///
1818 /// \return status
1819 ///         EFrameworkunifiedStatus - success or error
1820 /// \~english @par Type
1821 ///        Sync
1822 ///
1823 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
1824 ///      FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
1825 ////////////////////////////////////////////////////////////////////////////////////////////
1826 EFrameworkunifiedStatus FrameworkunifiedClearMsgData(HANDLE hApp);
1827
1828 ////////////////////////////////////////////////////////////////////////////////////////////
1829 /// FrameworkunifiedForwardMessage
1830 /// Forward a message to a service or a client.
1831 ///
1832 /// \param [in] hApp
1833 ///         HANDLE - Handle to the service
1834 /// \param [in] hChildQ
1835 ///         HANDLE - Handle to the child thread
1836 /// \param [in] iCmd
1837 ///         UI_32 - .
1838 ///
1839 /// \return status
1840 ///         EFrameworkunifiedStatus - success or error
1841 ///
1842 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedMcClose, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
1843 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedGetSystemInfo
1844 ///
1845 ////////////////////////////////////////////////////////////////////////////////////////////
1846 EFrameworkunifiedStatus FrameworkunifiedForwardMessage(HANDLE hApp, HANDLE hChildQ, UI_32 iCmd);
1847
1848
1849
1850
1851
1852
1853
1854 ////////////////////////////////////////////////////////////////////////////////////////////
1855 //        Notification & Persistence Service
1856 ////////////////////////////////////////////////////////////////////////////////////////////
1857
1858 /////////////////////////////////////////////////////////////////////////////////////
1859 /// \ingroup FrameworkunifiedNPRegisterNotification
1860 /// \~english @par Brief
1861 ///       To the notification service to register the Notification, API to send a message.
1862 /// \~english @param [in] hApp
1863 ///        HANDLE   - HANDLE for Application
1864 /// \~english @param [in] pNotification
1865 ///        PCSTR    - A pointer to the Notification name
1866 /// \~english @param [in] max_length
1867 ///        UI_32    - The maximum length of the Notification message (64byte below)
1868 /// \~english @param [in] persType
1869 /// \~english @par
1870 ///        EFrameworkunifiedNotificationType     - Type of Notification
1871 ///       enum EFrameworkunifiedNotificationType Variable
1872 ///       - eFrameworkunifiedNotificationVar  : Non Persistent. Not stored locally by NPS.
1873 ///       - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
1874 ///       - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
1875 ///       - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
1876 ///       - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
1877 ///       - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
1878 /// \~english @retval eFrameworkunifiedStatusOK Success
1879 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
1880 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1881 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
1882 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
1883 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
1884 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
1885 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
1886 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
1887 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
1888 /// \~english @par Prerequisite
1889 ///       - NS_NPPService of the process has been started.
1890 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
1891 ///       done.
1892 /// \~english @par Change of internal state
1893 ///       - Change of internal state according to the API does not occur.
1894 /// \~english @par Conditions of processing failure
1895 ///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
1896 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
1897 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
1898 ///       - It is not appropriate length of the specified Notification name in argument(0, or more than a 64byte).
1899 ///       [eFrameworkunifiedStatusInvldParam]
1900 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
1901 ///       [eFrameworkunifiedStatusFail]
1902 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
1903 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
1904 ///       [eFrameworkunifiedStatusInvldParam]
1905 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
1906 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
1907 ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
1908 ///       [eFrameworkunifiedStatusInvldHndlType]
1909 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
1910 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
1911 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
1912 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
1913 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
1914 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
1915 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
1916 ///       [eFrameworkunifiedStatusErrOther]
1917 /// \~english @par Detail
1918 ///       To the notification service (NS_NPPService) to register the Notification, \n
1919 ///       send a message for the Notification registration.
1920 /// \~english @par Classification
1921 ///          Public
1922 /// \~english @par Type
1923 ///         Pub-Sub
1924 /// \~english @see  FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
1925 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
1926 ///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
1927 ///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
1928 ////////////////////////////////////////////////////////////////////////////////////
1929 EFrameworkunifiedStatus FrameworkunifiedNPRegisterNotification(HANDLE hApp, PCSTR pNotification,  const UI_32 max_length,
1930                                      const EFrameworkunifiedNotificationType persType);
1931
1932 ////////////////////////////////////////////////////////////////////////////////////////////
1933 /// FrameworkunifiedNPSetPersistNotfnDefaultValue
1934 /// API to send message to Notification Service to set the default value for the notification.
1935 ///
1936 /// \param [in] hApp
1937 ///         HANDLE - Handle to the Framework
1938 /// \param [in] pNotification
1939 ///         PCSTR - Name of Notification
1940 /// \param [in] data
1941 ///         PVOID - Set the default value for the notification.
1942 /// \param [in] uiLength
1943 ///         const UI_32 - length of the data
1944 ///
1945 /// \return status
1946 ///         EFrameworkunifiedStatus - success or error
1947 ////////////////////////////////////////////////////////////////////////////////////////////
1948 EFrameworkunifiedStatus FrameworkunifiedNPSetPersistNotfnDefaultValue(HANDLE hApp, PCSTR pNotification, PVOID data, const UI_32 uiLength);
1949
1950 /////////////////////////////////////////////////////////////////////////////////////
1951 /// \ingroup FrameworkunifiedNPSetPersistentNotfnType
1952 /// \~english @par Brief
1953 ///       API to send message to Notification Service to set persistent notification category.
1954 /// \~english @param [in] hApp
1955 ///       HANDLE - Handle to the Framework
1956 /// \~english @param [in] pNotification
1957 ///       PCSTR - Name of Notification
1958 /// \~english @param [in] ePersistCategory
1959 ///         EFrameworkunifiedPersistCategory - Persistent Category
1960 /// \~english @return status
1961 ///       EFrameworkunifiedStatus - success or error
1962 /// \~english @code
1963 ///                 typedef enum _EFrameworkunifiedNotificationType
1964 ///                 {
1965 ///                       eFrameworkunifiedNotificationVar = 0,        /* Not persistent (not retained by NPS) */
1966 ///                       eFrameworkunifiedStateVar,                   /* Not persistent (held by NPS) */
1967 ///                       eFrameworkunifiedPersistedStateVar,          /* persistent. Only kept in NPS */
1968 ///                       eFrameworkunifiedPersistedStateUserVar,      /* Invalid handle type. Only kept in NPS */
1969 ///                       eFrameworkunifiedImmediatePersistedStateVar, /* Invalid handle. See \ref
1970 ///                                                       FrameworkunifiedNPRegisterImmediatePersistNotification */
1971 ///                       eFrameworkunifiedUnknown                     /* No Notification typing. Not recommended */
1972 ///                 } EFrameworkunifiedNotificationType;
1973 ///            @endcode
1974 /// \~english @retval eFrameworkunifiedStatusOK success
1975 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
1976 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
1977 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
1978 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1979 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
1980 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
1981 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
1982 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
1983 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
1984 /// \~english @par Prerequisite
1985 ///       - The process of NS_NPPService is started.
1986 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
1987 /// \~english @par Change of internal state
1988 ///       - The internal state is not changed.
1989 /// \~english @par Conditions of processing failure
1990 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
1991 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
1992 ///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
1993 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
1994 ///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
1995 ///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
1996 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
1997 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
1998 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
1999 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
2000 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
2001 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
2002 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
2003 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
2004 /// \~english @par Classification
2005 ///       Public
2006 /// \~english @par Type
2007 ///       Pub-Sub
2008 /// \~english @see  none
2009 ///
2010 ////////////////////////////////////////////////////////////////////////////////////
2011 EFrameworkunifiedStatus FrameworkunifiedNPSetPersistentNotfnType(HANDLE hApp, PCSTR pNotification, EFrameworkunifiedPersistCategory ePersistCategory);
2012
2013 /////////////////////////////////////////////////////////////////////////////////////
2014 /// \ingroup FrameworkunifiedNPRegisterImmediatePersNotification
2015 /// \~english @par Brief
2016 ///       API to send message to Notification Service to register a immediate notification
2017 /// \~english @param [in] hApp
2018 ///         HANDLE - Handle to the Framework
2019 /// \~english @param [in] pNotification
2020 ///         PCSTR - Name of Notification
2021 /// \~english @param [in] max_length
2022 ///         const UI_32 - Max size of the notification message (should be <= 1Kb)
2023 /// \~english @param [in] delay
2024 ///         const UI_32 - Min time interval between every persist (in sec)
2025 /// \~english @return status
2026 ///         EFrameworkunifiedStatus - success or error
2027 /// \~english @retval eFrameworkunifiedStatusOK success
2028 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2029 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2030 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
2031 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
2032 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
2033 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
2034 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
2035 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
2036 /// \~english @par Prerequisite
2037 ///       - The process of NS_NPPService is started.
2038 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
2039 /// \~english @par Change of internal state
2040 ///       - The internal state is not changed.
2041 /// \~english @par Conditions of processing failure
2042 ///       - If the pNotification to the Notification specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2043 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2044 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2045 ///       - When the length of the Notification specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
2046 ///       - If the length of the Notification specified in the arguments is 64 (MAX_STRING_SIZE_NOTIFICATION) or greater [eFrameworkunifiedStatusInvldParam]
2047 ///       - Failed to get buffers to store Notification [eFrameworkunifiedStatusInvldParam]
2048 ///       - When memory could not be allocated due to the allocation of message-sending buffers (malloc),... [eFrameworkunifiedStatusFail]
2049 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
2050 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2051 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2052 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
2053 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
2054 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
2055 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
2056 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
2057 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
2058 /// \~english @par Detail
2059 ///       This API registers a Notification to the notification service (NS_NPPService).\n
2060 ///       By sending a Notification registration message to the notification service, the specified Notification is registered in the received notification service.
2061 /// \~english @par Classification
2062 ///         Public
2063 /// \~english @par Type
2064 ///         Pub-Sub
2065 /// \~english @see  FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
2066 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
2067 ///                 FrameworkunifiedUnsubscribeNotificationWithCallback,FrameworkunifiedSubscribeNotificationsWithCallback,
2068 ///                 FrameworkunifiedUnsubscribeNotificationsWithCallback
2069 ////////////////////////////////////////////////////////////////////////////////////
2070 EFrameworkunifiedStatus FrameworkunifiedNPRegisterImmediatePersistNotification(HANDLE hApp, PCSTR pNotification,  const UI_32 max_length,
2071                                                      const UI_32 delay);
2072
2073
2074 ////////////////////////////////////////////////////////////////////////////////////////////
2075 ///  FrameworkunifiedNPPersistentSync
2076 ///  Processing which synchronizes by NPPService (syncfs)
2077 ///
2078 /// \param [in] hApp
2079 ///         HANDLE - Handle to the Framework
2080 /// \return status
2081 ///         EFrameworkunifiedStatus - success or error
2082 ////////////////////////////////////////////////////////////////////////////////////////////
2083 EFrameworkunifiedStatus FrameworkunifiedNPPersistentSync(HANDLE hApp);
2084
2085 /////////////////////////////////////////////////////////////////////////////////////
2086 /// \ingroup FrameworkunifiedNPRegisterNotifications
2087 /// \~english @par Brief
2088 ///       API to send a message to the notification service in order to register multiple Notification of list format.
2089 /// \~english @param [in] hApp
2090 ///        HANDLE   - HANDLE for Application
2091 /// \~english @param [in] pList
2092 ///        FrameworkunifiedNotificationsList   - Pointer to the Notification list to be registered
2093 /// \~english @param [in] uiListLength
2094 ///        UI_32    - List length
2095 /// \~english @par
2096 ///        FrameworkunifiedNotificationsList Structure
2097 /// \~english @code
2098 ///                 #define MAX_STRING_SIZE_NOTIFICATION  64
2099 ///                 typedef struct _FrameworkunifiedNotificationsList
2100 ///                 {
2101 ///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name                      */
2102 ///                       UI_32 uiLengthData;                               /* Notification Name length(64byte below) */
2103 ///                       EFrameworkunifiedNotificationType  persType;                   /* Notification Type                      */
2104 ///                 }
2105 ///            @endcode
2106 /// \~english @par
2107 ///       enum EFrameworkunifiedNotificationType Variable
2108 ///       - eFrameworkunifiedNotificationVar  : Non Persistent. Not stored locally by NPS.
2109 ///       - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
2110 ///       - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
2111 ///       - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
2112 ///       - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
2113 ///       - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
2114 /// \~english @retval eFrameworkunifiedStatusOK Success
2115 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2116 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2117 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
2118 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
2119 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
2120 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
2121 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
2122 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
2123 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
2124 /// \~english @par Prerequisite
2125 ///       - NS_NPPService of the process has been started.
2126 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
2127 ///       done.
2128 /// \~english @par Change of internal state
2129 ///       - Change of internal state according to the API does not occur.
2130 /// \~english @par Conditions of processing failure
2131 ///       - A pointer to the Notification list to register specified in the argument (pList) is NULL.
2132 ///       [eFrameworkunifiedStatusInvldParam]
2133 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
2134 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
2135 ///       - And fail to acquire the buffer for storing a plurality Notification. [eFrameworkunifiedStatusInvldParam]
2136 ///       - List specified in the argument length (uiListLength) has exceeded the maximum number of Notification.
2137 ///       [eFrameworkunifiedStatusFail]
2138 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
2139 ///       [eFrameworkunifiedStatusFail]
2140 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
2141 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
2142 ///       [eFrameworkunifiedStatusInvldParam]
2143 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
2144 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
2145 ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
2146 ///       [eFrameworkunifiedStatusInvldHndlType]
2147 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
2148 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
2149 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
2150 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
2151 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
2152 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
2153 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
2154 ///       [eFrameworkunifiedStatusErrOther]
2155 /// \~english @par Detail
2156 ///       This API is to register multiple Notification of list format to the notification service (NS_NPPService).\n
2157 ///       By transmitting multiple Notification registration message to the notification service, Notification \n
2158 ///       specified in the received notification service is registered. \n
2159 ///       It sends a message for multiple Notification registered with the notification service (NS_NPPService) \n
2160 ///       in order to register multiple Notification of list format.
2161 /// \~english @par Classification
2162 ///          Public
2163 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification, FrameworkunifiedNPUnRegisterNotifications,
2164 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
2165 ///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
2166 ///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
2167 ////////////////////////////////////////////////////////////////////////////////////
2168 EFrameworkunifiedStatus FrameworkunifiedNPRegisterNotifications(HANDLE hApp, const  FrameworkunifiedNotificationsList *pList, UI_32 uiListLength);
2169
2170 /////////////////////////////////////////////////////////////////////////////////////
2171 /// \ingroup FrameworkunifiedNPUnRegisterNotification
2172 /// \~english @par Brief
2173 ///       API to send message to Notification Service to remove a notification.
2174 /// \~english @param [in] hApp
2175 ///        HANDLE   - HANDLE for Application
2176 /// \~english @param [in] pNotification
2177 ///        PCSTR    - A pointer to the Notification name
2178 /// \~english @retval eFrameworkunifiedStatusOK Success
2179 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2180 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2181 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
2182 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
2183 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
2184 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
2185 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
2186 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
2187 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
2188 /// \~english @par Prerequisite
2189 ///       - NS_NPPService of the process has been started.
2190 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
2191 ///       done.
2192 /// \~english @par Change of internal state
2193 ///       - Change of internal state according to the API does not occur.
2194 /// \~english @par Conditions of processing failure
2195 ///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
2196 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
2197 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
2198 ///       - It fails to get the buffer that stores the Notification. [eFrameworkunifiedStatusInvldParam]
2199 ///       - It is not appropriate length of the specified Notification name in argument(0, or more than a 64byte).
2200 ///       [eFrameworkunifiedStatusInvldParam]
2201 ///       - Can not be acquired memory in the acquisition of buffer for internal processing (malloc). [eFrameworkunifiedStatusFail]
2202 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
2203 ///       [eFrameworkunifiedStatusFail]
2204 ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
2205 ///       [eFrameworkunifiedStatusInvldHndlType]
2206 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
2207 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
2208 ///       [eFrameworkunifiedStatusInvldParam]
2209 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
2210 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
2211 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
2212 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
2213 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
2214 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
2215 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
2216 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
2217 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
2218 ///       [eFrameworkunifiedStatusErrOther]
2219 /// \~english @par Detail
2220 ///       This API is, to remove the Notification from the notification service (NS_NPPService). \n
2221 ///       By deleting, Notification specified from the notification service will no longer be delivered.
2222 /// \~english @par Classification
2223 ///          Public
2224 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotifications,
2225 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
2226 ///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
2227 ///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
2228 ////////////////////////////////////////////////////////////////////////////////////
2229 EFrameworkunifiedStatus FrameworkunifiedNPUnRegisterNotification(HANDLE hApp, PCSTR pNotification);
2230
2231 /////////////////////////////////////////////////////////////////////////////////////
2232 /// \ingroup FrameworkunifiedNPUnRegisterNotifications
2233 /// \~english @par Brief
2234 ///       API to send message to Notification Service to delete a notification.
2235 /// \~english @param [in] hApp
2236 ///        HANDLE   - HANDLE for Application
2237 /// \~english @param [in] pList
2238 ///        FrameworkunifiedNotificationsList   - Pointer to the Notification list that you want to delete
2239 /// \~english @param [in] uiListLength
2240 ///        UI_32    - List length
2241 /// \~english @par
2242 ///        FrameworkunifiedNotificationsList Structure
2243 /// \~english @code
2244 ///                 #define MAX_STRING_SIZE_NOTIFICATION  64
2245 ///                 typedef struct _FrameworkunifiedNotificationsList
2246 ///                 {
2247 ///                       CHAR cNotification[MAX_STRING_SIZE_NOTIFICATION]; /* Notification Name                      */
2248 ///                       UI_32 uiLengthData;                               /* Notification Name length(64byte below) */
2249 ///                       EFrameworkunifiedNotificationType  persType;                   /* Notification Type                      */
2250 ///                 }
2251 ///            @endcode
2252 /// \~english @par
2253 ///       enum EFrameworkunifiedNotificationType Variable
2254 ///       - eFrameworkunifiedNotificationVar  : Non Persistent. Not stored locally by NPS.
2255 ///       - eFrameworkunifiedStateVar : Non Persistent. stored locally by NPS.
2256 ///       - eFrameworkunifiedPersistedStateVar : Not to be used. Persistent. Also stored locally by NPS.
2257 ///       - eFrameworkunifiedPersistedStateUserVar : Not to be used. User specific Persistent. Also stored locally by NPS.
2258 ///       - eFrameworkunifiedImmediatePersistedStateVar : Not to be used.
2259 ///       - eFrameworkunifiedUnknown : Not to be used. This is not a type of notification.
2260 /// \~english @retval eFrameworkunifiedStatusOK Success
2261 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2262 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2263 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
2264 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
2265 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
2266 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
2267 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
2268 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
2269 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
2270 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
2271 /// \~english @par Prerequisite
2272 ///       - NS_NPPService of the process has been started.
2273 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
2274 ///       done.
2275 /// \~english @par Change of internal state
2276 ///       - Change of internal state according to the API does not occur.
2277 /// \~english @par Conditions of processing failure
2278 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
2279 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusInvldParam]
2280 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusNullPointer]
2281 ///       - It fails to get the buffer that stores multiple Notification. [eFrameworkunifiedStatusInvldParam]
2282 ///       - List specified in the argument length (uiListLength) has exceeded the maximum number of Notification.
2283 ///       [eFrameworkunifiedStatusFail]
2284 ///       - Can not be acquired memory in the acquisition of buffer for internal processing (malloc). [eFrameworkunifiedStatusFail]
2285 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
2286 ///       [eFrameworkunifiedStatusFail]
2287 ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
2288 ///       [eFrameworkunifiedStatusInvldHndlType]
2289 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
2290 ///       [eFrameworkunifiedStatusInvldParam]
2291 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
2292 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
2293 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
2294 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
2295 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
2296 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
2297 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
2298 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
2299 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
2300 ///       [eFrameworkunifiedStatusErrOther]
2301 /// \~english @par Detail
2302 ///       This API is, delete multiple Notification of list format from the notification service (NS_NPPService). \n
2303 ///       By deleting, Notification specified from the notification service will no longer be delivered.
2304 /// \~english @par Classification
2305 ///          Public
2306 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotification,
2307 ///                 FrameworkunifiedNPPublishNotification, FrameworkunifiedSubscribeNotificationWithCallback,
2308 ///                 FrameworkunifiedUnsubscribeNotificationWithCallback,
2309 ///                 FrameworkunifiedSubscribeNotificationsWithCallback, FrameworkunifiedUnsubscribeNotificationsWithCallback
2310 ////////////////////////////////////////////////////////////////////////////////////
2311 EFrameworkunifiedStatus FrameworkunifiedNPUnRegisterNotifications(HANDLE hApp, const  FrameworkunifiedNotificationsList *pList,
2312                                         UI_32 uiListLength);
2313
2314 ////////////////////////////////////////////////////////////////////////////////////////////
2315 /// \ingroup FrameworkunifiedNPPublishNotification
2316 /// \~english @par Brief
2317 ///       API to send message to Notification Service to notify subscribers
2318 /// \~english @param [in] hApp
2319 ///        HANDLE   - HANDLE for Application
2320 /// \~english @param [in] pNotification
2321 ///        PCSTR    - A pointer to the Notification name
2322 /// \~english @param [in] pData
2323 ///        VOID *   - Data buffer pointer
2324 /// \~english @param [in] iLength
2325 ///        UI_32    - Size of data buffer
2326 /// \~english @retval eFrameworkunifiedStatusOK Success
2327 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2328 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2329 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
2330 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
2331 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
2332 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
2333 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
2334 /// \~english @retval eFrameworkunifiedStatusFail Some kind of error has occurred
2335 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
2336 /// \~english @par Prerequisite
2337 ///       - NS_NPPService of the process has been started.
2338 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
2339 ///       done.
2340 /// \~english @par Conditions of processing failure
2341 ///       - Pointer (pNotification) is NULL to the Notification name specified. [eFrameworkunifiedStatusInvldParam]
2342 ///       - HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
2343 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldParam]
2344 ///       - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
2345 ///       [eFrameworkunifiedStatusFail]
2346 ///       - Message queue HANDLE in HANDLE specified in the argument (hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
2347 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
2348 ///       [eFrameworkunifiedStatusInvldParam]
2349 ///       - Message queue name of HANDLE specified in the argument (hApp) is not appropriate(The name is NULL, more than
2350 ///       20byte) [eFrameworkunifiedStatusInvldHandle]
2351 ///       - Message queue type of HANDLE specified in the argument (hApp) is not a transmission.
2352 ///       [eFrameworkunifiedStatusInvldHndlType]
2353 ///       - Session message queue is full to the NPP Service. [eFrameworkunifiedStatusMsgQFull]
2354 ///       - It is invalid transmission file descriptor of the session message to the NPP Service. [eFrameworkunifiedStatusErrNoEBADF]
2355 ///       - Interruption by the system call (signal) has occurred during the transmission of the session message for the
2356 ///       NPP Service. [eFrameworkunifiedStatusErrNoEINTR]
2357 ///       - Incorrect size of the transmit buffer of the session message to the NPP Service. [eFrameworkunifiedStatusInvldBufSize]
2358 ///       - Any errors occur during the transmission of a session message to the NPP Service. [eFrameworkunifiedStatusFail]
2359 ///       - It failed to shared memory access for transmission of the session message for the NPP Service.
2360 ///       [eFrameworkunifiedStatusErrOther]
2361 /// \~english @par Change of internal state
2362 ///       - Change of internal state according to the API does not occur.
2363 /// \~english @par Detail
2364 ///       Send a message to the notification service(NS_NPPService), and notifies the Subscriber.\n
2365 ///       - Publisher is required registration of Notification in advance FrameworkunifiedNPRegisterNotification.
2366 ///       - Publisher is possible cancellation of the Notification in FrameworkunifiedNPUnRegisterNotification.
2367 ///       - Subscriber need a reception procedure of Notification in advance FrameworkunifiedSubscribeNotification.
2368 ///       - Subscriber is capable of receiving cancellation of the Notification in FrameworkunifiedUnsubscribeNotification.
2369 /// \~english @par Classification
2370 ///          Public
2371 /// \~english @see  FrameworkunifiedNPRegisterNotification, FrameworkunifiedNPUnRegisterNotification
2372 ///                 FrameworkunifiedNPRegisterNotifications, FrameworkunifiedNPUnRegisterNotifications
2373 ////////////////////////////////////////////////////////////////////////////////////////////
2374 EFrameworkunifiedStatus FrameworkunifiedNPPublishNotification(HANDLE hApp, PCSTR pNotification,
2375                                     PCVOID pData, UI_32 iLength);
2376
2377 /////////////////////////////////////////////////////////////////////////////////////
2378 /// \ingroup FrameworkunifiedNPReadPersistedData
2379 /// \~english @par Brief
2380 ///       API to requested the persistent data corresponding to the notification if available
2381 /// \~english @param [in] hApp
2382 ///         HANDLE - Handle to the Framework
2383 /// \~english @param [in] pNotification
2384 ///         PCSTR - Name of Notification
2385 /// \~english @return status
2386 ///         EFrameworkunifiedStatus - success or error
2387 /// \~english @retval eFrameworkunifiedStatusOK success
2388 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2389 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2390 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
2391 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
2392 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
2393 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
2394 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
2395 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
2396 /// \~english @par Prerequisite
2397 ///       - The process of NS_NPPService is started.
2398 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
2399 /// \~english @par Change of internal state
2400 ///       - The internal state is not changed.
2401 /// \~english @par Conditions of processing failure
2402 ///       - If the pNotification to the Notification specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2403 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2404 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2405 ///       - When the length of the Notification specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
2406 ///       - Failed to get buffers to store Notification [eFrameworkunifiedStatusInvldParam]
2407 ///       - When memory could not be allocated due to the allocation of message-sending buffers (malloc),... [eFrameworkunifiedStatusFail]
2408 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
2409 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2410 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2411 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
2412 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
2413 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
2414 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
2415 ///       - Incorrectly sized send buffers for sessions destined for the NPP Service [eFrameworkunifiedStatusInvldBufSize]
2416 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
2417 /// \~english @par Classification
2418 ///         Public
2419 /// \~english @par Type
2420 ///         Pub-Sub
2421 /// \~english @see  none
2422 ////////////////////////////////////////////////////////////////////////////////////
2423 EFrameworkunifiedStatus FrameworkunifiedNPReadPersistedData(HANDLE hApp, PCSTR pNotification);
2424
2425 ////////////////////////////////////////////////////////////////////////////////////////////
2426 /// \ingroup  FrameworkunifiedNPRegisterPersistentFile
2427 /// \~english @par Brief
2428 ///        APIs that send messages to notification services and register Persistent file tags
2429 /// \~english @param [in] hApp
2430 ///        HANDLE   - Handle for the application
2431 /// \~english @param [in] pTag
2432 ///        PCSTR    - Tag name
2433 /// \~english @param [in] bIsUserFile
2434 ///        BOOL     - User specified (TRUE: user-specific/FALSE: all users) (Default:FALSE)
2435 /// \~english @retval eFrameworkunifiedStatusOK success
2436 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2437 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
2438 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
2439 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2440 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
2441 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
2442 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
2443 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
2444 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
2445 /// \~english @par Prerequisite
2446 ///       - The process of NS_NPPService is started.
2447 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
2448 /// \~english @par Change of internal state
2449 ///       - The internal state is not changed.
2450 /// \~english @par Conditions of processing failure
2451 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2452 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2453 ///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
2454 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2455 ///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2456 ///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
2457 ///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2458 ///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
2459 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
2460 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
2461 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
2462 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
2463 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
2464 ///       - When an interrupt by a system call (signal) occurs while sending Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
2465 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
2466 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
2467 /// \~english @par Detail
2468 ///       Sends messages to the notification service (NS_NPPService) and registers Persistent file tags.\n
2469 ///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.
2470 /// \~english @par Classification
2471 ///          Public
2472 /// \~english @par Type
2473 ///          Fire and Forget
2474 /// \~english @see  FrameworkunifiedNPLoadPersistentFile, FrameworkunifiedNPReleasePersistentFile
2475 ///
2476 /// API to send message to Notification Service to add a file path as to be persisted
2477 ///
2478 /// \param [in] pTag
2479 ///         PCSTR - A unique identifier for the file path specified,
2480 ///                 this is used in retrieve/Load the file later
2481 ///
2482 /// \param [in] bIsUserFile
2483 ///      BOOL - set TRUE if want to register a file for user.
2484 ///
2485 /// \return status
2486 ///         EFrameworkunifiedStatus - success or error
2487 ///
2488 /// \see FrameworkunifiedNPLoadPersistentFile, FrameworkunifiedNPReleasePersistentFile
2489 ///
2490 ////////////////////////////////////////////////////////////////////////////////////////////
2491 EFrameworkunifiedStatus FrameworkunifiedNPRegisterPersistentFile(HANDLE hApp, PCSTR pTag, BOOL bIsUserFile = FALSE);
2492
2493 ////////////////////////////////////////////////////////////////////////////////////////////
2494 /// FrameworkunifiedNPSetFilePersistentType
2495 /// API to send message to Notification Service to set persistent file category.
2496 ///
2497 /// \param [in] hApp
2498 ///         HANDLE - Handle to the Framework
2499 /// \param [in] pTag
2500 ///         PCSTR - File tag
2501 /// \param [in] ePersistCategory
2502 ///         EFrameworkunifiedPersistCategory - Persistent category
2503 ///
2504 /// \return status
2505 ///         EFrameworkunifiedStatus - success or error
2506 ////////////////////////////////////////////////////////////////////////////////////////////
2507 EFrameworkunifiedStatus FrameworkunifiedNPSetFilePersistentType(HANDLE hApp, PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);
2508
2509
2510 ////////////////////////////////////////////////////////////////////////////////////////////
2511 /// \ingroup  FrameworkunifiedNPLoadPersistentFile
2512 /// \~english @par Brief
2513 ///        APIs that send messages to notification services and request Load of Persistent file tags
2514 /// \~english @param [in] hApp
2515 ///        HANDLE   - Handle for the application
2516 /// \~english @param [in] pDstFilePath
2517 ///        PCSTR    - Address of arbitrary data
2518 /// \~english @param [in] pTag
2519 ///        PCSTR    - Tag name
2520 /// \~english @param [in] hUser
2521 ///        BOOL     - Parameter error(Default:NULL)
2522 /// \~english @retval eFrameworkunifiedStatusOK success
2523 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2524 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
2525 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
2526 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2527 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
2528 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
2529 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
2530 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
2531 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
2532 /// \~english @par Prerequisite
2533 ///       - The process of NS_NPPService is started.
2534 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
2535 /// \~english @par Change of internal state
2536 ///       - The internal state is not changed.
2537 /// \~english @par Conditions of processing failure
2538 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2539 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2540 ///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
2541 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2542 ///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2543 ///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
2544 ///       - When the Load destination file path (pDstFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2545 ///       - When the Load destination filepath (pDstFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
2546 ///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2547 ///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
2548 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
2549 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
2550 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
2551 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
2552 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
2553 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
2554 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
2555 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
2556 /// \~english @par Detail
2557 ///       Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
2558 ///       The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
2559 ///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
2560 ///
2561 /// \~english @par Classification
2562 ///          Public
2563 /// \~english @par Type
2564 ///          Method(Async)
2565 /// \~english @see  FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPReleasePersistentFile
2566 ///
2567 /// API to send message to Notification Service to copy file from persistent memory to
2568 /// specified path. The caller recieves an acknowledgement once NPS completes file copy
2569 ///
2570 /// \param [in] pDstFilePath
2571 ///         PCSTR - Complete file path to which the file should be copied from persistent area
2572 /// \param [in] pTag
2573 ///         PCSTR - Tag associated with the file that needs to be copied to pDstFilePath
2574 /// \param [in] hUser
2575 ///         HANDLE - Handle for the user
2576 ///
2577 /// \return status
2578 ///         EFrameworkunifiedStatus - success or error
2579 ///
2580 /// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPReleasePersistentFile
2581 ///
2582 ////////////////////////////////////////////////////////////////////////////////////////////
2583 EFrameworkunifiedStatus FrameworkunifiedNPLoadPersistentFile(HANDLE hApp, PCSTR pDstFilePath, PCSTR pTag, HANDLE hUser = NULL);
2584
2585 /////////////////////////////////////////////////////////////////////////////////////
2586 /// \ingroup FrameworkunifiedNPReleasePersistentFile
2587 /// \~english @par Brief
2588 ///       API to send message to Notification Service to notify that the file can be persisted.
2589 /// \~english @param [in] hApp
2590 ///       HANDLE - Handle to the Framework
2591 /// \~english @param [in] bIsPersist
2592 ///       BOOL - If the specified file needs to be persisted or not on release
2593 /// \~english @param [in] pTag
2594 ///       PCSTR - Tag associated with the file released
2595 /// \~english @param [in] pFullFilePath
2596 ///       PCSTR - Full path name of the file to be persisted
2597 /// \~english @param [in] hUser
2598 ///       HANDLE - Handle for the user
2599 /// \~english @return status
2600 ///       EFrameworkunifiedStatus - success or error
2601 /// \~english @retval eFrameworkunifiedStatusOK success
2602 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2603 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
2604 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
2605 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2606 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
2607 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
2608 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
2609 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
2610 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
2611 /// \~english @par Prerequisite
2612 ///       - The process of NS_NPPService is started.
2613 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
2614 /// \~english @par Change of internal state
2615 ///       - The internal state is not changed.
2616 /// \~english @par Conditions of processing failure
2617 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2618 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2619 ///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
2620 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2621 ///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2622 ///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
2623 ///       - When the Release destination file path (pFullFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2624 ///       - When the Release destination filepath (pFullFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
2625 ///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2626 ///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
2627 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
2628 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
2629 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
2630 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
2631 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
2632 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
2633 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
2634 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
2635 /// \~english @par Detail
2636 ///       Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
2637 ///       The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
2638 ///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
2639 /// \~english @par Classification
2640 ///       Public
2641 /// \~english @par Type
2642 ///       Pub-Sub
2643 /// \~english @see  FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
2644 ///
2645 ////////////////////////////////////////////////////////////////////////////////////
2646 EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFile(HANDLE hApp, BOOL bIsPersist, PCSTR pTag, PCSTR pFullFilePath,
2647                                       HANDLE hUser = NULL);
2648
2649 /////////////////////////////////////////////////////////////////////////////////////
2650 /// \ingroup FrameworkunifiedNPReleasePersistentFile
2651 /// \~english @par Brief
2652 ///       API to send message to Notification Service to notify that the file can be persisted.
2653 /// \~english @param [in] hApp
2654 ///       HANDLE - Handle to the Framework
2655 /// \~english @param [in] eReleaseType
2656 ///         EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease     :not on release
2657 ///                           eFrameworkunifiedPersistOnShutdown:persist on shutdown
2658 ///                           eFrameworkunifiedPersistInstantly :persist instantly
2659 /// \~english @param [in] pTag
2660 ///       PCSTR - Tag associated with the file released
2661 /// \~english @param [in] pFullFilePath
2662 ///       PCSTR - Full path name of the file to be persisted
2663 /// \~english @param [in] hUser
2664 ///       HANDLE - Handle for the user
2665 /// \~english @return status
2666 ///       EFrameworkunifiedStatus - success or error
2667 /// \~english @retval eFrameworkunifiedStatusOK success
2668 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
2669 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
2670 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
2671 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2672 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
2673 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
2674 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
2675 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
2676 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
2677 /// \~english @par Prerequisite
2678 ///       - The process of NS_NPPService is started.
2679 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
2680 /// \~english @par Change of internal state
2681 ///       - The internal state is not changed.
2682 /// \~english @par Conditions of processing failure
2683 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2684 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
2685 ///       - When the message queue information handle specified in the argument (hApp) is NULL, [eFrameworkunifiedStatusNullPointer]
2686 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2687 ///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2688 ///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
2689 ///       - When the Load destination file path (pDstFilePath) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
2690 ///       - When the Load destination filepath (pDstFilePath) specified in the parameter is empty, [eFrameworkunifiedStatusInvldParam]
2691 ///       - When the tag name (pTag) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
2692 ///       - When the tag name (pTag) specified in the arguments is an empty character, [eFrameworkunifiedStatusInvldParam]
2693 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
2694 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
2695 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
2696 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
2697 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
2698 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
2699 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
2700 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
2701 /// \~english @par Detail
2702 ///       Sends messages to the notification service (NS_NPPService) and requests the Load of Persistent file tags.\n
2703 ///       The copy destination file path is 255 bytes or less, and any file that exceeds 255 bytes is truncated to 255 bytes. Therefore, specify a file path of 255 bytes or less.\n
2704 ///       Tag name is 64 bytes or less. If the tag name exceeds 64 bytes, the tag name is truncated to 64 bytes or less. Therefore, specify a tag name of 64 bytes or less.\n
2705 /// \~english @par Classification
2706 ///       Public
2707 /// \~english @par Type
2708 ///       Pub-Sub
2709 /// \~english @see  FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
2710 ///
2711 ////////////////////////////////////////////////////////////////////////////////////
2712 EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFile(HANDLE hApp, EFrameworkunifiedReleaseType eReleaseType, PCSTR pTag, PCSTR pFullFilePath,
2713                                       HANDLE hUser = NULL);
2714
2715 ////////////////////////////////////////////////////////////////////////////////////////////
2716 /// \ingroup  FrameworkunifiedNPRegisterPersistentFolder
2717 /// API to send message to Notification Service to add a folder path to be persisted
2718 ///
2719 /// \param [in] hApp
2720 ///         HANDLE - Handle to the Framework
2721 /// \param [in] pTag
2722 ///         PCSTR - A unique identifier for the folder path specified,
2723 ///                 this is used in retrieve/Load the folder later
2724 ///
2725 /// \param [in] bIsUserFolder
2726 ///      BOOL - set TRUE if want to register a folder for user.
2727 ///
2728 /// \return status
2729 ///         EFrameworkunifiedStatus - success or error
2730 ///
2731 /// \see FrameworkunifiedNPLoadPersistentFolder, FrameworkunifiedNPReleasePersistentFolder
2732 ///
2733 ////////////////////////////////////////////////////////////////////////////////////////////
2734 EFrameworkunifiedStatus FrameworkunifiedNPRegisterPersistentFolder(HANDLE hApp, PCSTR pTag, BOOL bIsUserFolder = FALSE);
2735
2736 ////////////////////////////////////////////////////////////////////////////////////////////
2737 /// FrameworkunifiedNPSetFolderPersistentType
2738 /// API to send message to Notification Service to set persistent folder category.
2739 ///
2740 /// \param [in] hApp
2741 ///         HANDLE - Handle to the Framework
2742 /// \param [in] pTag
2743 ///         PCSTR - A unique identifier for the folder path specified,
2744 ///                 this is used in retrieve/Load the folder later
2745 /// \param [in] ePersistCategory
2746 ///         EFrameworkunifiedPersistCategory - Persistent category
2747 ///
2748 /// \return status
2749 ///         EFrameworkunifiedStatus - success or error
2750 ////////////////////////////////////////////////////////////////////////////////////////////
2751 EFrameworkunifiedStatus FrameworkunifiedNPSetFolderPersistentType(HANDLE hApp, PCSTR pTag, EFrameworkunifiedPersistCategory ePersistCategory);
2752
2753 ////////////////////////////////////////////////////////////////////////////////////////////
2754 /// \ingroup  FrameworkunifiedNPLoadPersistentFolder
2755 /// API to send message to Notification Service to copy folder from persistent memory to
2756 /// specified path. The caller recieves an acknowledgement once NPS completes folder copy
2757 ///
2758 /// \param [in] hApp
2759 ///         HANDLE - Handle to the Framework
2760 /// \param [in] pDstFolderPath
2761 ///         PCSTR - Complete folder path to which the folder should be copied from persistent area
2762 /// \param [in] pTag
2763 ///         PCSTR - Tag associated with the folder that needs to be copied to pDstFolderPath
2764 /// \param [in] hUser
2765 ///         HANDLE - Handle for the user
2766 ///
2767 /// \return status
2768 ///         EFrameworkunifiedStatus - success or error
2769 ///
2770 /// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPReleasePersistentFolder
2771 ///
2772 ////////////////////////////////////////////////////////////////////////////////////////////
2773 EFrameworkunifiedStatus FrameworkunifiedNPLoadPersistentFolder(HANDLE hApp, PCSTR pDstFolderPath, PCSTR pTag, HANDLE hUser = NULL);
2774
2775 ////////////////////////////////////////////////////////////////////////////////////////////
2776 /// FrameworkunifiedNPReleasePersistentFolder
2777 /// API to send message to Notification Service to notify that the folder can be persisted.
2778 ///
2779 /// \param [in] hApp
2780 ///         HANDLE - Handle to the Framework
2781 /// \param [in] bIsPersist
2782 ///         BOOL - If the specified folder needs to be persisted or not on release
2783 /// \param [in] pTag
2784 ///         PCSTR - Tag associated with the folder released
2785 /// \param [in] pFullFolderPath
2786 ///         PCSTR - Full path name of the folder to be persisted
2787 /// \param [in] hUser
2788 ///         HANDLE - Handle for the user
2789 ///
2790 /// \return status
2791 ///         EFrameworkunifiedStatus - success or error
2792 ///
2793 /// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPLoadPersistentFolder
2794 ///
2795 ////////////////////////////////////////////////////////////////////////////////////////////
2796 EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFolder(HANDLE hApp, BOOL bIsPersist, PCSTR pTag, PCSTR pFullFolderPath,
2797                                         HANDLE hUser = NULL);
2798
2799 ////////////////////////////////////////////////////////////////////////////////////////////
2800 /// FrameworkunifiedNPReleasePersistentFolder
2801 /// API to send message to Notification Service to notify that the folder can be persisted.
2802 ///
2803 /// \param [in] hApp
2804 ///         HANDLE - Handle to the Framework
2805 /// \param [in] eFrameworkunifiedReleaseType
2806 ///         EFrameworkunifiedReleaseType - eFrameworkunifiedNotOnRelease     :not on release
2807 ///                           eFrameworkunifiedPersistOnShutdown:persist on shutdown
2808 ///                           eFrameworkunifiedPersistInstantly :persist instantly
2809 /// \param [in] pTag
2810 ///         PCSTR - Tag associated with the folder released
2811 /// \param [in] pFullFolderPath
2812 ///         PCSTR - Full path name of the folder to be persisted
2813 /// \param [in] hUser
2814 ///         HANDLE - Handle for the user
2815 ///
2816 /// \return status
2817 ///         EFrameworkunifiedStatus - success or error
2818 ///
2819 /// \see FrameworkunifiedNPRegisterPersistentFolder, FrameworkunifiedNPLoadPersistentFolder
2820 ///
2821 ////////////////////////////////////////////////////////////////////////////////////////////
2822 EFrameworkunifiedStatus FrameworkunifiedNPReleasePersistentFolder(HANDLE hApp, EFrameworkunifiedReleaseType eFrameworkunifiedReleaseType, PCSTR pTag,
2823                                         PCSTR pFullFolderPath, HANDLE hUser = NULL);
2824
2825
2826 ////////////////////////////////////////////////////////////////////////////////////////////
2827 //        Session APIs
2828 ////////////////////////////////////////////////////////////////////////////////////////////
2829
2830
2831
2832 /////////////////////////////////////////////////////////////////////////////////////
2833 /// \ingroup FrameworkunifiedOpenSession
2834 /// \~english @par Brief
2835 ///       API sends a message to the service requesting a session.
2836 /// \~english @param [in] hService
2837 ///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
2838 /// \~english @retval eFrameworkunifiedStatusOK Success
2839 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
2840 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2841 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
2842 /// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
2843 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
2844 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
2845 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
2846 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
2847 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
2848 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
2849 /// \~english @par Prerequisite
2850 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
2851 ///       done.
2852 /// \~english @par Change of internal state
2853 ///       - Change of internal state according to the API does not occur.
2854 /// \~english @par Conditions of processing failure
2855 ///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
2856 ///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
2857 ///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
2858 ///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
2859 ///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
2860 ///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
2861 ///       [eFrameworkunifiedStatusInvldHandle]
2862 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
2863 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
2864 ///       [eFrameworkunifiedStatusInvldQName]
2865 ///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
2866 ///       [eFrameworkunifiedStatusInvldHndlType]
2867 ///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
2868 ///       - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
2869 ///       - Interruption by the system call (signal) during the transmission of the session message to the service
2870 ///       occurs. [eFrameworkunifiedStatusErrNoEINTR]
2871 ///       - Size of the transmit buffer of the message for the session to the service is illegal.
2872 ///       [eFrameworkunifiedStatusInvldBufSize]
2873 ///       - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
2874 ///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
2875 /// \~english @par Detail
2876 ///       To send a message of the session request to the service.
2877 /// \~english @par Classification
2878 ///          Public
2879 /// \~english @see FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedOpenSessionWithData, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
2880 ///                FrameworkunifiedGetSessionId
2881 ////////////////////////////////////////////////////////////////////////////////////
2882 EFrameworkunifiedStatus FrameworkunifiedOpenSession(HANDLE hService);
2883
2884 /////////////////////////////////////////////////////////////////////////////////////
2885 /// \ingroup FrameworkunifiedOpenSessionWithData
2886 /// \~english @par Brief
2887 ///       API to send to service the message of the session request together with the data.
2888 /// \~english @param [in] hService
2889 ///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
2890 /// \~english @param [in] pData
2891 ///        PVOID    - Pointer to the session data for transmission
2892 /// \~english @param [in] length
2893 ///        UI_32    - Size of the session data for transmission
2894 /// \~english @retval eFrameworkunifiedStatusOK Success
2895 /// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid buffer
2896 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
2897 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2898 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
2899 /// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
2900 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
2901 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
2902 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
2903 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
2904 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
2905 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
2906 /// \~english @par Prerequisite
2907 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
2908 ///       done.
2909 /// \~english @par Change of internal state
2910 ///       - Change of internal state according to the API does not occur.
2911 /// \~english @par Conditions of processing failure
2912 ///       - A pointer to the session data for transmission to the specified non-zero size at NULL in argument.
2913 ///       [eFrameworkunifiedStatusInvldBuf]
2914 ///       - The pointer is NULL to the session data for transmission specified in the argument. [eFrameworkunifiedStatusErrOther]
2915 ///       - Size of the session data for transmission specified in the argument is 0. [eFrameworkunifiedStatusErrOther]
2916 ///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
2917 ///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
2918 ///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
2919 ///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
2920 ///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
2921 ///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
2922 ///       [eFrameworkunifiedStatusInvldHandle]
2923 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
2924 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
2925 ///       [eFrameworkunifiedStatusInvldQName]
2926 ///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
2927 ///       [eFrameworkunifiedStatusInvldHndlType]
2928 ///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
2929 ///       - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
2930 ///       - Interruption by the system call (signal) during the transmission of the session message to the service
2931 ///       occurs. [eFrameworkunifiedStatusErrNoEINTR]
2932 ///       - Size of the transmit buffer of the message for the session to the service is illegal.
2933 ///       [eFrameworkunifiedStatusInvldBufSize]
2934 ///       - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
2935 ///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
2936 /// \~english @par Detail
2937 ///       To send to the service a message of session request together with the data.
2938 /// \~english @par Classification
2939 ///          Public
2940 /// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
2941 ///                FrameworkunifiedGetSessionId
2942 ////////////////////////////////////////////////////////////////////////////////////
2943 EFrameworkunifiedStatus FrameworkunifiedOpenSessionWithData(HANDLE hService, PVOID pData, UI_32 length);
2944
2945 /////////////////////////////////////////////////////////////////////////////////////
2946 /// \ingroup FrameworkunifiedOpenSessionSync
2947 /// \~english @par Brief
2948 ///       Synchronous API of sending a message of the session request to the service.
2949 /// \~english @param [in] hService
2950 ///        HANDLE   - Handle to the service(FrameworkunifiedOpenService/FrameworkunifiedGetOpenSessionHandle/FrameworkunifiedGetOpenSessionSyncHandle HANDLE
2951 ///        acquired in)
2952 /// \~english @param [out] ack
2953 ///        OpenSessionAck   - Pointer to the response data of the session initiation
2954 /// \~english @par
2955 ///        OpenSessionAck Structure
2956 /// \~english @code
2957 ///                 #define MAX_QUEUE_NAME_SIZE 20
2958 ///                 typedef struct _OpenSessionAck
2959 ///                 {
2960 ///                       EFrameworkunifiedStatus eStatus;                      /* Status                */
2961 ///                       UI_32 sessionId;                         /* Session ID            */
2962 ///                       CHAR  cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte)  */
2963 ///                       UI_32 sessionType;                       /* Session Type          */
2964 ///                 }OpenSessionAck;
2965 ///            @endcode
2966 /// \~english @retval eFrameworkunifiedStatusOK Success
2967 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
2968 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
2969 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
2970 /// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
2971 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
2972 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
2973 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
2974 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
2975 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
2976 /// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
2977 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
2978 /// \~english @par Prerequisite
2979 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
2980 ///       done.
2981 /// \~english @par Change of internal state
2982 ///       - Change of internal state according to the API does not occur.
2983 /// \~english @par Conditions of processing failure
2984 ///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
2985 ///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
2986 ///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
2987 ///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
2988 ///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
2989 ///       [eFrameworkunifiedStatusInvldHandle]
2990 ///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
2991 ///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
2992 ///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
2993 ///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
2994 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
2995 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
2996 ///       [eFrameworkunifiedStatusInvldQName]
2997 ///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
2998 ///       [eFrameworkunifiedStatusInvldHndlType]
2999 ///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
3000 ///       - It is invalid transmit and receive file descriptor of the session message to the service.
3001 ///       [eFrameworkunifiedStatusErrNoEBADF]
3002 ///       - Interruption by the system call (signal) occurs during the transmission and reception of the session message
3003 ///       to the service. [eFrameworkunifiedStatusErrNoEINTR]
3004 ///       - Size of the transmit buffer of the message for the session to the service is illegal.
3005 ///       [eFrameworkunifiedStatusInvldBufSize]
3006 ///       - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
3007 ///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
3008 ///       - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
3009 ///       - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
3010 ///       - Interruption by the system call (signal) to wait in the response message received from the service has
3011 ///       occurred. [eFrameworkunifiedStatusFail]
3012 ///       - In response message at the time of failure to receive from the service, it failed to re-connection of the
3013 ///       Socket. [eFrameworkunifiedStatusBadConnection]
3014 /// \~english @par Detail
3015 ///       Send in the synchronous type the message of the session request to the service.
3016 /// \~english @par Classification
3017 ///          Public
3018 /// \~english @see FrameworkunifiedOpenSessionWithDataSync, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedCloseSessionSync,
3019 /// FrameworkunifiedGenerateNewSessionId,
3020 ///                 FrameworkunifiedGetSessionId
3021 ////////////////////////////////////////////////////////////////////////////////////
3022 EFrameworkunifiedStatus FrameworkunifiedOpenSessionSync(HANDLE hService, OpenSessionAck *ack);
3023
3024 /////////////////////////////////////////////////////////////////////////////////////
3025 /// \ingroup FrameworkunifiedOpenSessionWithDataSync
3026 /// \~english @par Brief
3027 ///       Synchronous API that transmits to the service a message session request with the data.
3028 /// \~english @param [in] hService
3029 ///        HANDLE   - Handle to the service(FrameworkunifiedOpenService/FrameworkunifiedGetOpenSessionHandle/FrameworkunifiedGetOpenSessionSyncHandle HANDLE
3030 ///        acquired in)
3031 /// \~english @param [in] pData
3032 ///        PVOID    - Pointer to session data for transmission
3033 /// \~english @param [in] length
3034 ///        UI_32    - Size of the session data for transmission
3035 /// \~english @param [out] ack
3036 ///        OpenSessionAck   - Pointer to the response data of the session initiation
3037 /// \~english @par
3038 ///        OpenSessionAck Structure
3039 /// \~english @code
3040 ///                 #define MAX_QUEUE_NAME_SIZE 20
3041 ///                 typedef struct _OpenSessionAck
3042 ///                 {
3043 ///                       EFrameworkunifiedStatus eStatus;                      /* Status                */
3044 ///                       UI_32 sessionId;                         /* Session ID            */
3045 ///                       CHAR  cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte)  */
3046 ///                       UI_32 sessionType;                       /* Session Type          */
3047 ///                 }OpenSessionAck;
3048 ///            @endcode
3049 /// \~english @retval eFrameworkunifiedStatusOK Success
3050 /// \~english @retval eFrameworkunifiedStatusInvldBuf Invalid Buffer
3051 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
3052 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3053 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
3054 /// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
3055 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
3056 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
3057 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
3058 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
3059 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
3060 /// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
3061 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
3062 /// \~english @par Prerequisite
3063 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
3064 ///       done.
3065 /// \~english @par Change of internal state
3066 ///       - Change of internal state according to the API does not occur.
3067 /// \~english @par Conditions of processing failure
3068 ///       - A pointer to the session data for transmission to the specified non-zero size at NULL in argument.
3069 ///       [eFrameworkunifiedStatusInvldBuf]
3070 ///       - The pointer is NULL to the session data for transmission specified in the argument. [eFrameworkunifiedStatusErrOther]
3071 ///       - Size of the session data for transmission specified in the argument is 0. [eFrameworkunifiedStatusErrOther]
3072 ///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
3073 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
3074 ///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
3075 ///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
3076 ///       - HANDLE specified in the argument message queue HANDLE in (hApp) is not appropriate (which is invalid).
3077 ///       [eFrameworkunifiedStatusInvldHandle]
3078 ///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
3079 ///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
3080 ///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
3081 ///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
3082 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
3083 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
3084 ///       [eFrameworkunifiedStatusInvldQName]
3085 ///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
3086 ///       [eFrameworkunifiedStatusInvldHndlType]
3087 ///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
3088 ///       - It is invalid transmit and receive file descriptor of the session message to the service.
3089 ///       [eFrameworkunifiedStatusErrNoEBADF]
3090 ///       - Interruption by the system call (signal) occurs during the transmission and reception of the session message
3091 ///       to the service. [eFrameworkunifiedStatusErrNoEINTR]
3092 ///       - Size of the transmit buffer of the message for the session to the service is illegal.
3093 ///       [eFrameworkunifiedStatusInvldBufSize]
3094 ///       - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
3095 ///       - In the shared memory access for transmission and reception of the service for the message for the session
3096 ///       failed. [eFrameworkunifiedStatusErrOther]
3097 ///       - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
3098 ///       - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
3099 ///       - Interruption by the system call (signal) to wait in the response message received from the service has
3100 ///       occurred. [eFrameworkunifiedStatusFail]
3101 ///       - In response message at the time of failure to receive from the service, it failed to re-connection of the
3102 ///       Socket. [eFrameworkunifiedStatusBadConnection]
3103 /// \~english @par Detail
3104 ///       Send in the synchronous type to service the message of the session request along with the data.
3105 /// \~english @par Classification
3106 ///          Public
3107 /// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedCloseSessionSync, FrameworkunifiedGenerateNewSessionId,
3108 ///                 FrameworkunifiedGetSessionId
3109 ////////////////////////////////////////////////////////////////////////////////////
3110 EFrameworkunifiedStatus FrameworkunifiedOpenSessionWithDataSync(HANDLE hService, PVOID pData, UI_32 length, OpenSessionAck *ack);
3111
3112 /////////////////////////////////////////////////////////////////////////////////////
3113 /// \ingroup FrameworkunifiedGetOpenSessionHandle
3114 /// \~english @par Brief
3115 ///       Asynchronous API to get the session handler.
3116 /// \~english @param [in] hApp
3117 ///        HANDLE   - HANDLE for Application (FrameworkunifiedCreateDispatcherWithoutLoop() HANDLE acquired in)
3118 /// \~english @retval HANDLE HANDLE for the session
3119 /// \~english @retval NULL   Failure to HANDLE acquisition for the session
3120 /// \~english @par Prerequisite
3121 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
3122 ///       done.
3123 /// \~english @par Change of internal state
3124 ///       - Change of internal state according to the API does not occur.
3125 /// \~english @par Conditions of processing failure
3126 ///       Under the following conditions, HANDLE is returned as NULL.
3127 ///       - HANDLE specified in the argument (hApp) is NULL.
3128 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid).
3129 ///       - Data size received by the HANDLE specified in the argument (hApp) is not the data size of
3130 ///       ProtocolOpenSessionAck message.
3131 ///       - Can not get the data and the data length received by the HANDLE specified in the argument (hApp).
3132 ///       - Size of the session name of the data received by the specified HANDLE (hApp) in the argument is more than
3133 ///       20byte.
3134 ///       - Not be able to acquire the memory of the buffer for the internal processing.
3135 ///       - Session name is NULL of data received by the HANDLE specified in the argument (hApp).
3136 ///       - It failed to generate the message queue name.
3137 ///       - It failed to open the message queue.
3138 /// \~english @par Detail
3139 ///       This API will be used in an asynchronous type specification. \n
3140 ///       Acquires received data ProtocolOpenSessionAck from HANDLE specified in the argument (hApp), \n
3141 ///       obtains the session HANDLE from the session name.
3142 /// \~english @par Classification
3143 ///          Public
3144 /// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId,
3145 ///                FrameworkunifiedGetSessionId
3146 ////////////////////////////////////////////////////////////////////////////////////
3147 HANDLE FrameworkunifiedGetOpenSessionHandle(HANDLE hApp);
3148
3149 /////////////////////////////////////////////////////////////////////////////////////
3150 /// \ingroup FrameworkunifiedGetOpenSessionSyncHandle
3151 /// \~english @par Brief
3152 ///       API to get the session ID without using the received data of ProtocolOpenSessionAck.
3153 /// \~english @param [in] hApp
3154 ///        HANDLE   - HANDLE for Application (FrameworkunifiedCreateDispatcherWithoutLoop() HANDLE acquired in)
3155 /// \~english @param [in] tAck
3156 ///        OpenSessionAck   - Pointer to the OpenSessionAck structure
3157 /// \~english @par
3158 ///        OpenSessionAck Structure
3159 /// \~english @code
3160 ///                 #define MAX_QUEUE_NAME_SIZE 20
3161 ///                 typedef struct _OpenSessionAck
3162 ///                 {
3163 ///                       EFrameworkunifiedStatus eStatus;                      /* Status               */
3164 ///                       UI_32 sessionId;                         /* Session ID           */
3165 ///                       CHAR  cSessionName[MAX_QUEUE_NAME_SIZE]; /* Session Name(20byte) */
3166 ///                       UI_32 sessionType;                       /* Session Type         */
3167 ///                 }OpenSessionAck;
3168 ///            @endcode
3169 /// \~english @retval HANDLE HANDLE for the session
3170 /// \~english @retval NULL   Failure to HANDLE acquisition for the session
3171 /// \~english @par Prerequisite
3172 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
3173 ///       done.
3174 /// \~english @par Change of internal state
3175 ///       - Change of internal state according to the API does not occur.
3176 /// \~english @par Conditions of processing failure
3177 ///       Under the following conditions, HANDLE is returned as NULL.
3178 ///       - HANDLE specified in the argument (hApp) is NULL.
3179 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid).
3180 ///       - Data size received by the HANDLE specified in the argument (hApp) is not the data size of
3181 ///       ProtocolOpenSessionAck message.
3182 ///       - Size of the session name of the data received by the specified HANDLE (hApp) in the argument is more than
3183 ///       20byte.
3184 ///       - Not be able to acquire the memory of the buffer for the internal processing.
3185 ///       - Session name is NULL of data received by the HANDLE specified in the argument (hApp).
3186 ///       - It failed to generate the message queue name.
3187 ///       - It failed to open the message queue.
3188 /// \~english @par Detail
3189 ///       This API is to be used at the time of the synchronous type specification. \n
3190 ///       Use the session name of OpenSessionAck structure specified by the argument, to get the session HANDLE.
3191 /// \~english @par Classification
3192 ///          Public
3193 /// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync, FrameworkunifiedCloseSessionSync, FrameworkunifiedGenerateNewSessionId,
3194 ///                FrameworkunifiedGetSessionId
3195 ////////////////////////////////////////////////////////////////////////////////////
3196 HANDLE FrameworkunifiedGetOpenSessionSyncHandle(HANDLE hApp, OpenSessionAck *tAck);
3197
3198 ////////////////////////////////////////////////////////////////////////////////////////////
3199 /// FrameworkunifiedGenerateSessionHandle
3200 /// API will be called by server on receiving the Open session request to Create session
3201 ///
3202 ///
3203 /// \param [in] hApp
3204 ///         HANDLE - Handle to the framework application
3205 /// \param [in] pServiceName
3206 ///         PCSTR - Service Name
3207 ///
3208 /// \return status
3209 ///         EFrameworkunifiedStatus - success or error
3210 ///
3211 ///
3212 /// \see FrameworkunifiedOpenSession, FrameworkunifiedCloseSession, FrameworkunifiedGenerateNewSessionId
3213 ///    FrameworkunifiedGetSessionId
3214 ///
3215 ///
3216 ////////////////////////////////////////////////////////////////////////////////////////////
3217 HANDLE FrameworkunifiedGenerateSessionHandle(HANDLE hApp, PCSTR pServiceName);
3218
3219 ////////////////////////////////////////////////////////////////////////////////////////////
3220 /// \ingroup FrameworkunifiedCloseSession
3221 /// \~english @par Brief
3222 ///       API to close the session.
3223 /// \~english @param [in] hService
3224 ///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
3225 /// \~english @param [in] hSession
3226 ///        HANDLE   - Handle to the session(FrameworkunifiedOpenSession HANDLE acquired in)
3227 /// \~english @retval eFrameworkunifiedStatusOK Success
3228 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
3229 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3230 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
3231 /// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
3232 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
3233 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
3234 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
3235 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
3236 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
3237 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
3238 /// \~english @par Prerequisite
3239 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
3240 ///       done.
3241 /// \~english @par Change of internal state
3242 ///       - Change of internal state according to the API does not occur.
3243 /// \~english @par Conditions of processing failure
3244 ///       - HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusNullPointer]
3245 ///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
3246 ///       - HANDLE specified in the argument (hSession) is NULL. [eFrameworkunifiedStatusNullPointer]
3247 ///       - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
3248 ///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
3249 ///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
3250 ///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
3251 ///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
3252 ///       [eFrameworkunifiedStatusInvldHandle]
3253 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
3254 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
3255 ///       [eFrameworkunifiedStatusInvldQName]
3256 ///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
3257 ///       [eFrameworkunifiedStatusInvldHndlType]
3258 ///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
3259 ///       - It is invalid transmission file descriptor of the session message to the service. [eFrameworkunifiedStatusErrNoEBADF]
3260 ///       - Interruption by the system call (signal) during the transmission of the session message to the service
3261 ///       occurs. [eFrameworkunifiedStatusErrNoEINTR]
3262 ///       - Size of the transmit buffer of the message for the session to the service is illegal.
3263 ///       [eFrameworkunifiedStatusInvldBufSize]
3264 ///       - Any errors occur during the transmission of a session message to the service. [eFrameworkunifiedStatusFail]
3265 ///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
3266 ///       - Message queue type of HANDLE specified in the argument (hSession) is mismatch.(eQTypeSender or
3267 ///       eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
3268 ///       - Failed to close message queue HANDLE specified in the argument (hSession). [eFrameworkunifiedStatusInvldHandle]
3269 /// \~english @par Detail
3270 ///       Send a message of the session close request to the service.\n
3271 ///       And close message queue of the session.
3272 ///       This is asynchronous API.
3273 /// \~english @par Classification
3274 ///          Public
3275 /// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedGetOpenSessionHandle
3276 ////////////////////////////////////////////////////////////////////////////////////////////
3277 EFrameworkunifiedStatus FrameworkunifiedCloseSession(HANDLE hService, HANDLE hSession);
3278
3279 ////////////////////////////////////////////////////////////////////////////////////////////
3280 /// \ingroup FrameworkunifiedCloseSessionSync
3281 /// \~english @par Brief
3282 ///       API to close the session (synchronous).
3283 /// \~english @param [in] hService
3284 ///        HANDLE   - Handle to the service(FrameworkunifiedOpenService HANDLE acquired in)
3285 /// \~english @param [in] hSession
3286 ///        HANDLE   - Handle to the session(FrameworkunifiedOpenSessionSync HANDLE acquired in)
3287 /// \~english @param [out] ack
3288 ///        CloseSessionAck   - Pointer to the response data of the session close
3289 /// \~english @par
3290 ///        CloseSessionAck Structure
3291 /// \~english @code
3292 ///                 typedef struct _CloseSessionAck
3293 ///                 {
3294 ///                       UI_32 sessionId;                         /* Session ID            */
3295 ///                       EFrameworkunifiedStatus eStatus;                      /* Status                */
3296 ///                 }CloseSessionAck;
3297 ///            @endcode
3298 /// \~english @retval eFrameworkunifiedStatusOK Success
3299 /// \~english @retval eFrameworkunifiedStatusNullPointer NULL pointer specified
3300 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
3301 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3302 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
3303 /// \~english @retval eFrameworkunifiedStatusInvldQName Illegal Message Queue name
3304 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
3305 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
3306 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
3307 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
3308 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
3309 /// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
3310 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
3311 /// \~english @retval eFrameworkunifiedStatusOK [eStatus in CloseSessionAck]Success in serivice side.
3312 /// \~english @retval eFrameworkunifiedStatusFail [eStatus in CloseSessionAck]Some sort of error occurred in service side.
3313 /// \~english @par Prerequisite
3314 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
3315 ///       done.
3316 /// \~english @par Change of internal state
3317 ///       - Change of internal state according to the API does not occur.
3318 /// \~english @par Conditions of processing failure (API)
3319 ///       - CloseSessionAck specified in the argument (ack) is NULL. [eFrameworkunifiedStatusInvldParam]
3320 ///       - HANDLE specified in the argument (Service) is NULL. [eFrameworkunifiedStatusNullPointer]
3321 ///       - HANDLE specified in the argument (hService) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
3322 ///       - HANDLE specified in the argument (hSession) is NULL. [eFrameworkunifiedStatusNullPointer]
3323 ///       - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [eFrameworkunifiedStatusNullPointer]
3324 ///       - It failed to open the message queue for the response received [eFrameworkunifiedStatusFail]
3325 ///       - Message queue HANDLE in HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
3326 ///       - HANDLE specified in the argument message queue HANDLE in (hService) is not appropriate (which is invalid).
3327 ///       [eFrameworkunifiedStatusInvldHandle]
3328 ///       - It fails to get the message storage buffer for the response received. [eFrameworkunifiedStatusFail]
3329 ///       - Random number generation to fail for the sequence ID of the message for transmission. [eFrameworkunifiedStatusFail]
3330 ///       - Message queue name of HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldHandle]
3331 ///       - Message queue name of HANDLE specified in the argument (hService) exceeds 20byte. [eFrameworkunifiedStatusInvldHandle]
3332 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) is NULL. [eFrameworkunifiedStatusInvldQName]
3333 ///       - Message queue HANDLE name in the HANDLE specified in the argument (hService) exceeds 20byte.
3334 ///       [eFrameworkunifiedStatusInvldQName]
3335 ///       - Message queue type of HANDLE specified in the argument (hService) is not a transmission type.
3336 ///       [eFrameworkunifiedStatusInvldHndlType]
3337 ///       - To the service session message queue is full. [eFrameworkunifiedStatusMsgQFull]
3338 ///       - It is invalid transmit and receive file descriptor of the session message to the service.
3339 ///       [eFrameworkunifiedStatusErrNoEBADF]
3340 ///       - Interruption by the system call (signal) occurs during the transmission and reception of the session message
3341 ///       to the service. [eFrameworkunifiedStatusErrNoEINTR]
3342 ///       - Size of the transmit buffer of the message for the session to the service is illegal.
3343 ///       [eFrameworkunifiedStatusInvldBufSize]
3344 ///       - Any errors occur during the sending and receiving of a session message to the service. [eFrameworkunifiedStatusFail]
3345 ///       - In the shared memory access for the session message to be sent to service failed. [eFrameworkunifiedStatusErrOther]
3346 ///       - It failed to Socket connection of the response message for the reception from the service. [eFrameworkunifiedStatusFail]
3347 ///       - The wait control of the response message received from the service failed. [eFrameworkunifiedStatusFail]
3348 ///       - Interruption by the system call (signal) to wait in the response message received from the service has
3349 ///       occurred. [eFrameworkunifiedStatusFail]
3350 ///       - In response message at the time of failure to receive from the service, it failed to re-connection of the
3351 ///       Socket. [eFrameworkunifiedStatusBadConnection]
3352 ///       - Failed to close message queue HANDLE specified in the argument (hSession). [eFrameworkunifiedStatusInvldHandle]
3353 ///       - Message queue type of HANDLE specified in the argument (hSession) is mismatch.(eQTypeSender or
3354 ///       eQTypeReveiver) [eFrameworkunifiedStatusInvldHndlType]
3355 /// \~english @par Conditions of processing failure (eStatus in CloseSessionAck)
3356 ///       - Any errors occur during in service side. [eFrameworkunifiedStatusFail]
3357 /// \~english @par Detail
3358 ///       Send a message synchronously of the session close request to the service.\n
3359 ///       And close message queue of the session.\n
3360 ///       The eStatus value in CloseSessionAck is dependent on service. So we indecates major return value.
3361 /// \~english @par Classification
3362 ///          Public
3363 /// \~english @see FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync
3364 ////////////////////////////////////////////////////////////////////////////////////////////
3365 EFrameworkunifiedStatus FrameworkunifiedCloseSessionSync(HANDLE hService, HANDLE hSession, CloseSessionAck *ack);
3366
3367 ////////////////////////////////////////////////////////////////////////////////////////////
3368 /// FrameworkunifiedGenerateNewSessionId
3369 /// Used on the Server side to get the next session id
3370 ///
3371 ///
3372 /// \return sessionID
3373 ///         UI_32 - session ID value
3374 ///
3375 ///
3376 /// \see FrameworkunifiedOpenSession, FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedCloseSession,
3377 ///    FrameworkunifiedGetSessionId
3378 ///
3379 ///
3380 ////////////////////////////////////////////////////////////////////////////////////////////
3381 UI_32 FrameworkunifiedGenerateNewSessionId();
3382
3383 ////////////////////////////////////////////////////////////////////////////////////////////
3384 /// \ingroup FrameworkunifiedGetSessionId
3385 /// \~english @par Brief
3386 ///        Returns the session id corresponding to the given session handle.
3387 /// \~english @param [in] hSession
3388 ///        HANDLE   - Handle to the session(FrameworkunifiedMcOpenSender HANDLE acquired in)
3389 /// \~english @retval UI_32 session ID value
3390 /// \~english @retval MAX_SESSION_ID_VAL Failed to get session ID value
3391 /// \~english @par Prerequisite
3392 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
3393 ///       done.
3394 /// \~english @par Change of internal state
3395 ///       - Change of internal state according to the API does not occur.
3396 /// \~english @par Conditions of processing failure
3397 ///       - HANDLE specified in the argument (hSession) is NULL. [MAX_SESSION_ID_VAL]
3398 ///       - HANDLE specified in the argument (hSession) is not appropriate (which is invalid). [MAX_SESSION_ID_VAL]
3399 /// \~english @par Detail
3400 ///        Returns the session id corresponding to the given session handle.
3401 /// \~english @par Classification
3402 ///          Public
3403 /// \~english @see FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithData, FrameworkunifiedOpenSessionWithDataSync, \n
3404 ///                 FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedGetOpenSessionSyncHandle, FrameworkunifiedGetCurrentSessionHandle, \n
3405 ///                 FrameworkunifiedMcOpenSender, FrameworkunifiedCreateSession
3406 ////////////////////////////////////////////////////////////////////////////////////////////
3407 UI_32 FrameworkunifiedGetSessionId(HANDLE hSession);
3408
3409 ////////////////////////////////////////////////////////////////////////////////////////////
3410 /// \ingroup FrameworkunifiedGetMsgSessionId
3411 /// \~english @par Brief
3412 ///        Get session ID from received message.
3413 /// \~english @param [in] hApp
3414 ///        HANDLE   - Handle for Application
3415 /// \~english @retval UI_32 session ID value
3416 /// \~english @retval MAX_SESSION_ID_VAL Failed to get session ID value
3417 /// \~english @par Prerequisite
3418 ///       - Generation/Initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) has been
3419 ///       done.
3420 /// \~english @par Change of internal state
3421 ///       - Change of internal state according to the API does not occur.
3422 /// \~english @par Conditions of processing failure
3423 ///       - HANDLE specified in the argument (hApp) is NULL. [MAX_SESSION_ID_VAL]
3424 ///       - HANDLE specified in the argument (hApp) is not appropriate (which is invalid). [MAX_SESSION_ID_VAL]
3425 /// \~english @par Detail
3426 ///        Get session ID from received message.\n
3427 ///        Mostly, this API is used to get session ID from message received by callback function that is registered to
3428 ///        Dispatcher.
3429 /// \~english @par Classification
3430 ///          Public
3431 /// \~english @see FrameworkunifiedGetSessionHandle
3432 ////////////////////////////////////////////////////////////////////////////////////////////
3433 UI_32 FrameworkunifiedGetMsgSessionId(HANDLE hApp);
3434
3435
3436
3437
3438
3439
3440
3441 ////////////////////////////////////////////////////////////////////////////////////////////
3442 //        Defer Message APIs
3443 ////////////////////////////////////////////////////////////////////////////////////////////
3444
3445
3446
3447 ////////////////////////////////////////////////////////////////////////////////////////////
3448 /// FrameworkunifiedGetDeferQueueCnt
3449 /// Get the number of messages in the defer queue
3450 ///
3451 ///
3452 /// \param [in] hApp
3453 ///         HANDLE - Handle to the App / Thread
3454 ///
3455 /// \return count
3456 ///         UI_32 - number of messages on Defered Queue
3457 ///
3458 ///
3459 /// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
3460 ///
3461 ///
3462 ////////////////////////////////////////////////////////////////////////////////////////////
3463 UI_32 FrameworkunifiedGetDeferQueueCnt(HANDLE hApp);
3464
3465
3466 ////////////////////////////////////////////////////////////////////////////////////////////
3467 /// \ingroup FrameworkunifiedIsDeferQueueEmpty
3468 /// \~english @par Brief
3469 ///        Empty determination of DeferQueue
3470 /// \~english @param [in] hApp
3471 ///        HANDLE   - Handle for Application
3472 /// \~english @retval BOOL DeferQueue status (TRUE: empty or FALSE: not empty)
3473 /// \~english @retval TRUE Judgment failure
3474 /// \~english @par Prerequisite
3475 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3476 /// \~english @par Change of internal state
3477 ///       - The internal state is not changed.
3478 /// \~english @par Conditions of processing failure
3479 ///       - If the hApp specified in the parameter is NULL, [TRUE]
3480 ///       - If the hApp specified in the arguments is not appropriate (not valid) [TRUE]
3481 /// \~english @par Detail
3482 ///        Returns whether the DeferQueue in the application-handle given by the arguments is empty
3483 /// \~english @par Classification
3484 ///          Public
3485 /// \~english @par Type
3486 ///          Not applicable
3487 /// \~english @see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
3488 /// FrameworkunifiedIsDeferQueueEmpty
3489 /// Get the number of messages in the defer queue
3490 ///
3491 ///
3492 /// \param [in] hApp
3493 ///         HANDLE - Handle to the App / Thread
3494 ///
3495 /// \return count
3496 ///         BOOL - Indicates if the defer queue is empty, TRUE (empty), FALSE (not empty)
3497 ///
3498 ///
3499 /// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage, FrameworkunifiedGetDeferQueueCnt
3500 ///
3501 ///
3502 ////////////////////////////////////////////////////////////////////////////////////////////
3503 BOOL FrameworkunifiedIsDeferQueueEmpty(HANDLE hApp);
3504
3505 ////////////////////////////////////////////////////////////////////////////////////////////
3506 /// \ingroup FrameworkunifiedDeferMessage
3507 /// \~english @par Brief
3508 ///        Push messages to the DeferQueue
3509 /// \~english @param [in] hApp
3510 ///        HANDLE   - Handle for Application
3511 /// \~english @retval eFrameworkunifiedStatusOK success
3512 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
3513 /// \~english @par Prerequisite
3514 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3515 /// \~english @par Change of internal state
3516 ///       - The internal state is not changed.
3517 /// \~english @par Conditions of processing failure
3518 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
3519 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
3520 /// \~english @par Detail
3521 ///        Push received messages in the application handles specified by the arguments to the DeferQueue.
3522 /// \~english @par Classification
3523 ///          Public
3524 /// \~english @par Type
3525 ///          Set Get
3526 /// \~english @see FrameworkunifiedRetrieveDeferMessage
3527 /// FrameworkunifiedDeferMessage
3528 /// Defers the current message; Pushes the message on to a defer msg queue
3529 ///
3530 ///
3531 /// \param [in] hApp
3532 ///         HANDLE - Handle to the App / Thread
3533 ///
3534 /// \return status
3535 ///         EFrameworkunifiedStatus - success or error
3536 ///
3537 ///
3538 /// \see FrameworkunifiedClearDeferMessages, FrameworkunifiedRetrieveDeferMessage
3539 ///
3540 ///
3541 ////////////////////////////////////////////////////////////////////////////////////////////
3542 EFrameworkunifiedStatus FrameworkunifiedDeferMessage(HANDLE hApp);
3543
3544
3545 ////////////////////////////////////////////////////////////////////////////////////////////
3546 /// FrameworkunifiedClearDeferMessages
3547 /// Clear all the defer messages
3548 ///
3549 ///
3550 /// \param [in] hApp
3551 ///         HANDLE - Handle to the App / Thread
3552 ///
3553 /// \return status
3554 ///         EFrameworkunifiedStatus - success or error
3555 ///
3556 ///
3557 /// \see FrameworkunifiedDeferMessage, FrameworkunifiedRetrieveDeferMessage
3558 ///
3559 ///
3560 ////////////////////////////////////////////////////////////////////////////////////////////
3561 EFrameworkunifiedStatus FrameworkunifiedClearDeferMessages(HANDLE hApp);
3562
3563
3564 ////////////////////////////////////////////////////////////////////////////////////////////
3565 /// \ingroup FrameworkunifiedRetrieveDeferMessage
3566 /// \~english @par Brief
3567 ///        Write Messages Registered in DeferQueue to FD
3568 /// \~english @param [in] hApp
3569 ///        HANDLE   - Handle for Application
3570 /// \~english @retval eFrameworkunifiedStatusOK success
3571 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
3572 /// \~english @par Prerequisite
3573 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3574 /// \~english @par Change of internal state
3575 ///       - The internal state is not changed.
3576 /// \~english @par Conditions of processing failure
3577 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
3578 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
3579 /// \~english @par Detail
3580 ///        Write the messages registered in the DeferQueue in the application handler specified by arguments to the FD.\n
3581 ///        This allows the main loop to receive the message.
3582 /// \~english @par Classification
3583 ///          Public
3584 /// \~english @par Type
3585 ///          Set Get
3586 /// \~english @see FrameworkunifiedDeferMessage
3587 /// FrameworkunifiedRetrieveDeferMessage
3588 /// Enables Checking for deferred message and retrieves messages when
3589 /// callback returns to the dispatcher.
3590 ///
3591 /// \param [in] hApp
3592 ///         HANDLE - Handle to the App / Thread
3593 ///
3594 /// \return status
3595 ///         EFrameworkunifiedStatus - success or error
3596 ///
3597 ///
3598 /// \see FrameworkunifiedDeferMessage, FrameworkunifiedClearDeferMessages
3599 ///
3600 ///
3601 ////////////////////////////////////////////////////////////////////////////////////////////
3602 EFrameworkunifiedStatus FrameworkunifiedRetrieveDeferMessage(HANDLE hApp);
3603
3604 // TODO(framework_unified) : clean up the old FrameworkunifiedRegisterPersistentStorage api's
3605 // 20110429_brp
3606 // defined for backward compatibility; will be removed once the persistence feature is finalized
3607 EFrameworkunifiedStatus FrameworkunifiedRegisterPersistentStorage(HANDLE hApp, PCSTR pFullFilePath);
3608 EFrameworkunifiedStatus FrameworkunifiedReleaseFileToPersistentStorage(HANDLE hApp, PCSTR pFullFilePath, BOOL persist);
3609
3610
3611
3612 ////////////////////////////////////////////////////////////////////////////////////////////
3613 /// \ingroup FrameworkunifiedRegisterEvent
3614 /// \~english @par Brief
3615 ///        Registering Applications for Delivery of Service-Specific Events
3616 /// \~english @param [in] hSession
3617 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
3618 /// \~english @param [in] uiEventId
3619 ///        UI_32   - Event ID (Identification ID on the service's protocol)
3620 /// \~english @retval eFrameworkunifiedStatusOK success
3621 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
3622 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3623 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
3624 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
3625 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
3626 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
3627 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
3628 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
3629 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
3630 /// \~english @par Prerequisite
3631 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3632 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
3633 /// \~english @par Change of internal state
3634 ///       - The internal state is not changed.
3635 /// \~english @par Conditions of processing failure
3636 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
3637 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
3638 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3639 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
3640 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
3641 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
3642 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3643 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
3644 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
3645 ///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
3646 ///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
3647 ///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
3648 ///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
3649 ///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
3650 /// \~english @par Detail
3651 ///        Issues a request for registering the application that executes this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the arguments.\n
3652 ///        The application specifies the type of events to receive in the uiEventId of arguments.\n
3653 ///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
3654 /// \~english @par
3655 ///        Please note the following points when using this API for application.
3656 ///       - This API is deprecated and should now use FrameworkunifiedSubscribeToSessionEventWithCallback.
3657 ///       - When this API is used, the application shall use a FrameworkunifiedAttachCallbackToDispatcher or the like to register callback functions in its own Dispatcher for handling events.
3658 /// \~english @par Classification
3659 ///          Public
3660 /// \~english @par Type
3661 ///          Pub-Sub
3662 /// \~english @see FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
3663 ///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
3664 ///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
3665 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
3666 ///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
3667 ///
3668 /// API to register for event of a service.
3669 /// This API is depricated, use FrameworkunifiedSubscribeToSessionEventWithCallback.
3670 ///
3671 /// \param [in] hSession
3672 ///         HANDLE - Handle to the application session
3673 /// \param [in] uiEventId
3674 ///     UI_32 - Event registering for.
3675 ///
3676 /// \return status
3677 ///         EFrameworkunifiedStatus - success or error
3678 ///
3679 /// \see FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents,
3680 /// FrameworkunifiedPublishEvent
3681 ////////////////////////////////////////////////////////////////////////////////////////////
3682 EFrameworkunifiedStatus FrameworkunifiedRegisterEvent(HANDLE hSession, UI_32 uiEventId);
3683
3684 ////////////////////////////////////////////////////////////////////////////////////////////
3685 /// \ingroup FrameworkunifiedRegisterEvents
3686 /// \~english @par Brief
3687 ///        Registering Applications for Delivery of Service-Specific Events
3688 /// \~english @param [in] hSession
3689 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
3690 /// \~english @param [in] puiEventsArray
3691 ///        PVOID   - The event ID to deliver (the identification ID on the service's protocol)
3692 /// \~english @param [in] uiListSize
3693 ///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
3694 /// \~english @retval eFrameworkunifiedStatusOK success
3695 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
3696 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3697 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
3698 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
3699 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
3700 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
3701 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
3702 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
3703 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
3704 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
3705 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
3706 /// \~english @par Prerequisite
3707 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3708 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
3709 /// \~english @par Change of internal state
3710 ///       - The internal state is not changed.
3711 /// \~english @par Conditions of processing failure
3712 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
3713 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
3714 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3715 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
3716 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
3717 ///       - When the array (puiEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
3718 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
3719 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3720 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
3721 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
3722 ///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
3723 ///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
3724 ///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
3725 ///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
3726 ///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
3727 ///       - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
3728 /// \~english @par Detail
3729 ///        Issues a request for registering the application that executes this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the arguments.\n
3730 ///        The application specifies more than one type of events to receive in the puiEventsArray of arguments.\n
3731 ///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
3732 /// \~english @par
3733 ///        Please note the following points when using this API for application.
3734 ///       - This API is deprecated and should now use FrameworkunifiedSubscribeToSessionEventsWithCallbacks.
3735 ///       - When this API is used, the application shall use a FrameworkunifiedAttachCallbackToDispatcher or the like to register callback functions in its own Dispatcher for handling events.
3736 ///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
3737 ///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
3738 /// \~english @par Classification
3739 ///          Public
3740 /// \~english @par Type
3741 ///          Pub-Sub
3742 /// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
3743 ///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
3744 ///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
3745 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
3746 ///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
3747 ///
3748 /// API to register for events of a service.
3749 /// This API is depricated, use FrameworkunifiedSubscribeToSessionEventsWithCallbacks.
3750 ///
3751 /// \param [in] hSession
3752 ///         HANDLE - Handle to the application session
3753 /// \param [in] puiEventsArray
3754 ///     PVOID - Array of events registering for.
3755 /// \param [in] uiListSize
3756 ///     UI_32 - count of elements in array.
3757 ///
3758 /// \return status
3759 ///         EFrameworkunifiedStatus - success or error
3760 ///
3761 /// \see FrameworkunifiedRegisterEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents,
3762 /// FrameworkunifiedPublishEvent
3763 ////////////////////////////////////////////////////////////////////////////////////////////
3764 EFrameworkunifiedStatus FrameworkunifiedRegisterEvents(HANDLE hSession, PVOID puiEventsArray, UI_32 uiListSize);
3765
3766 ////////////////////////////////////////////////////////////////////////////////////////////
3767 /// \ingroup FrameworkunifiedUnRegisterEvent
3768 /// \~english @par Brief
3769 ///        Unregistering Service-Specific Events from Delivery
3770 /// \~english @param [in] hSession
3771 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
3772 /// \~english @param [in] uiEventId
3773 ///        UI_32   - Event ID (Identification ID on the service's protocol)
3774 /// \~english @retval eFrameworkunifiedStatusOK success
3775 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
3776 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3777 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
3778 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
3779 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
3780 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
3781 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
3782 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
3783 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
3784 /// \~english @par Prerequisite
3785 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3786 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
3787 /// \~english @par Change of internal state
3788 ///       - The internal state is not changed.
3789 /// \~english @par Conditions of processing failure
3790 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
3791 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
3792 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3793 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
3794 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
3795 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
3796 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3797 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
3798 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
3799 ///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
3800 ///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
3801 ///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
3802 ///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
3803 ///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
3804 /// \~english @par Detail
3805 ///        Issues a request to unregister the application that executed this API from the delivery target of the service-specific event associated with the handle (hSession) specified in the arguments.\n
3806 ///        The application specifies events that are no longer needed for delivery in the uiEventId of arguments.\n
3807 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)
3808 /// \~english @par
3809 ///        Please note the following points when using this API for application.
3810 ///       - This API is deprecated and should now use FrameworkunifiedUnSubscribeSessionEventWithCallback.
3811 ///       - When this API is used, the application shall unregister callbacks for events registered in its own Dispatcher by means of FrameworkunifiedDetachCallbackFromDispatcher, etc.
3812 /// \~english @par Classification
3813 ///          Public
3814 /// \~english @par Type
3815 ///          Pub-Sub
3816 /// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvents,
3817 ///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
3818 ///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
3819 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
3820 ///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
3821 ///
3822 /// API to unregister from event of a service.
3823 /// This API is depricated, use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
3824 ///
3825 /// \param [in] hSession
3826 ///         HANDLE - Handle to the application session
3827 /// \param [in] uiEventId
3828 ///     UI_32 - Event registering for.
3829 ///
3830 /// \return status
3831 ///         EFrameworkunifiedStatus - success or error
3832 ///
3833 /// \see FrameworkunifiedUnRegisterEvents, FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedPublishEvent
3834 ////////////////////////////////////////////////////////////////////////////////////////////
3835 EFrameworkunifiedStatus FrameworkunifiedUnRegisterEvent(HANDLE hSession, UI_32 uiEventId);
3836
3837 ////////////////////////////////////////////////////////////////////////////////////////////
3838 /// \ingroup FrameworkunifiedUnRegisterEvents
3839 /// \~english @par Brief
3840 ///        Unregistering Service-Specific Events from Delivery
3841 /// \~english @param [in] hSession
3842 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
3843 /// \~english @param [in] puiEventsArray
3844 ///        PVOID   - The event ID to deliver (the identification ID on the service's protocol)
3845 /// \~english @param [in] uiListSize
3846 ///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
3847 /// \~english @retval eFrameworkunifiedStatusOK success
3848 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
3849 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3850 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
3851 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
3852 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
3853 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
3854 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
3855 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
3856 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
3857 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
3858 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
3859 /// \~english @par Prerequisite
3860 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3861 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
3862 /// \~english @par Change of internal state
3863 ///       - The internal state is not changed.
3864 /// \~english @par Conditions of processing failure
3865 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
3866 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
3867 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3868 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
3869 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
3870 ///       - When the array (puiEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
3871 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
3872 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3873 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
3874 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
3875 ///       - Message queue for sessions for services is full [eFrameworkunifiedStatusMsgQFull]
3876 ///       - Incorrect file descriptor for sending messages for sessions intended for the service [eFrameworkunifiedStatusErrNoEBADF]
3877 ///       - When an interrupt by a system call (signal) occurs while sending session-specific messages for services [eFrameworkunifiedStatusErrNoEINTR]
3878 ///       - Incorrect size of send buffers for sessions intended for services [eFrameworkunifiedStatusInvldBufSize]
3879 ///       - If there are any errors sending messages for sessions intended for the services [eFrameworkunifiedStatusFail]
3880 ///       - Failed to access shared memory for sending messages for sessions for services [eFrameworkunifiedStatusErrOther]
3881 /// \~english @par Detail
3882 ///        Issues a request to unregister the application that executed this API from the delivery target of the service-specific event associated with the handle (hSession) specified in the arguments.\n
3883 ///        The application specifies the unneeded events in the puiEventsArray of arguments.\n
3884 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)
3885 /// \~english @par
3886 ///        Please note the following points when using this API for application.
3887 ///       - This API is deprecated and should now use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
3888 ///       - After executing this API, the callback of the event registered in the Dispatcher of the application itself must be unregistered by FrameworkunifiedDetachCallbackFromDispatcher, etc.
3889 ///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
3890 ///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
3891 /// \~english @par Classification
3892 ///          Public
3893 /// \~english @par Type
3894 ///          Pub-Sub
3895 /// \~english @see FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent,
3896 ///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
3897 ///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
3898 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
3899 ///                 FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents
3900 ///
3901 /// API to unregister from events of a service.
3902 /// This API is depricated, use FrameworkunifiedUnSubscribeSessionEventsWithCallbacks.
3903 ///
3904 /// \param [in] hSession
3905 ///         HANDLE - Handle to the application session
3906 /// \param [in] puiEventsArray
3907 ///     PVOID - Array of events registering for.
3908 /// \param [in] uiListSize
3909 ///     UI_32 - count of elements in array.
3910 ///
3911 /// \return status
3912 ///         EFrameworkunifiedStatus - success or error
3913 ///
3914 /// \see FrameworkunifiedUnRegisterEvent, FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedPublishEvent
3915 ////////////////////////////////////////////////////////////////////////////////////////////
3916 EFrameworkunifiedStatus FrameworkunifiedUnRegisterEvents(HANDLE hSession, PVOID puiEventsArray, UI_32 uiListSize);
3917
3918 ////////////////////////////////////////////////////////////////////////////////////////////
3919 /// \ingroup FrameworkunifiedDefineStateEvents
3920 /// \~english @par Brief
3921 ///        Subscribing to Application-Specific Events in the Dispatcher
3922 /// \~english @param [in] hApp
3923 ///        HANDLE   - Handle for the application
3924 /// \~english @param [in] puiEvents
3925 ///        PVOID   - Pointer to an array (UI_32 arrays) of event IDs (identification IDs on the service protocol)
3926 /// \~english @param [in] uiListSize
3927 ///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
3928 /// \~english @retval eFrameworkunifiedStatusOK success
3929 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3930 /// \~english @par Prerequisite
3931 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3932 /// \~english @par Change of internal state
3933 ///       - The internal state is not changed.
3934 /// \~english @par Conditions of processing failure
3935 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
3936 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
3937 ///       - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
3938 /// \~english @par Detail
3939 ///        Register unique events in your Dispatcher that applications can deliver to other applications.\n
3940 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
3941 ///        For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPublicEvent.\n
3942 ///        Events are distributed to applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
3943 /// \~english @par
3944 ///        Please note the following points when using this API for application.
3945 ///       - This API is deprecated, use FrameworkunifiedDefinePublicStateEvents or FrameworkunifiedDefinePrivateStateEvents now.
3946 ///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
3947 ///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
3948 /// \~english @par Classification
3949 ///          Public
3950 /// \~english @par Type
3951 ///          Pub-Sub
3952 /// \~english @see FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
3953 ///                 FrameworkunifiedPublishEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishPublicEvent, FrameworkunifiedPublishPrivateEvent
3954 ///                 FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
3955 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
3956 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks,
3957 ///
3958 /// API to define the state events of the service.
3959 /// This API is depricated, use FrameworkunifiedDefinePublicStateEvents or FrameworkunifiedDefinePrivateStateEvents.
3960 ///
3961 /// \param [in] hApp
3962 ///         HANDLE - Handle to the application framework
3963 /// \param [in] puiEvents
3964 ///     PVOID - Array of state events or single state event.
3965 /// \param [in] uiListSize
3966 ///     UI_32 - size of events list.
3967 ///
3968 /// \return status
3969 ///         EFrameworkunifiedStatus - success or error
3970 ///
3971 /// \see FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishEvent, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
3972 ////////////////////////////////////////////////////////////////////////////////////////////
3973 EFrameworkunifiedStatus FrameworkunifiedDefineStateEvents(HANDLE hApp, PVOID puiEvents, UI_32 uiListSize);
3974
3975 ////////////////////////////////////////////////////////////////////////////////////////////
3976 /// \ingroup FrameworkunifiedPublishEvent
3977 /// \~english @par Brief
3978 ///        Deliver application-specific events
3979 /// \~english @param [in] hApp
3980 ///        HANDLE   - Handle for the application
3981 /// \~english @param [in] uiEventId
3982 ///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
3983 /// \~english @param [in] pClientName
3984 ///        PCSTR   - Destination application name (distributed to all registered applications when NULL is specified),
3985 /// \~english @param [in] pData
3986 ///        PCVOID   - Pointer to trasmission data
3987 /// \~english @param [in] iLength
3988 ///        UI_32   - Transmission data length
3989 /// \~english @retval eFrameworkunifiedStatusOK success
3990 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
3991 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
3992 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
3993 /// \~english @par Prerequisite
3994 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
3995 ///       - The events to be delivered must be specified in a FrameworkunifiedDefinePublicStateEvents, etc.
3996 /// \~english @par Change of internal state
3997 ///       - The internal state is not changed.
3998 /// \~english @par Conditions of processing failure
3999 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4000 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4001 ///       - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
4002 ///       - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
4003 ///       - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
4004 ///       - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
4005 ///       - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
4006 ///       - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
4007 ///       - When the send data length (iLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL, [eFrameworkunifiedStatusErrOther]
4008 ///       - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
4009 ///       - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
4010 ///       - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
4011 ///       - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
4012 ///       - When the message queue is full [eFrameworkunifiedStatusErrOther]
4013 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
4014 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
4015 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
4016 ///       - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
4017 ///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
4018 /// \~english @par Detail
4019 ///        Delivers application-specific events to subscribed applications.\n
4020 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
4021 ///        The delivery destination of events is the application specified by the argument pClientName or (when the argument pClientName is NULL)
4022 ///        all the applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks etc.\n
4023 ///        The data (pData) to be distributed is the same for all distribution destinations.
4024 /// \~english @par
4025 ///        Please note the following points when using this API for application.\n
4026 ///       - Operation cannot be guaranteed if the size of the area indicated by the pointer (pData) address to the send data does not match the size specified by the send data length (iLength) address.
4027 /// \~english @par
4028 ///        This API is deprecated, use FrameworkunifiedPublishPublicEvent or FrameworkunifiedPublishPrivateEvent now.
4029 /// \~english @par Classification
4030 ///          Public
4031 /// \~english @par Type
4032 ///          Pub-Sub
4033 /// \~english @see FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents,
4034 ///                 FrameworkunifiedBroadcastEvent, FrameworkunifiedPublishPublicEvent,
4035 ///                 FrameworkunifiedRegisterEvent, FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
4036 ///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
4037 ///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
4038 ///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
4039 ///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
4040 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
4041 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4042 ///
4043 /// This API is used to publish the event to one of the client subscribed to this event.
4044 /// This API can be used to publish the event to all the clients subscribed to this event by
4045 /// passing pClientName as NULL.
4046 /// This API is depricated, use FrameworkunifiedPublishPrivateEvent or FrameworkunifiedPublishPublicEvent.
4047 ///
4048 /// \param [in] hApp
4049 ///         HANDLE - Handle to the application framework
4050 /// \param [in] uiEventId
4051 ///         UI_32 - Event id of Message
4052 /// \param [in] pClientName
4053 ///         PCSTR - Name of the client
4054 /// \param [in] pData
4055 ///         PCVOID - Data buffer
4056 /// \param [in] iLength
4057 ///         UI_32 - Size of data buffer
4058 ///
4059 /// \return status
4060 ///         EFrameworkunifiedStatus - success or error
4061 ///
4062 /// \see FrameworkunifiedRegisterEvent, FrameworkunifiedBroadcastEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
4063 ////////////////////////////////////////////////////////////////////////////////////////////
4064 EFrameworkunifiedStatus FrameworkunifiedPublishEvent(HANDLE hApp, UI_32 uiEventId, PCSTR pClientName, PCVOID pData, UI_32 iLength);
4065
4066 ////////////////////////////////////////////////////////////////////////////////////////////
4067 /// \ingroup FrameworkunifiedBroadcastEvent
4068 /// \~english @par Brief
4069 ///        Broadcast application-specific events
4070 /// \~english @param [in] hApp
4071 ///        HANDLE   - Handle for the application
4072 /// \~english @param [in] uiEventId
4073 ///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
4074 /// \~english @param [in] pData
4075 ///        PCVOID   - Pointer to trasmission data
4076 /// \~english @param [in] iLength
4077 ///        UI_32   - Transmission data length
4078 /// \~english @retval eFrameworkunifiedStatusOK success
4079 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
4080 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
4081 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors
4082 /// \~english @par Prerequisite
4083 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4084 ///       - The events to be delivered must be specified in a FrameworkunifiedDefinePublicStateEvents, etc.
4085 /// \~english @par Change of internal state
4086 ///       - The internal state is not changed.
4087 /// \~english @par Conditions of processing failure
4088 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusNullPointer]
4089 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusNullPointer]
4090 ///       - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
4091 ///       - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
4092 ///       - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
4093 ///       - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
4094 ///       - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
4095 ///       - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
4096 ///       - When the send data length (iLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL, [eFrameworkunifiedStatusErrOther]
4097 ///       - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
4098 ///       - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
4099 ///       - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
4100 ///       - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
4101 ///       - When the message queue is full [eFrameworkunifiedStatusErrOther]
4102 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
4103 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
4104 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
4105 ///       - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
4106 /// \~english @par Detail
4107 ///        Broadcast application-specific events to all registered applications.\n
4108 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
4109 ///        Events are delivered to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
4110 ///        The data (pData) to be distributed is the same for all distribution destinations.
4111 /// \~english @par
4112 ///        This API is deprecated and should now use FrameworkunifiedPublishPublicEvent.
4113 /// \~english @par Classification
4114 ///          Public
4115 /// \~english @par Type
4116 ///          Pub-Sub
4117 /// \~english @see FrameworkunifiedDefineStateEvents, FrameworkunifiedDefinePublicStateEvents,
4118 ///                 FrameworkunifiedPublishEvent, FrameworkunifiedPublishPublicEvent,
4119 ///                 FrameworkunifiedRegisterEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents,
4120 ///                 FrameworkunifiedAttachCallbacksToDispatcher, FrameworkunifiedAttachCallbackToDispatcher,
4121 ///                 FrameworkunifiedAttachCallbacksToDispatcherWithFd, FrameworkunifiedAttachCallbackToDispatcherWithFd,
4122 ///                 FrameworkunifiedDetachCallbackFromDispatcher, FrameworkunifiedDetachCallbacksFromDispatcher,
4123 ///                 FrameworkunifiedDetachCallbackFromDispatcherWithFd, FrameworkunifiedDetachCallbacksFromDispatcherWithFd,
4124 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
4125 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4126 ///
4127 /// This API is used to publish the event to all the clients subscribed to this event.
4128 /// This API is depricated, use FrameworkunifiedPublishPublicEvent.
4129 ///
4130 /// \param [in] hApp
4131 ///         HANDLE - Handle to the application framework
4132 /// \param [in] uiEventId
4133 ///         UI_32 - Event id of Message
4134 /// \param [in] pData
4135 ///         PCVOID - Data buffer
4136 /// \param [in] iLength
4137 ///         UI_32 - Size of data buffer
4138 ///
4139 /// \return status
4140 ///         EFrameworkunifiedStatus - success or error
4141 ///
4142 /// \see FrameworkunifiedRegisterEvent, FrameworkunifiedPublishEvent, FrameworkunifiedDefineStateEvents, FrameworkunifiedUnRegisterEvent, FrameworkunifiedUnRegisterEvents
4143 ////////////////////////////////////////////////////////////////////////////////////////////
4144 EFrameworkunifiedStatus FrameworkunifiedBroadcastEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 iLength);
4145
4146 ////////////////////////////////////////////////////////////////////////////////////////////
4147 /// \ingroup FrameworkunifiedDefinePublicStateEvents
4148 /// \~english @par Brief
4149 ///        Subscribing to Application-Specific Events in the Dispatcher
4150 /// \~english @param [in] hApp
4151 ///        HANDLE   - Handle for the application
4152 /// \~english @param [in] puiEvents
4153 ///        PUI_32   - The event ID to deliver (the identification ID on the service's protocol)
4154 /// \~english @param [in] uiListSize
4155 ///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
4156 /// \~english @retval eFrameworkunifiedStatusOK success
4157 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4158 /// \~english @par Prerequisite
4159 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4160 /// \~english @par Change of internal state
4161 ///       - The internal state is not changed.
4162 /// \~english @par Conditions of processing failure
4163 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4164 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4165 ///       - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4166 /// \~english @par Detail
4167 ///        Register unique events in your Dispatcher that applications can deliver to other applications.\n
4168 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
4169 ///        For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPublicEvent.\n
4170 ///        Events are distributed to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
4171 /// \~english @par
4172 ///        The difference from FrameworkunifiedDefinePrivateStateEvents is that when the Dispatcher distributes events registered by this API, the same data is distributed to all registered applications.
4173 /// \~english @par
4174 ///        Please note the following points when using this API for application.
4175 ///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
4176 ///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
4177 ///       - FrameworkunifiedDefinePrivateStateEvents should be used to deliver individual data by registered application sessions.
4178 /// \~english @par Classification
4179 ///          Public
4180 /// \~english @par Type
4181 ///          Pub-Sub
4182 /// \~english @see FrameworkunifiedPublishPublicEvent, FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedPublishPrivateEvent,
4183 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
4184 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4185 ///
4186 /// This API is used to define the public state events of the service.
4187 /// Public Event means the data associated with the event will be same for all the clients
4188 /// subscribed to it.
4189 ///
4190 /// \param [in] hApp
4191 ///         HANDLE - Handle to the application framework
4192 /// \param [in] puiEvents
4193 ///     PUI_32 - Array of state events or single state event.
4194 /// \param [in] uiListSize
4195 ///     UI_32 - size of events list.
4196 ///
4197 /// \return status
4198 ///         EFrameworkunifiedStatus - success or error
4199 ///
4200 /// \see FrameworkunifiedDefinePrivateStateEvents
4201 ////////////////////////////////////////////////////////////////////////////////////////////
4202 EFrameworkunifiedStatus FrameworkunifiedDefinePublicStateEvents(HANDLE hApp, PUI_32 puiEvents, UI_32 uiListSize);
4203
4204 ////////////////////////////////////////////////////////////////////////////////////////////
4205 /// \ingroup FrameworkunifiedDefinePrivateStateEvents
4206 /// \~english @par Brief
4207 ///        Subscribing to Application-Specific Events in the Dispatcher
4208 /// \~english @param [in] hApp
4209 ///        HANDLE   - Handle for the application
4210 /// \~english @param [in] puiEvents
4211 ///        PUI_32   - The event ID to deliver (the identification ID on the service's protocol)
4212 /// \~english @param [in] uiListSize
4213 ///        UI_32   - Number of elements in the event ID array (0 to 4294967295)
4214 /// \~english @retval eFrameworkunifiedStatusOK success
4215 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4216 /// \~english @par Prerequisite
4217 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4218 /// \~english @par Change of internal state
4219 ///       - The internal state is not changed.
4220 /// \~english @par Conditions of processing failure
4221 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4222 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4223 ///       - When the array (puiEvents) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4224 /// \~english @par Detail
4225 ///        Register unique events in your Dispatcher that applications can deliver to other applications.\n
4226 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
4227 ///        For application-specific events registered by this API, the event is delivered by Dispatcher when the application executes the FrameworkunifiedPublishPrivateEvent.\n
4228 ///        Events are distributed to applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
4229 /// \~english @par
4230 ///        The difference from FrameworkunifiedDefinePublicStateEvents is that when the Dispatcher distributes events registered by this API, it distributes individual data by sessions of the registered application.
4231 /// \~english @par
4232 ///        Please note the following points when using this API for application.
4233 ///       - The maximum number of event IDs that can be registered depends on the size that can be allocated as the area for the event ID array.\n
4234 ///         Therefore, the API caller should consider the size of the event ID array and define the number of event IDs (uiListSize).
4235 ///       - Use FrameworkunifiedDefinePublicStateEvents to deliver broadcasts to all registered applications.
4236 /// \~english @par Classification
4237 ///          Public
4238 /// \~english @par Type
4239 ///          Pub-Sub
4240 /// \~english @see FrameworkunifiedPublishPrivateEvent, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedPublishPublicEvent,
4241 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
4242 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4243 ///
4244 /// This API is used to define the private state events of the service.
4245 /// Private event means the data associated with the event will be specific for
4246 /// every session of all the clients on which it has subscribed.
4247 ///
4248 /// \param [in] hApp
4249 ///         HANDLE - Handle to the application framework
4250 /// \param [in] puiEvents
4251 ///     PUI_32 - Array of state events or single state event.
4252 /// \param [in] uiListSize
4253 ///     UI_32 - size of events list.
4254 ///
4255 /// \return status
4256 ///         EFrameworkunifiedStatus - success or error
4257 ///
4258 /// \see FrameworkunifiedDefinePublicStateEvents
4259 ////////////////////////////////////////////////////////////////////////////////////////////
4260 EFrameworkunifiedStatus FrameworkunifiedDefinePrivateStateEvents(HANDLE hApp, PUI_32 puiEvents, UI_32 uiListSize);
4261
4262 ////////////////////////////////////////////////////////////////////////////////////////////
4263 /// \ingroup FrameworkunifiedSubscribeToSessionEventWithCallback
4264 /// \~english @par Brief
4265 ///        Register delivery of service-specific events and set callback for receiving events
4266 /// \~english @param [in] hApp
4267 ///        HANDLE   - Handle for the application
4268 /// \~english @param [in] uiEventId
4269 ///        UI_32   - Event ID (Identification ID on the service protocol) (PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD)
4270 /// \~english @param [in] fpOnCmd
4271 ///        CbFuncPtr   - Pointer to callback function when event is received
4272 /// \~english @param [in] hSession
4273 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
4274 /// \~english @retval eFrameworkunifiedStatusOK success
4275 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4276 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
4277 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
4278 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
4279 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
4280 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
4281 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
4282 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
4283 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
4284 /// \~english @par Prerequisite
4285 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4286 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
4287 /// \~english @par Change of internal state
4288 ///       - The internal state is not changed.
4289 /// \~english @par Conditions of processing failure
4290 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4291 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4292 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4293 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4294 ///       - If the callback function pointer (fpOnCmd) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
4295 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4296 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
4297 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
4298 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
4299 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4300 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
4301 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
4302 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
4303 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
4304 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
4305 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
4306 ///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
4307 /// \~english @par Detail
4308 ///        Sets the callback function for the event ID (iCmd) specified in the application Dispatcher.\n
4309 ///        Then, it issues a request for registering the application that executed this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the argument.\n
4310 ///        The application specifies the type of event to be received from the service by the event ID (uiEventId) of the arguments.\n
4311 ///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
4312 /// \~english @par Classification
4313 ///          Public
4314 /// \~english @par Type
4315 ///          Pub-Sub
4316 /// \~english @see FrameworkunifiedSubscribeToSessionEventsWithCallbacks, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
4317 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4318 ///
4319 /// This API is used for subscribing to single event of a service.
4320 /// This API also attaches the session event with callback.
4321 ///
4322 /// \param [in] hApp
4323 ///         HANDLE - Application handle
4324 /// \param [in] uiEventId
4325 ///     UI_32 - Event id
4326 /// \param [in] fpOnCmd
4327 ///     CbFuncPtr - pointer to callback function
4328 /// \param [in] hSession
4329 ///     HANDLE - Session handle
4330 ///
4331 /// \return status
4332 ///         EFrameworkunifiedStatus - success or error
4333 ///
4334 /// \see FrameworkunifiedSubscribeToSessionEventsWithCallbacks
4335 ////////////////////////////////////////////////////////////////////////////////////////////
4336 EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventWithCallback(HANDLE hApp, UI_32 uiEventId, CbFuncPtr fpOnCmd, HANDLE hSession);
4337
4338 ////////////////////////////////////////////////////////////////////////////////////////////
4339 /// \ingroup FrameworkunifiedSubscribeToSessionEventsWithCallbacks
4340 /// \~english @par Brief
4341 ///        Registering multiple service-specific events for delivery and configuring callback settings when an event is received
4342 /// \~english @param [in] hApp
4343 ///        HANDLE   - Handle for the application
4344 /// \~english @param [in] pEventHandler
4345 ///        const FrameworkunifiedProtocolCallbackHandler* - Pointer to array of event handler structure
4346 /// \~english @param [in] uiHandlerCount
4347 ///        UI_32   - Number of event handlers to register (0 to 214748362)
4348 /// \~english @param [in] hSession
4349 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
4350 /// \~english @par
4351 ///        FrameworkunifiedProtocolCallbackHandler Structure
4352 /// \~english @code
4353 ///            typedef struct _FrameworkunifiedProtocolCallbackHandler
4354 ///            {
4355 ///                  UI_32 iCmd;            /* Event ID (Identification ID on the service's protocol) */
4356 ///                  CbFuncPtr callBack;    /* Reference to an XML stream       */
4357 ///            }FrameworkunifiedProtocolCallbackHandler;
4358 ///            @endcode
4359 /// \~english @retval eFrameworkunifiedStatusOK success
4360 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4361 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
4362 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
4363 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
4364 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
4365 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
4366 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
4367 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
4368 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
4369 /// \~english @par Prerequisite
4370 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4371 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
4372 /// \~english @par Change of internal state
4373 ///       - The internal state is not changed.
4374 /// \~english @par Conditions of processing failure
4375 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4376 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4377 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4378 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4379 ///       - When the event handler structure array (pEventHandler) specified by arguments is NULL, [eFrameworkunifiedStatusInvldParam]
4380 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4381 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
4382 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
4383 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
4384 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4385 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
4386 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
4387 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
4388 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
4389 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
4390 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
4391 ///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
4392 ///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
4393 /// \~english @par Detail
4394 ///        Sets the callback functions for the IDs specified by the pEventHandler arguments in the Dispatcher of the application.\n
4395 ///        Then, it issues a request for registering the application that executed this API to the delivery target of the device-specific events of the service associated with the handle (hSession) specified in the argument.\n
4396 ///        The application specifies the type of event to be received from the service by the event ID.\n
4397 ///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
4398 /// \~english @par
4399 ///        Please note the following points when using this API for application.\n
4400 ///       - If the callback function pointer in the event handler structure (pEventHandler) specified in the arguments is NULL, the callback function up to NULL is registered.\n
4401 ///         Later, FrameworkunifiedSendMsg() is executed inside this API, and the result becomes the return code of this API.\n
4402 ///         Do not set NULL in the callback function pointer because operation cannot be guaranteed.
4403 /// \~english @par Classification
4404 ///          Public
4405 /// \~english @par Type
4406 ///          Pub-Sub
4407 /// \~english @see FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
4408 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4409 ///
4410 /// This API is used for subscribing to multiple events of a service.
4411 /// This API also attaches the session event with callbacks.
4412 ///
4413 /// \param [in] hApp
4414 ///         HANDLE - Application handle
4415 /// \param [in] pEventHandler
4416 ///     FrameworkunifiedProtocolCallbackHandler - Array of event handler structures
4417 /// \param [in] uiHandlerCount
4418 ///     UI_32 - number of event handlers
4419 /// \param [in] hSession
4420 ///     HANDLE - Session handle
4421 ///
4422 /// \return status
4423 ///         EFrameworkunifiedStatus - success or error
4424 ///
4425 /// \see FrameworkunifiedSubscribeToSessionEventWithCallback
4426 ////////////////////////////////////////////////////////////////////////////////////////////
4427 EFrameworkunifiedStatus FrameworkunifiedSubscribeToSessionEventsWithCallbacks(HANDLE hApp, const FrameworkunifiedProtocolCallbackHandler *pEventHandler,
4428                                                     UI_32 uiHandlerCount, HANDLE hSession);
4429
4430 ////////////////////////////////////////////////////////////////////////////////////////////
4431 /// \ingroup FrameworkunifiedUnSubscribeSessionEventWithCallback
4432 /// \~english @par Brief
4433 ///        Undeliver service-specific events and delete callbacks when events are received
4434 /// \~english @param [in] hApp
4435 ///        HANDLE   - Handle for the application
4436 /// \~english @param [in] uiEventId
4437 ///        UI_32   - Event ID (Identification ID on the service protocol) (PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD)
4438 /// \~english @param [in] hSession
4439 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
4440 /// \~english @retval eFrameworkunifiedStatusOK success
4441 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4442 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
4443 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
4444 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
4445 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
4446 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
4447 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
4448 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
4449 /// \~english @par Prerequisite
4450 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4451 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
4452 /// \~english @par Change of internal state
4453 ///       - The internal state is not changed.
4454 /// \~english @par Conditions of processing failure
4455 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4456 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4457 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4458 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4459 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4460 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
4461 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
4462 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
4463 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4464 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
4465 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
4466 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
4467 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
4468 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
4469 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
4470 ///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
4471 ///       - If the service specified by the parameter hSession is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
4472 /// \~english @par Detail
4473 ///        Issues a request to unregister the application that executed this API from the delivery target of device-specific events
4474 ///        of services associated with the handle (hSession) specified in the arguments.\n
4475 ///        Then, the callback functions for the specified event ID (iCmd) are deleted from the application Dispatcher.\n
4476 ///        The application specifies the type of event to be undelivered from the service by the event ID (uiEventId) of the arguments.\n
4477 ///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message.
4478 ///        The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
4479 /// \~english @par Classification
4480 ///          Public
4481 /// \~english @par Type
4482 ///          Pub-Sub
4483 /// \~english @see FrameworkunifiedUnSubscribeSessionEventsWithCallbacks, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
4484 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks
4485 ///
4486 /// API to unsubscribe from event of a service. Also detaches callback.
4487 ///
4488 /// \param [in] hApp
4489 ///         HANDLE - Application Handle
4490 /// \param [in] uiEventId
4491 ///     UI_32 - Event id
4492 /// \param [in] hSession
4493 ///         HANDLE - Session Handle
4494 ///
4495 /// \return status
4496 ///         EFrameworkunifiedStatus - success or error
4497 ///
4498 /// \see FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4499 ////////////////////////////////////////////////////////////////////////////////////////////
4500 EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventWithCallback(HANDLE hApp, UI_32 uiEventId, HANDLE hSession);
4501
4502 ////////////////////////////////////////////////////////////////////////////////////////////
4503 /// \ingroup FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4504 /// \~english @par Brief
4505 ///        Undeliver multiple service-specific events and delete callbacks when an event is received
4506 /// \~english @param [in] hApp
4507 ///        HANDLE   - Handle for the application
4508 /// \~english @param [in] pEventsArray
4509 ///        PUI_32   - Pointer to an array of Event IDs (Identification IDs in the service's protocol)
4510 /// \~english @param [in] uiListSize
4511 ///        UI_32   - Number of elements in the event ID (identification ID in the service protocol) array (1 to 1073741813)
4512 /// \~english @param [in] hSession
4513 ///        HANDLE   - Handles for sessions (obtained by FrameworkunifiedOpenSession)
4514 /// \~english @retval eFrameworkunifiedStatusOK success
4515 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4516 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
4517 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
4518 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
4519 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
4520 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
4521 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
4522 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
4523 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
4524 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
4525 /// \~english @par Prerequisite
4526 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4527 ///       - Services and sessions are established (FrameworkunifiedOpenSession)
4528 /// \~english @par Change of internal state
4529 ///       - The internal state is not changed.
4530 /// \~english @par Conditions of processing failure
4531 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4532 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4533 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4534 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4535 ///       - When the message queue handle in the handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4536 ///       - If the application name in the handler (hSession) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
4537 ///       - When the message queue handle specified in the argument (hSession) is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
4538 ///       - When the array (pEventsArray) of event IDs specified by arguments is NULL, [eFrameworkunifiedStatusInvldBuf]
4539 ///       - When the name of the application in the handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
4540 ///       - When the name of the message queue in the handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4541 ///       - When the name of the message queue in the handle (hSession) specified in the argument exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
4542 ///       - When the message queue type of the handle (hSession) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
4543 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
4544 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
4545 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
4546 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
4547 ///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
4548 ///       - When the number of elements (uiListSize) of the event ID array specified by the arguments is 0, [eFrameworkunifiedStatusInvldParam]
4549 ///       - If the service specified by the parameter hSession is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
4550 /// \~english @par Detail
4551 ///        Issues a request to unregister the application that executed this API from the delivery target of the plurality of unique events of the service associated with the handle (hSession) specified by the argument.\n
4552 ///        Then, the callback functions for the IDs specified in the pEventsArray arguments are deleted from the application Dispatcher.\n
4553 ///        The application specifies the type of event to be undelivered from the service by the event ID (pEventsArray) of the arguments.\n
4554 ///        (The event ID of this API refers to the identification ID on the protocol of the service, and the application identifies the content of the message. The specifiable service-specific events are events set by the service, such as the FrameworkunifiedDefinePublicStateEvents.)
4555 /// \~english @par Classification
4556 ///          Public
4557 /// \~english @par Type
4558 ///          Pub-Sub
4559 /// \~english @see FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents,
4560 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks
4561 ///
4562 /// API to unsubscribe from multiple events of a service. Also detaches callbacks.
4563 ///
4564 /// \param [in] hApp
4565 ///         HANDLE - Application Handle
4566 /// \param [in] pEventsArray
4567 ///     PUI_32 - Array of events id's.
4568 /// \param [in] uiListSize
4569 ///     UI_32 - count of elements in array.
4570 /// \param [in] hSession
4571 ///         HANDLE - Session Handle
4572 ///
4573 /// \return status
4574 ///         EFrameworkunifiedStatus - success or error
4575 ///
4576 /// \see FrameworkunifiedUnSubscribeSessionEventWithCallback
4577 ////////////////////////////////////////////////////////////////////////////////////////////
4578 EFrameworkunifiedStatus FrameworkunifiedUnSubscribeSessionEventsWithCallbacks(HANDLE hApp, PUI_32 pEventsArray, UI_32 uiListSize,
4579                                                     HANDLE hSession);
4580
4581 ////////////////////////////////////////////////////////////////////////////////////////////
4582 /// \ingroup FrameworkunifiedPublishPublicEvent
4583 /// \~english @par Brief
4584 ///        Broadcast application-specific events
4585 /// \~english @param [in] hApp
4586 ///        HANDLE   - Handle for the application
4587 /// \~english @param [in] uiEventId
4588 ///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
4589 /// \~english @param [in] pData
4590 ///        PCVOID   - Pointer to trasmission data
4591 /// \~english @param [in] uiLength
4592 ///        UI_32   - Transmission data length
4593 /// \~english @retval eFrameworkunifiedStatusOK success
4594 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4595 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
4596 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
4597 /// \~english @par Prerequisite
4598 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4599 ///       - The events to be delivered must be specified in the FrameworkunifiedDefinePublicStateEvents.
4600 /// \~english @par Change of internal state
4601 ///       - The internal state is not changed.
4602 /// \~english @par Conditions of processing failure
4603 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
4604 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
4605 ///       - When the application name of the delivery destination in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
4606 ///       - Sessioninformation is not found with the application being delivered to within the handles (hApp) specified in the arguments. [eFrameworkunifiedStatusErrOther]
4607 ///       - If the destination handles are inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
4608 ///       - If the message queue handle in the destination handle is NULL [eFrameworkunifiedStatusErrOther]
4609 ///       - If the application name in the destination handles is not set, [eFrameworkunifiedStatusErrOther]
4610 ///       - If the message queue handle in the destination handle is inappropriate (disabled) [eFrameworkunifiedStatusErrOther]
4611 ///       - When the send data length (uiLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL [eFrameworkunifiedStatusErrOther]
4612 ///       - When the name of the application in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
4613 ///       - When the name of the message queue in the destination handle is NULL, [eFrameworkunifiedStatusErrOther]
4614 ///       - When the name of the message queue in the destination handle exceeds 20 bytes [eFrameworkunifiedStatusErrOther]
4615 ///       - If the message queue type of the destination handler is not the send type [eFrameworkunifiedStatusErrOther]
4616 ///       - When the message queue is full [eFrameworkunifiedStatusErrOther]
4617 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrOther]
4618 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrOther]
4619 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusErrOther]
4620 ///       - If there are any errors sending messages [eFrameworkunifiedStatusErrOther]
4621 ///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
4622 /// \~english @par Detail
4623 ///        Broadcast application-specific events to subscribed applications.\n
4624 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
4625 ///        Events are delivered to all applications registered by FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.\n
4626 ///        The data (pData) to be distributed is the same for all distribution destinations.
4627 /// \~english @par
4628 ///        FrameworkunifiedPublishPrivateEvent should be used to deliver individual data by registered application sessions.
4629 /// \~english @par Classification
4630 ///          Public
4631 /// \~english @par Type
4632 ///          Pub-Sub
4633 /// \~english @see FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedPublishPrivateEvent,
4634 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
4635 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4636 ///
4637 /// This API is used to publish the event to all the client over all the session it is subscribed to.
4638 ///
4639 /// \param [in] hApp
4640 ///         HANDLE - Handle to the application framework
4641 /// \param [in] uiEventId
4642 ///         UI_32 - Event id of Message
4643 /// \param [in] pData
4644 ///         PCVOID - Data buffer
4645 /// \param [in] uiLength
4646 ///         UI_32 - Size of data buffer
4647 ///
4648 /// \return status
4649 ///         EFrameworkunifiedStatus - success or error
4650 ///
4651 /// \see FrameworkunifiedPublishPrivateEvent
4652 ////////////////////////////////////////////////////////////////////////////////////////////
4653 EFrameworkunifiedStatus FrameworkunifiedPublishPublicEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 uiLength);
4654
4655 ////////////////////////////////////////////////////////////////////////////////////////////
4656 /// \ingroup FrameworkunifiedPublishPrivateEvent
4657 /// \~english @par Brief
4658 ///        Delivers application-specific events to a specified session
4659 /// \~english @param [in] hApp
4660 ///        HANDLE   - Handle for the application
4661 /// \~english @param [in] uiEventId
4662 ///        UI_32   - The event ID to deliver (the identification ID on the service's protocol)
4663 /// \~english @param [in] pData
4664 ///        PCVOID   - Pointer to trasmission data
4665 /// \~english @param [in] uiLength
4666 ///        UI_32   - Transmission data length
4667 /// \~english @param [in] hSession
4668 ///        HANDLE   - Handles for sessions
4669 /// \~english @retval eFrameworkunifiedStatusOK success
4670 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
4671 /// \~english @retval eFrameworkunifiedStatusServNotFound Perform the event processing
4672 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
4673 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
4674 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
4675 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
4676 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
4677 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
4678 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
4679 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
4680 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
4681 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
4682 /// \~english @par Prerequisite
4683 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4684 ///       - The events to be delivered must be specified in the FrameworkunifiedDefinePrivateStateEvents.
4685 /// \~english @par Change of internal state
4686 ///       - The internal state is not changed.
4687 /// \~english @par Conditions of processing failure
4688 ///       - If the application handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
4689 ///       - If the application handle (hApp) specified in the arguments is not appropriate (disabled) [eFrameworkunifiedStatusInvldParam]
4690 ///       - If the session handle (hSession) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
4691 ///       - If the sessionhandle (hSession) specified in the arguments is not appropriate (is not valid) [eFrameworkunifiedStatusInvldParam]
4692 ///       - The event ID (uiEventId) specified in the parameter is not registered as an event to be delivered to the Dispatcher. [eFrameworkunifiedStatusServNotFound]
4693 ///       - When the session handle (hSession) specified in the arguments is not registered as the delivery destination in the Dispatcher [eFrameworkunifiedStatusServNotFound]
4694 ///       - When the message queue handle in the session handle (hSession) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4695 ///       - When the application name in the session handle (hSession) specified by the arguments is not set [eFrameworkunifiedStatusInvldHandle]
4696 ///       - The message queue handle in the session handle (hSession) specified by the arguments is invalid. [eFrameworkunifiedStatusInvldHandle]
4697 ///       - When the send data length (uiLength) specified in the arguments is not 0 and the pointer to the send data pointer (pData) is NULL [eFrameworkunifiedStatusInvldBuf]
4698 ///       - When the name of the application in the session handle (hSession) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
4699 ///       - When the name of the message queue in the session handle (hSession) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
4700 ///       - When the name of the message queue in the session handle (hSession) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
4701 ///       - When the message queue type of the session handle (hSession) specified in the parameter is not the send type [eFrameworkunifiedStatusInvldHndlType]
4702 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
4703 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
4704 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
4705 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
4706 ///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
4707 ///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
4708 /// \~english @par Detail
4709 ///        Delivers application-specific events to specified sessions in registered applications.\n
4710 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
4711 ///        Events are delivered to the sessions specified in the hSession of arguments among the applications registered in the FrameworkunifiedSubscribeToSessionEventsWithCallbacks, etc.
4712 /// \~english @par
4713 ///        Please note the following points when using this API for application.
4714 ///        - When broadcasting to all registered applications, use FrameworkunifiedPublishPublicEvent.
4715 ///        - This API shall be executed from within a callback function, and a session-use handle acquired using FrameworkunifiedGetCurrentSessionHandle shall be passed to the parameter hSession.
4716 ///        - Operation cannot be guaranteed if the size of the area indicated by the pointer (pData) address to the send data does not match
4717 ///          the size specified by the send data length (iLength) address.
4718 /// \~english @par Classification
4719 ///          Public
4720 /// \~english @par Type
4721 ///          Pub-Sub
4722 /// \~english @see FrameworkunifiedDefinePrivateStateEvents, FrameworkunifiedDefinePublicStateEvents, FrameworkunifiedPublishPublicEvent,
4723 ///                 FrameworkunifiedSubscribeToSessionEventWithCallback, FrameworkunifiedSubscribeToSessionEventsWithCallbacks,
4724 ///                 FrameworkunifiedUnSubscribeSessionEventWithCallback, FrameworkunifiedUnSubscribeSessionEventsWithCallbacks
4725 ///
4726 /// This API is used to publish the event over session to the client subscribed to it using session handle.
4727 ///
4728 /// \param [in] hApp
4729 ///         HANDLE - Handle to the application framework
4730 /// \param [in] uiEventId
4731 ///         UI_32 - Event id of Message
4732 /// \param [in] pData
4733 ///         PCVOID - Data buffer
4734 /// \param [in] uiLength
4735 ///         UI_32 - Size of data buffer
4736 /// \param [in] hSession
4737 ///         HANDLE - Session Handle
4738 ///
4739 /// \return EFrameworkunifiedStatus
4740 ///         eFrameworkunifiedStatusOK - If publish event success
4741 ///     eFrameworkunifiedStatusInvldParam - Invalid parameter passed
4742 ///     eFrameworkunifiedStatusServNotFound - If event uiEventId not subscribed on hSession by a client
4743 ///     Any other values returned by FrameworkunifiedSendMsg
4744 ///
4745 /// \see FrameworkunifiedPublishPublicEvent
4746 ////////////////////////////////////////////////////////////////////////////////////////////
4747 EFrameworkunifiedStatus FrameworkunifiedPublishPrivateEvent(HANDLE hApp, UI_32 uiEventId, PCVOID pData, UI_32 uiLength, HANDLE hSession);
4748
4749 ////////////////////////////////////////////////////////////////////////////////////////////
4750 /// FrameworkunifiedGetServiceAvailabilityTable
4751 /// returns the list that stores the available services
4752 ///
4753 /// \param [in] hApp
4754 ///         HANDLE - Handle to the application session
4755
4756 /// \return ServiceAvailabilityList
4757 ///         ServiceAvailabilityTable - ServiceAvailabilityList
4758 ///
4759 /// \see FrameworkunifiedRegisterEvent
4760 ///
4761 ////////////////////////////////////////////////////////////////////////////////////////////
4762 std::map<std::string, EFrameworkunifiedServiceAvailableStatus> FrameworkunifiedGetServiceAvailabilityTable(HANDLE hApp);
4763
4764 ////////////////////////////////////////////////////////////////////////////////////////////
4765 /// \ingroup FrameworkunifiedIsStateMachineApp
4766 /// \~english @par Brief
4767 ///        Returns the presence or absence of a State Machine Application
4768 /// \~english @param [in] hApp
4769 ///        HANDLE   - Handle for the application
4770 /// \~english @retval BOOL State Machine Application existence (TRUE: existent/FALSE: nonexistent)
4771 /// \~english @retval FALSE Judgment failure
4772 /// \~english @par Prerequisite
4773 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4774 /// \~english @par Change of internal state
4775 ///       - The internal state is not changed.
4776 /// \~english @par Conditions of processing failure
4777 ///       - If the hApp specified in the parameter is NULL, [FALSE]
4778 ///       - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
4779 /// \~english @par Detail
4780 ///       Determines whether there is a State Machine Application from the application handle specified by the arguments, and returns the handle.
4781 /// \~english @par Classification
4782 ///          Public
4783 /// \~english @par Type
4784 ///          Not applicable
4785 /// \~english @see FrameworkunifiedSetStateMachine, FrameworkunifiedHSMDispatcherWithArguments
4786 ///
4787 /// FrameworkunifiedIsStateMachineApp
4788 ///   Returns TRUE if it's a state machine application else FALSE.
4789 ///
4790 /// \param [in] hApp
4791 ///         HANDLE - Handle to the application session
4792 ///
4793 /// \return TRUE - if a state machine application.
4794 ///     FALSE - if not a state machine application
4795 ///
4796 /// \see
4797 ///
4798 ////////////////////////////////////////////////////////////////////////////////////////////
4799 BOOL FrameworkunifiedIsStateMachineApp(HANDLE hApp);
4800
4801 ////////////////////////////////////////////////////////////////////////////////////////////
4802 /// FrameworkunifiedGetXMLConfigHandle
4803 ///   Returns the handle to config file handle
4804 ///
4805 /// \param [in] hApp
4806 ///         HANDLE - Handle to the application session
4807 ///
4808 /// \return handle
4809 ///         HANDLE - Config file handle
4810 ///
4811 /// \see
4812 ///
4813 ////////////////////////////////////////////////////////////////////////////////////////////
4814 HANDLE FrameworkunifiedGetXMLConfigHandle(HANDLE hApp);
4815
4816 ////////////////////////////////////////////////////////////////////////////////////////////
4817 /// FrameworkunifiedGetNumberOfSession
4818 /// API to get the number of sessions created in the system.
4819 ///
4820 /// \param [in] hApp
4821 ///         HANDLE - Application handle
4822 /// \param [in] strServiceName
4823 ///         PCSTR - Service name.
4824 ///
4825 /// \return status
4826 ///         EFrameworkunifiedStatus - success or error
4827 ///
4828 /// \see
4829 ///
4830 ////////////////////////////////////////////////////////////////////////////////////////////
4831 UI_32 FrameworkunifiedGetNumberOfSession(HANDLE hApp, PCSTR strServiceName);
4832
4833 ////////////////////////////////////////////////////////////////////////////////////////////
4834 /// \ingroup FrameworkunifiedSetSessionHandle
4835 /// \~english @par Brief
4836 ///        Registering Session Handles with an Application Dispatcher
4837 /// \~english @param [in] hApp
4838 ///        HANDLE   - Handle for the application
4839 /// \~english @param [in] strServiceName
4840 ///        PCSTR   - Service name established for the session
4841 /// \~english @param [in] hSession
4842 ///        HANDLE   - Handles for sessions (Acquired by FrameworkunifiedGetOpenSessionHandle, etc.)
4843 /// \~english @retval eFrameworkunifiedStatusOK success
4844 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
4845 /// \~english @par Prerequisite
4846 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4847 /// \~english @par Change of internal state
4848 ///       - The internal state is not changed.
4849 /// \~english @par Conditions of processing failure
4850 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
4851 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
4852 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
4853 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
4854 ///       - If the service-name (strServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
4855 ///       - If the length of the service-name (strServiceName) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
4856 /// \~english @par Detail
4857 ///        After the application establishes a session with the service using a FrameworkunifiedOpenSession or the like,
4858 ///        the session handle is registered in the application Dispatcher in association with the service name and session ID.
4859 ///        Session handles shall be acquired by using a FrameworkunifiedGetOpenSessionHandle or the like when a response is received from the service.
4860 /// \~english @par Classification
4861 ///          Public
4862 /// \~english @par Type
4863 ///          Sync
4864 /// \~english @see FrameworkunifiedGetSessionHandle, FrameworkunifiedRemoveSessionHandle,
4865 ///                 FrameworkunifiedOpenSession, FrameworkunifiedOpenSessionWithData, FrameworkunifiedOpenSessionSync, FrameworkunifiedOpenSessionWithDataSync,
4866 ///                 FrameworkunifiedGetOpenSessionHandle, FrameworkunifiedGetOpenSessionSyncHandle,
4867 ///
4868 ///   Sets the session handle in the Application Framework. It stores the mapping between
4869 ///   source, session id and session handle in the application framework.
4870 ///
4871 ///
4872 /// \param [in] hApp
4873 ///         HANDLE - Application framework handle
4874 /// \param [in] strServiceName
4875 ///         PCSTR -Name of the associated service name
4876 /// \param [in] hSession
4877 ///         HANDLE - Session handle
4878 ///
4879 /// \return status
4880 ///         EFrameworkunifiedStatus - success or error
4881 ///
4882 /// \see FrameworkunifiedCreateSession, FrameworkunifiedGetSessionHandle, FrameworkunifiedRemoveSessionHandle.
4883 ////////////////////////////////////////////////////////////////////////////////////////////
4884 EFrameworkunifiedStatus FrameworkunifiedSetSessionHandle(HANDLE hApp, PCSTR strServiceName, HANDLE hSession);
4885
4886 ////////////////////////////////////////////////////////////////////////////////////////////
4887 /// \ingroup FrameworkunifiedGetSessionHandle
4888 /// \~english @par Brief
4889 ///        Get the session handle for the given service name and session ID
4890 /// \~english @param [in] hApp
4891 ///        HANDLE   - Handle for the application
4892 /// \~english @param [in] strServiceName
4893 ///        PCSTR   - service name
4894 /// \~english @param [in] uiSessionId
4895 ///        UI_32   - session ID
4896 /// \~english @retval HANDLE Handles for sessions
4897 /// \~english @retval NULL NULL pointer(Acquisition failure)
4898 /// \~english @par Prerequisite
4899 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4900 /// \~english @par Change of internal state
4901 ///       - The internal state is not changed.
4902 /// \~english @par Conditions of processing failure
4903 ///       - If the hApp specified in the parameter is NULL, [NULL]
4904 ///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
4905 ///       - If the service-name (strServiceName) specified in the parameter is NULL, [NULL]
4906 ///       - If the session with the service name (strServiceName) specified in the parameter is not registered in the Dispatcher, [NULL]
4907 ///       - If the session with the session ID name (uiSessionId) specified in the parameter is not registered in the Dispatcher, [NULL]
4908 /// \~english @par Detail
4909 ///        Gets and returns the session handle associated with the specified service and session id from the application Dispatcher.
4910 /// \~english @par Classification
4911 ///          Public
4912 /// \~english @par Type
4913 ///          Sync
4914 /// \~english @see FrameworkunifiedSetSessionHandle, FrameworkunifiedRemoveSessionHandle
4915 ///
4916 ///   Returns the requested session handle associated with service name and session id.
4917 ///
4918 ///
4919 /// \param [in] hApp
4920 ///         HANDLE - Application framework handle
4921 /// \param [in] strServiceName
4922 ///         PCSTR -Name of the associated service name
4923 /// \param [in] uiSessionId
4924 ///         HANDLE - Session Id
4925 ///
4926 /// \return handle
4927 ///         HANDLE - Session handle
4928 ///
4929 /// \see FrameworkunifiedSetSessionHandle
4930 ////////////////////////////////////////////////////////////////////////////////////////////
4931 HANDLE FrameworkunifiedGetSessionHandle(HANDLE hApp, PCSTR strServiceName, UI_32 uiSessionId);
4932
4933 ////////////////////////////////////////////////////////////////////////////////////////////
4934 /// \ingroup FrameworkunifiedGetCurrentSessionHandle
4935 /// \~english @par Brief
4936 ///        Get the session handle for the most recent incoming message
4937 /// \~english @param [in] hApp
4938 ///        HANDLE   - Handle for the application
4939 /// \~english @retval HANDLE Handles for sessions
4940 /// \~english @retval NULL NULL pointer (Acquisition failure)
4941 /// \~english @par Prerequisite
4942 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4943 /// \~english @par Change of internal state
4944 ///       - The internal state is not changed.
4945 /// \~english @par Conditions of processing failure
4946 ///       - If the hApp specified in the parameter is NULL, [NULL]
4947 ///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
4948 ///       - When the source service name obtained from received messages is NULL [NULL]
4949 ///       - If the Dispatcher does not have a session associated with the source service-name retrieved from the received message [NULL]
4950 ///       - When the session ID acquired from the received message is not registered in the Dispatcher, [NULL]
4951 /// \~english @par Detail
4952 ///        Gets and returns the session-handle associated with the most recently received message from the application's Dispatcher.
4953 /// \~english @par
4954 ///        The application shall execute this API using an application handle passed as an argument to the callback function.\n
4955 ///        (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
4956 /// \~english @par Classification
4957 ///          Public
4958 /// \~english @par Type
4959 ///          Sync
4960 /// \~english @see FrameworkunifiedGetSessionHandle, FrameworkunifiedSetSessionHandle
4961 ///
4962 ///   Returns the session handle for the current session. Useful, if used in the callback
4963 ///   function of protocol. Current session means on which the protocol message received.
4964 ///
4965 ///
4966 /// \param [in] hApp
4967 ///         HANDLE - Application framework handle
4968 /// \return handle
4969 ///         HANDLE - Session handle
4970 ///
4971 /// \see FrameworkunifiedSetSessionHandle, FrameworkunifiedGetSessionHandle.
4972 ////////////////////////////////////////////////////////////////////////////////////////////
4973 HANDLE FrameworkunifiedGetCurrentSessionHandle(HANDLE hApp);
4974
4975 ////////////////////////////////////////////////////////////////////////////////////////////
4976 /// \ingroup FrameworkunifiedRemoveSessionHandle
4977 /// \~english @par Brief
4978 ///        Deletes the session handle for the given service name and session ID
4979 /// \~english @param [in] hApp
4980 ///        HANDLE   - Handle for the application
4981 /// \~english @param [in] strServiceName
4982 ///        PCSTR   - Service name
4983 /// \~english @param [in] uiSessionId
4984 ///        UI_32   - session ID
4985 /// \~english @retval eFrameworkunifiedStatusOK success
4986 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
4987 /// \~english @par Prerequisite
4988 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
4989 /// \~english @par Change of internal state
4990 ///       - The internal state is not changed.
4991 /// \~english @par Conditions of processing failure
4992 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
4993 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
4994 ///       - If the service-name (strServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
4995 ///       - If the length of the service-name (strServiceName) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
4996 /// \~english @par Detail
4997 ///        This service call deletes the session handle associated with the specified service name and session ID among the session handles registered in the application's Dispatcher by FrameworkunifiedSetSessionHandle.
4998 /// \~english @par
4999 ///        Please note the following points when using this API for application.\n
5000 ///       - When a session ID that has been deleted (or unregistered) is specified, this API returns an eFrameworkunifiedStatusOK.
5001 /// \~english @par Classification
5002 ///          Public
5003 /// \~english @par Type
5004 ///          Sync
5005 /// \~english @see FrameworkunifiedSetSessionHandle
5006 ///
5007 ///   Removes the session handle from the Application Framework associated with service name
5008 ///   and session id. It actually removes the mapping between source, session id and session
5009 ///   handle in the application framework which was set using FrameworkunifiedSetSessionHandle.
5010 ///
5011 ///
5012 /// \param [in] hApp
5013 ///         HANDLE - Application framework handle
5014 /// \param [in] strServiceName
5015 ///         PCSTR -Name of the associated service name
5016 /// \param [in] uiSessionId
5017 ///         HANDLE - Session Id
5018 ///
5019 /// \return handle
5020 ///         HANDLE - Session handle
5021 ///
5022 /// \see FrameworkunifiedSetSessionHandle
5023 ////////////////////////////////////////////////////////////////////////////////////////////
5024 EFrameworkunifiedStatus FrameworkunifiedRemoveSessionHandle(HANDLE hApp, PCSTR strServiceName, UI_32 uiSessionId);
5025
5026 ////////////////////////////////////////////////////////////////////////////////////////////
5027 /// \ingroup FrameworkunifiedSetMandatoryServiceInfo
5028 /// \~english @par Brief
5029 ///        Registers the specified Notification and event ID in the Notification list of the Dispatcher.
5030 /// \~english @param [in] hApp
5031 ///        HANDLE   - Handle for the application
5032 /// \~english @param [in] pNotification
5033 ///        PCSTR   - Notification name
5034 /// \~english @param [in] uiEventId
5035 ///        UI_32   - Event ID (Identification ID on the service's protocol)
5036 /// \~english @retval eFrameworkunifiedStatusOK success
5037 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5038 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5039 /// \~english @par Prerequisite
5040 ///       - The process of NS_NPPService is started.
5041 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5042 /// \~english @par Change of internal state
5043 ///       - The internal state is not changed.
5044 /// \~english @par Conditions of processing failure
5045 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5046 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
5047 ///       - When the Notification name (pNotification) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5048 ///       - If the length of the Notification name (pNotification) specified in the arguments is 64 bytes or greater, [eFrameworkunifiedStatusFail]
5049 /// \~english @par Detail
5050 ///        Registers the specified Notification and event ID in the Notification list of the Dispatcher.\n
5051 ///        (The event ID of this API is the identification ID on the protocol of the service, which the application identifies the content of the message.)\n
5052 ///        By registering a Notification with this API, a Notification registration/unregistration request
5053 ///        to the notification service (NS_NPPService) is automatically issued by the Dispatcher when the Dispatcher starts/ends.
5054 /// \~english @par
5055 ///        Please note the following points when using this API for application.\n
5056 ///       - If the Notification name is specified as an empty character, eFrameworkunifiedStatusOK is returned. Cannot guarantee operation.
5057 /// \~english @par Classification
5058 ///          Public
5059 /// \~english @par Type
5060 ///          Broadcast
5061 /// \~english @see 
5062 ///
5063 ///   Sets the given service as Mandatory service in application handle
5064 ///
5065 ///
5066 /// \param [in] hApp
5067 ///         HANDLE - Application framework handle
5068 /// \param [in] pNotification
5069 ///         PCSTR -Name of the Notification
5070 /// \param [in] uiEventId
5071 ///         UI_32 - event id
5072 ///
5073 /// \return status
5074 ///         EFrameworkunifiedStatus - success or error
5075 ///
5076 /// \see
5077 ////////////////////////////////////////////////////////////////////////////////////////////
5078 EFrameworkunifiedStatus FrameworkunifiedSetMandatoryServiceInfo(HANDLE hApp, PCSTR pNotification, UI_32 uiEventId);
5079
5080 ////////////////////////////////////////////////////////////////////////////////////////////
5081 /// \ingroup FrameworkunifiedGetSessionName
5082 /// \~english @par Brief
5083 ///        Gets the name of the message queue from the session handle
5084 /// \~english @param [in] hSession
5085 ///        HANDLE   - Handles for sessions
5086 /// \~english @retval PCSTR Pointer to the message queue name
5087 /// \~english @retval NULL NULL pointer (Acquisition failure)
5088 /// \~english @par Prerequisite
5089 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5090 /// \~english @par Change of internal state
5091 ///       - The internal state is not changed.
5092 /// \~english @par Conditions of processing failure
5093 ///       - If the hSession specified in the parameter is NULL, [NULL]
5094 ///       - If the hSession specified in the arguments is not appropriate (not valid) [NULL]
5095 /// \~english @par Detail
5096 ///        Gets the name of the message queue from the session handle (hSession) passed in the parameter.
5097 /// \~english @par Classification
5098 ///          Public
5099 /// \~english @par Type
5100 ///          Sync
5101 /// \~english @see 
5102 ///
5103 ///   Returns the session name corresponding to the given session handle.
5104 ///
5105 ///
5106 /// \param [in] hSession
5107 ///         HANDLE - Session handle
5108 ///
5109 /// \return session_name
5110 ///         PCSTR - Session name
5111 ///
5112 /// \see
5113 ////////////////////////////////////////////////////////////////////////////////////////////
5114 PCSTR FrameworkunifiedGetSessionName(HANDLE hSession);
5115
5116 ////////////////////////////////////////////////////////////////////////////////////////////
5117 /// \ingroup FrameworkunifiedIsServiceAvailable
5118 /// \~english @par Brief
5119 ///        Determine the availability of services
5120 /// \~english @param [in] hApp
5121 ///        HANDLE   - Handle for Application
5122 /// \~english @retval BOOL Use (TRUE: Available, FALSE: Not Available)
5123 /// \~english @retval FALSE Acquisition failure
5124 /// \~english @par Prerequisite
5125 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5126 /// \~english @par Change of internal state
5127 ///       - The internal state is not changed.
5128 /// \~english @par Conditions of processing failure
5129 ///       - If the hApp specified in the parameter is NULL, [FALSE]
5130 ///       - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
5131 ///       - If the received message is not a service-availability notice... [FALSE]
5132 ///       - Incoming messages are invalid [FALSE]
5133 /// \~english @par Detail
5134 ///        Based on the received Notification, the service is judged to be usable or unusable, and true/false is returned.
5135 /// \~english @par
5136 ///        The application shall execute this API using the handle of the application passed as the argument of the service availability notification callback function.\n
5137 ///        (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
5138 /// \~english @par Classification
5139 ///          Public
5140 /// \~english @par Type
5141 ///          Broadcast
5142 /// \~english @see FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification,
5143 ///                 FrameworkunifiedSubscribeNotificationWithCallback, FrameworkunifiedSubscribeNotificationsWithCallback
5144 ///
5145 ///   This API should only be called in the callback/reaction associated with the Service
5146 ///   availability notification. It returns TRUE if service is available and FALSE if service
5147 ///   is not available.
5148 ///
5149 /// \param [in] hApp
5150 ///         HANDLE - Application framework handle
5151 ///
5152 /// \return service_availability
5153 ///         BOOL - returns TRUE if service is available otherwise returns FALSE
5154 ///
5155 /// \see
5156 ////////////////////////////////////////////////////////////////////////////////////////////
5157 BOOL FrameworkunifiedIsServiceAvailable(HANDLE hApp);
5158
5159 ////////////////////////////////////////////////////////////////////////////////////////////
5160 /// \ingroup FrameworkunifiedPublishServiceAvailability
5161 /// \~english @par Brief
5162 ///        Publish application availability status
5163 /// \~english @param [in] hApp
5164 ///        HANDLE   - Handle for the application
5165 /// \~english @param [in] bIsAvailable
5166 ///        BOOL   - Availability status of the application (TRUE: Available, FALSE: Not Available)
5167 /// \~english @retval eFrameworkunifiedStatusOK success
5168 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5169 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
5170 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
5171 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
5172 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
5173 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
5174 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
5175 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
5176 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5177 /// \~english @par Prerequisite
5178 ///       - The process of NS_NPPService is started.
5179 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5180 ///       - Notification must be registered by FrameworkunifiedRegisterServiceAvailabilityNotification.
5181 /// \~english @par Change of internal state
5182 ///       - The internal state is not changed.
5183 /// \~english @par Conditions of processing failure
5184 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5185 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
5186 ///       - If the service-availability Notification is not set for the handle (hApp) specified in the parameter, [eFrameworkunifiedStatusFail]
5187 ///       - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
5188 ///       - If the application name in the handler (hApp) specified by the arguments is not set, [eFrameworkunifiedStatusInvldHandle]
5189 ///       - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
5190 ///       - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
5191 ///       - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
5192 ///       - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
5193 ///       - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
5194 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
5195 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
5196 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
5197 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
5198 ///       - If there are any errors sending messages [eFrameworkunifiedStatusErrFail]
5199 /// \~english @par Detail
5200 ///        Notifies (issues a Notification) the availability status of an application to another application.\n
5201 ///        Applications must use this API to notify other applications when the availability of services provided by the application changes.\n
5202 ///        (However, the state machine managed application generated by FrameworkunifiedHSMDispatcherWithArguments, etc. is excluded because the state machine automatically issues a Notification.)
5203 /// \~english @par Classification
5204 ///          Public
5205 /// \~english @par Type
5206 ///          Broadcast
5207 /// \~english @see FrameworkunifiedRegisterServiceAvailabilityNotification, FrameworkunifiedGetSelfAvailability
5208 ///
5209 ///   This API publishes service availability status of the service. This API needs to be
5210 ///   used when service is up and ready to process clients requests.
5211 ///     FrameworkunifiedRegisterServiceAvailabilityNotification must be called before calling this API.
5212 ///   In Frameworkunified HSM Framework based application service availability is published by the Framework
5213 ///   So this API can be used only in Non-FRAMEWORKUNIFIED HSM based application.
5214 ///
5215 /// \param [in] hApp
5216 ///         HANDLE - Application framework handle
5217 /// \param [in] bIsAvailable
5218 ///     BOOL - TRUE if Service Available and FALSE if service is unavailable
5219 ///
5220 /// \return status
5221 ///         EFrameworkunifiedStatus - success or error
5222 ///
5223 /// \see
5224 ///   FrameworkunifiedRegisterServiceAvailabilityNotification
5225 ////////////////////////////////////////////////////////////////////////////////////////////
5226 EFrameworkunifiedStatus FrameworkunifiedPublishServiceAvailability(HANDLE hApp, BOOL bIsAvailable);
5227
5228 ////////////////////////////////////////////////////////////////////////////////////////////
5229 /// \ingroup FrameworkunifiedGetSelfAvailability
5230 /// \~english @par Brief
5231 ///        Gets the availability status of the application itself
5232 /// \~english @param [in] hApp
5233 ///        HANDLE   - Handle for the application
5234 /// \~english @retval BOOL Use (TRUE: Available, FALSE: Not Available)
5235 /// \~english @retval FALSE Acquisition failure
5236 /// \~english @par Prerequisite
5237 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5238 /// \~english @par Change of internal state
5239 ///       - The internal state is not changed.
5240 /// \~english @par Conditions of processing failure
5241 ///       - If the hApp specified in the parameter is NULL, [FALSE]
5242 ///       - If the hApp specified in the arguments is not appropriate (not valid) [FALSE]
5243 /// \~english @par Detail
5244 ///        Gets the availability status of the applications managed in the Dispatcher.\n
5245 ///        Availability states are the values specified by the application when the FrameworkunifiedPublishServiceAvailability is executed.
5246 /// \~english @par Classification
5247 ///          Public
5248 /// \~english @par Type
5249 ///          Not applicable
5250 /// \~english @see FrameworkunifiedPublishServiceAvailability
5251 ///
5252 ///   This API get service availability status of the service. This API needs to be
5253 ///   used when service is up and ready to process clients requests.
5254 ///     FrameworkunifiedRegisterServiceAvailabilityNotification must be called before calling this API.
5255 ///   In Frameworkunified HSM Framework based application service availability is published by the Framework
5256 ///   So this API can be used only in Non-FRAMEWORKUNIFIED HSM based application.
5257 ///
5258 /// \param [in] hApp
5259 ///         HANDLE - Application framework handle
5260 ///
5261 /// \return status
5262 ///         EFrameworkunifiedStatus - success or error
5263 ///
5264 /// \see
5265 ///   FrameworkunifiedRegisterServiceAvailabilityNotification, FrameworkunifiedPublishServiceAvailability
5266 ////////////////////////////////////////////////////////////////////////////////////////////
5267 BOOL FrameworkunifiedGetSelfAvailability(HANDLE hApp);
5268
5269 ////////////////////////////////////////////////////////////////////////////////////////////
5270 /// \ingroup FrameworkunifiedRegisterServiceAvailabilityNotification
5271 /// \~english @par Brief
5272 ///        Registering Application Availability Notification with NPP-Service
5273 /// \~english @param [in] hApp
5274 ///        HANDLE   - Handle for the application
5275 /// \~english @param [in] pNotification
5276 ///        PCSTR   - Pointers to Notification names
5277 /// \~english @retval eFrameworkunifiedStatusOK success
5278 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5279 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
5280 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
5281 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
5282 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
5283 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
5284 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
5285 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
5286 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5287 /// \~english @par Prerequisite
5288 ///       - The process of NS_NPPService is started.
5289 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5290 /// \~english @par Change of internal state
5291 ///       - The internal state is not changed.
5292 /// \~english @par Conditions of processing failure
5293 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5294 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
5295 ///       - When the Notification name (pNotification) specified in the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
5296 ///       - If the length of the Notification name (pNotification) specified in the arguments is 64 bytes or greater, [eFrameworkunifiedStatusFail]
5297 ///       - When the length of the Notification name (pNotification) specified in the arguments is 0, [eFrameworkunifiedStatusInvldParam]
5298 ///       - Get buffer for sending messages (malloc) failed [eFrameworkunifiedStatusFail]
5299 ///       - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
5300 ///       - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
5301 ///       - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
5302 ///       - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
5303 ///       - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
5304 ///       - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
5305 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
5306 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
5307 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
5308 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
5309 ///       - If there are any errors sending messages [eFrameworkunifiedStatusErrFail]
5310 /// \~english @par Detail
5311 ///        Requests that NPPservice register a Notification to notify the application availability status.\n
5312 ///        A Notification registered by this API can publish the availability status to other applications by executing FrameworkunifiedPublishServiceAvailability from the application.
5313 /// \~english @par
5314 ///        Please note the following points when using this API for application.\n
5315 ///       - Operation is not guaranteed when the same application executes this API more than once with different Notification names.
5316 /// \~english @par Classification
5317 ///          Public
5318 /// \~english @par Type
5319 ///          Broadcast
5320 /// \~english @see FrameworkunifiedUnRegisterServiceAvailabilityNotification, FrameworkunifiedPublishServiceAvailability
5321 ///
5322 ///   This API registers the given service availability notification. Need to be used by
5323 ///   service.
5324 ///
5325 /// \param [in] hApp
5326 ///         HANDLE - Application framework handle
5327 /// \param [in] pNotification
5328 ///         PCSTR -Name of the Notification
5329 ///
5330 /// \return status
5331 ///         EFrameworkunifiedStatus - success or error
5332 ///
5333 /// \see
5334 ///   FrameworkunifiedPublishServiceAvailability
5335 ////////////////////////////////////////////////////////////////////////////////////////////
5336 EFrameworkunifiedStatus FrameworkunifiedRegisterServiceAvailabilityNotification(HANDLE hApp, PCSTR pNotification);
5337
5338 ////////////////////////////////////////////////////////////////////////////////////////////
5339 /// \ingroup FrameworkunifiedUnRegisterServiceAvailabilityNotification
5340 /// \~english @par Brief
5341 ///        Revoke application availability Notification from NPPservice
5342 /// \~english @param [in] hApp
5343 ///        HANDLE   - Handle for the application
5344 /// \~english @retval eFrameworkunifiedStatusOK success
5345 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5346 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
5347 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
5348 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
5349 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
5350 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
5351 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
5352 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
5353 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5354 /// \~english @par Prerequisite
5355 ///       - The process of NS_NPPService is started.
5356 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5357 ///       - Notification must be registered by FrameworkunifiedRegisterServiceAvailabilityNotification.
5358 /// \~english @par Change of internal state
5359 ///       - The internal state is not changed.
5360 /// \~english @par Conditions of processing failure
5361 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5362 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
5363 ///       - If the service-availability Notification is not set for the handle (hApp) specified in the parameter, [eFrameworkunifiedStatusInvldParam]
5364 ///       - Get buffer for sending messages (malloc) failed [eFrameworkunifiedStatusFail]
5365 ///       - When the message queue handle for NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
5366 ///       - When the message queue handle for NPP services in the handle (hApp) specified in the arguments is invalid (invalid) [eFrameworkunifiedStatusInvldHandle]
5367 ///       - When the name of the application in the handle (hApp) specified by the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
5368 ///       - When the name of the message queue for the NPP service in the handle (hApp) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
5369 ///       - When the name of the message queue for NPP services in the handle (hApp) specified in the arguments exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
5370 ///       - If the message queue type is not the send type [eFrameworkunifiedStatusInvldHndlType]
5371 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
5372 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
5373 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
5374 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
5375 ///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
5376 /// \~english @par Detail
5377 ///        Requests that NPPservice abandon the Notification to notify the availability status of the application that executed this API.
5378 /// \~english @par Classification
5379 ///          Public
5380 /// \~english @par Type
5381 ///          Broadcast
5382 /// \~english @see FrameworkunifiedRegisterServiceAvailabilityNotification
5383 ///
5384 ///   This API unregisters the service availability notification
5385 ///
5386 /// \param [in] hApp
5387 ///         HANDLE - Application framework handle
5388 ///
5389 /// \return status
5390 ///         EFrameworkunifiedStatus - success or error
5391 ///
5392 /// \see
5393 ///   FrameworkunifiedPublishServiceAvailability, FrameworkunifiedRegisterServiceAvailabilityNotification
5394 ////////////////////////////////////////////////////////////////////////////////////////////
5395 EFrameworkunifiedStatus FrameworkunifiedUnRegisterServiceAvailabilityNotification(HANDLE hApp);
5396
5397 ////////////////////////////////////////////////////////////////////////////////////////////
5398 /// \ingroup FrameworkunifiedCreateSession
5399 /// \~english @par Brief
5400 ///        Create handles for sessions and register them with the application's Dispatcher
5401 /// \~english @param [in] hApp
5402 ///        HANDLE   - Handle for the application
5403 /// \~english @param [in] pSessionName
5404 ///        PCSTR   - Session name (application name or thread name)
5405 /// \~english @retval HANDLE Handles for sessions
5406 /// \~english @retval NULL NULL pointer (Acquisition failure)
5407 /// \~english @par Prerequisite
5408 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5409 /// \~english @par Change of internal state
5410 ///       - The internal state is not changed.
5411 /// \~english @par Conditions of processing failure
5412 ///       - If the hApp specified in the parameter is NULL, [NULL]
5413 ///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
5414 ///       - The session name (pSessionName) specified in the arguments is invalid.
5415 ///         (For NULL, if the length is 0 or 20 bytes or more) [NULL]
5416 ///       - When acquisition (malloc) of the message queue management information area fails, [NULL]
5417 ///       - When the normalized message queue name from the session name (pSessionName) is inappropriate (exceeds 16 bytes) [NULL]
5418 ///       - When acquisition (malloc) of the storage area for the message queue name fails, [NULL]
5419 ///       - The open of the message queue (mq_open) failed [NULL]
5420 /// \~english @par Detail
5421 ///        Creates handles (send message queues) for sessions with the specified application and registers them in the application's Dispatcher.\n
5422 ///        The pSessionName is set to the application name or thread name of the client that establishes the session.\n
5423 ///        This API is used to establish a session with a client application when an application on the service providing side receives a session start request from the client application.
5424 ///        The application shall execute this API from the corresponding callback function.
5425 /// \~english @par Classification
5426 ///          Public
5427 /// \~english @par Type
5428 ///          Sync
5429 /// \~english @see FrameworkunifiedDestroySession
5430 ///
5431 ///   This API generates the session handle and sets it in the Application Framework. This API
5432 ///     should be used by the server in the callback function attached to the open session request.
5433 ///
5434 /// \param [in] hApp
5435 ///         HANDLE - Application framework handle
5436 /// \param [in] pSessionName
5437 ///         PCSTR - SessionName can be application name or thread name
5438 ///
5439 /// \return session_handle
5440 ///         HANDLE - Session Handle
5441 ///
5442 ////////////////////////////////////////////////////////////////////////////////////////////
5443 HANDLE FrameworkunifiedCreateSession(HANDLE hApp, PCSTR pSessionName);
5444
5445 ////////////////////////////////////////////////////////////////////////////////////////////
5446 /// \ingroup FrameworkunifiedDestroySession
5447 /// \~english @par Brief
5448 ///        Destroys the session handle and removes the session handle from the application Dispatcher
5449 /// \~english @param [in] hApp
5450 ///        HANDLE   - Handle for the application
5451 /// \~english @param [in] hSession
5452 ///        HANDLE   - Handle for sessions (handle obtained with FrameworkunifiedCreateSession)
5453 /// \~english @retval eFrameworkunifiedStatusOK success
5454 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5455 /// \~english @par Prerequisite
5456 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5457 /// \~english @par Change of internal state
5458 ///       - The internal state is not changed.
5459 /// \~english @par Conditions of processing failure
5460 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
5461 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
5462 ///       - If the hSession specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
5463 ///       - If the hSession specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
5464 ///       - When the length of the message queue name of the handle (hSession) specified in the arguments is 0, [eFrameworkunifiedStatusFail]
5465 /// \~english @par Detail
5466 ///        Destroys the specified session handle and removes the specified session handle from the application Dispatcher.\n
5467 ///        This API is used when the service-providing application receives a session termination request from the client application and discards the session with the client application.
5468 ///        The application shall execute this API from the corresponding callback function.
5469 /// \~english @par Classification
5470 ///          Public
5471 /// \~english @par Type
5472 ///          Sync
5473 /// \~english @see FrameworkunifiedCreateSession
5474 ///
5475 ///   This API destroys the session handle and removes it from the Application Framework.
5476 ///     This API should be called by the server in the callback attached to the close session
5477 ///   request
5478 ///
5479 /// \param [in] hApp
5480 ///         HANDLE - Application framework handle
5481 /// \param [in] hSession
5482 ///         HANDLE - Session handle
5483 ///
5484 /// \return status
5485 ///         EFrameworkunifiedStatus - success or error
5486 ////////////////////////////////////////////////////////////////////////////////////////////
5487 EFrameworkunifiedStatus FrameworkunifiedDestroySession(HANDLE hApp, HANDLE hSession);
5488
5489 ////////////////////////////////////////////////////////////////////////////////////////////
5490 /// \ingroup FrameworkunifiedSendResponse
5491 /// \~english @par Brief
5492 ///        Sending a Response to the Source of an Incoming Message
5493 /// \~english @param [in] hApp
5494 ///        HANDLE   - Handle for the application
5495 /// \~english @param [in] iCmd
5496 ///        UI_32   -  Identification ID on the service's protocol
5497 /// \~english @param [in] length
5498 ///        UI_32   -  Data size to be sent (0 to 4294967255)
5499 /// \~english @param [in] data
5500 ///        PCVOID   - Pointer to the data to send
5501 /// \~english @retval eFrameworkunifiedStatusOK success
5502 /// \~english @retval eFrameworkunifiedStatusNullPointer Specifying NULL pointers
5503 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
5504 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
5505 /// \~english @retval eFrameworkunifiedStatusInvldBuf Bad buffer
5506 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid message queue name
5507 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
5508 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
5509 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
5510 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
5511 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5512 /// \~english @retval eFrameworkunifiedStatusErrOther Other errors (Failed to open/allocate shared memory, etc.)
5513 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5514 /// \~english @par Prerequisite
5515 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5516 ///       - Sessions are registered in the Dispatcher by FrameworkunifiedCreateSession, etc.
5517 /// \~english @par Change of internal state
5518 ///       - The internal state is not changed.
5519 /// \~english @par Conditions of processing failure
5520 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusFail]
5521 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusFail]
5522 ///       - When the source service name obtained from received messages is NULL [eFrameworkunifiedStatusFail]
5523 ///       - If the Dispatcher does not have a session associated with the source service-name retrieved from the received message [eFrameworkunifiedStatusFail]
5524 ///       - When the session ID acquired from the received message is not registered in the Dispatcher, [eFrameworkunifiedStatusFail]
5525 ///       - If the sessionhandle for incoming messages is NULL [eFrameworkunifiedStatusNullPointer]
5526 ///       - If the handles for sessions corresponding to incoming messages are inappropriate (disabled) [eFrameworkunifiedStatusNullPointer]
5527 ///       - When the message queue handle corresponding to the received message in the session handle is NULL [eFrameworkunifiedStatusInvldHandle]
5528 ///       - When the application name length in the session handle corresponding to received messages is 0, [eFrameworkunifiedStatusInvldHandle]
5529 ///       - Incorrect (invalid) message queue handle in session handle for incoming message [eFrameworkunifiedStatusInvldHandle]
5530 ///       - When the data (data) of the send message specified by the parameter is NULL and the data length (length) is not 0, [eFrameworkunifiedStatusInvldBuf]
5531 ///       - When the length of the application name in the session handle corresponding to the received message exceeds 20 bytes [eFrameworkunifiedStatusInvldQName]
5532 ///       - When the message queue name of the session handle corresponding to the received message is NULL [eFrameworkunifiedStatusInvldHandle]
5533 ///       - When the message queue name of the session handle corresponding to the received message exceeds 20 bytes [eFrameworkunifiedStatusInvldHandle]
5534 ///       - When the message queue type of the session handle corresponding to the received message is not the transmission type [eFrameworkunifiedStatusInvldHndlType]
5535 ///       - When the message queue is full [eFrameworkunifiedStatusMsgQFull]
5536 ///       - File descriptor for sending messages is invalid [eFrameworkunifiedStatusErrNoEBADF]
5537 ///       - When an interrupt by a systemcall (signal) occurs while sending messages [eFrameworkunifiedStatusErrNoEINTR]
5538 ///       - If the size of the message transmission buffer is invalid [eFrameworkunifiedStatusInvldBufSize]
5539 ///       - If there are any errors sending messages [eFrameworkunifiedStatusFail]
5540 ///       - Failed to access shared memory for sending messages [eFrameworkunifiedStatusErrOther]
5541 ///       - When the size (length) of the data to be sent specified in the parameter is out of range, [eFrameworkunifiedStatusInvldParam]
5542 /// \~english @par Detail
5543 ///        Gets the session ID and session name from received messages, and the corresponding session handles from Dispatcher.\n
5544 ///        Send a response to the sender of the received message using the acquired session handle.
5545 /// \~english @par
5546 ///        Please note the following points when using this API for application.\n
5547 ///       - The maximum data size (length) described above is a theoretical value. The maximum data size that can be actually used depends on the environment requirements.\n
5548 ///         The maximum value is the upper limit of the type (UINT_MAX) minus the following size.\n
5549 ///         Message header section\n
5550 ///       - Operation cannot be guaranteed when the size of the allocated area indicated by the address of the pointer (data) to the data buffer does not match the size specified by the size of the data buffer (length).
5551 /// \~english @par Classification
5552 ///          Public
5553 /// \~english @par Type
5554 ///          Method
5555 /// \~english @see FrameworkunifiedCreateSession, FrameworkunifiedSetSessionHandle
5556 ///
5557 ///   This API retrieves the session handle from the application framework and sends the response
5558 ///   to the client on the same session. The session id and message source name available in the
5559 ///   hApp at that instance is used to get the session handle. This API will work if server has
5560 ///   created session using FrameworkunifiedCreateSession or has used FrameworkunifiedSetSessionHandle after creating the
5561 ///   session.
5562 ///
5563 /// \param [in] hApp
5564 ///         HANDLE - Application framework handle
5565 /// \param [in] iCmd
5566 ///         UI_32 - Protocol command
5567 /// \param [in] length
5568 ///         UI_32 - size of message data
5569 /// \param [in] data
5570 ///         PCVOID - message data
5571 ///
5572 /// \return status
5573 ///         EFrameworkunifiedStatus - success or error
5574 ///
5575 /// \see FrameworkunifiedCreateSession, FrameworkunifiedSetSessionHandle, FrameworkunifiedSendRequest.
5576 ////////////////////////////////////////////////////////////////////////////////////////////
5577 EFrameworkunifiedStatus FrameworkunifiedSendResponse(HANDLE hApp, UI_32 iCmd, UI_32 length, PCVOID data);
5578
5579 ////////////////////////////////////////////////////////////////////////////////////////////
5580 /// FrameworkunifiedSendRequest
5581 ///   This API retrieves the session handle from the application framework and sends the request
5582 ///   to the server with specific service name and session id. This API will work, if application
5583 ///     has previously stored associated session handle using FrameworkunifiedSetSessionHandle.
5584 ///
5585 /// \param [in] hApp
5586 ///         HANDLE - Application handle
5587 /// \param [in] pServerName
5588 ///         PCSTR - Name of the server
5589 /// \param [in] uiSessionId
5590 ///         UI_32 - session id
5591 /// \param [in] iCmd
5592 ///         UI_32 - Protocol command
5593 /// \param [in] length
5594 ///         UI_32 - size of message data
5595 /// \param [in] data
5596 ///         PCVOID - message data
5597 ///
5598 /// \return status
5599 ///         EFrameworkunifiedStatus - success or error
5600 ///
5601 /// \see  FrameworkunifiedSetSessionHandle, FrameworkunifiedSendResponse
5602 ///
5603 ////////////////////////////////////////////////////////////////////////////////////////////
5604 EFrameworkunifiedStatus FrameworkunifiedSendRequest(HANDLE hApp, PCSTR pServerName, UI_32 uiSessionId, UI_32 iCmd,
5605                           UI_32 length, PCVOID data);
5606
5607 ////////////////////////////////////////////////////////////////////////////////////////////
5608 /// FrameworkunifiedNPSetPersonality
5609 /// API to send message to Notification Service to set Personality
5610 ///
5611 /// \param [in] hApp
5612 ///         HANDLE - Application Handle
5613 /// \param [in] pUserName
5614 ///         PCSTR - Name of the new Personality
5615 ///
5616 /// \return status
5617 ///         EFrameworkunifiedStatus - success or error
5618 ///
5619 /// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
5620 ///
5621 ////////////////////////////////////////////////////////////////////////////////////////////
5622 EFrameworkunifiedStatus FrameworkunifiedNPSetPersonality(HANDLE hApp, PCSTR pUserName);
5623
5624 ////////////////////////////////////////////////////////////////////////////////////////////
5625 /// FrameworkunifiedNPChangePersonality
5626 /// API to send message to Notification Service to set new Personality
5627 ///
5628 /// \param [in] hApp
5629 ///         HANDLE - Application Handle
5630 /// \param [in] pUserName
5631 ///         PCSTR - Name of the new Personality
5632 ///
5633 /// \return status
5634 ///         EFrameworkunifiedStatus - success or error
5635 ///
5636 /// \see FrameworkunifiedNPRegisterPersistentFile, FrameworkunifiedNPLoadPersistentFile
5637 ///
5638 ////////////////////////////////////////////////////////////////////////////////////////////
5639 EFrameworkunifiedStatus FrameworkunifiedNPChangePersonality(HANDLE hApp, PCSTR pUserName);
5640
5641 ////////////////////////////////////////////////////////////////////////////////////////////
5642 /// \ingroup  FrameworkunifiedSendStopToNSNPP
5643 /// \~english @par Brief
5644 ///        API that sends a message to the notification service and requests a shutdown
5645 /// \~english @param [in] hApp
5646 ///        HANDLE           - Handle for the application
5647 /// \~english @param [in] eShutdownType
5648 ///        EFrameworkunifiedShutdownType - Shutdown type
5649 /// \~english @param [in] uiStopMsgData
5650 ///        UI_32            - Flag subject to resetting (Default:0)
5651 /// \~english @retval eFrameworkunifiedStatusOK success
5652 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5653 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
5654 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
5655 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
5656 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
5657 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
5658 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
5659 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5660 /// \~english @par Prerequisite
5661 ///       - The process of NS_NPPService is started.
5662 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5663 /// \~english @par Change of internal state
5664 ///       - The internal state is not changed.
5665 /// \~english @par Conditions of processing failure
5666 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5667 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
5668 ///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
5669 ///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
5670 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
5671 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
5672 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
5673 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
5674 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
5675 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
5676 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
5677 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
5678 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
5679 /// \~english @par Detail
5680 ///       Sends a message to the notification service (NS_NPPService) and requests shutdown.\n
5681 ///       The reset target flag (uiStopMsgData) is valid only when the shutdown type (eShutdownType) is eFrameworkunifiedDataResetShutdown.\n
5682 ///       The reset target flag (uiStopMsgData) indicates the target of data reset at shutdown.\n
5683 ///       The target can be OR-set by using EFrameworkunifiedPersistCategory defined values.\n
5684 ///       The specified target is reset from the non-volatile memory.
5685 ///         Eg: uiStopMsgData = (eFrameworkunifiedUserData | eFrameworkunifiedFactoryCustomerData) = 0x0101\n
5686 ///           eFrameworkunifiedUserData bit            : 1 : user data resets\n
5687 ///           eFrameworkunifiedFactoryData bit         : 0 : factory data not reset-target\n
5688 ///           eFrameworkunifiedFactoryCustomerData bit : 1 : factory customer data resets\n
5689 ///           eFrameworkunifiedDealerData bit          : 0 : persist dealer data not reset-target\n
5690 /// \~english @par Classification
5691 ///          Public
5692 /// \~english @par Type
5693 ///         Sync
5694 /// \~english @see  
5695 ///
5696 /// FrameworkunifiedSendStopToNSNPP
5697 /// To be used by System Manager Service only. This API would push NPP Service to persist
5698 /// the data/files. Ideally this should be sent during system shutdown by System Manager Service
5699 ///
5700 /// \param [in] hApp
5701 ///         HANDLE - Application Handle
5702 ///
5703 /// \param [in] eShutdownType
5704 ///         EFrameworkunifiedShutdownType - shutdown type
5705 ///
5706 /// \param [in] uiStopMsgData
5707 ///         UI_32 - Flag representing which data to persist and which data to delete from
5708 ///         persistent memory during shutdown.
5709 ///         This needs to be specified only when shutdown type is eFrameworkunifiedDataResetShutdown.
5710 ///         If not specified with DataReset type, then NPP will do normal shutdown.
5711 ///         For other shutdown type this parameter has no effect.
5712 ///         uiStopMsgData = 0 means Normal shutdown persisting all data
5713 ///         else value from enum EFrameworkunifiedPersistCategory, multiple value from enum can be ORed.
5714 ///         Bit value 1 represent resetting of data while value 0 bit represent data persisting
5715 ///         Eg: uiStopMsgData = (eFrameworkunifiedUserData|eFrameworkunifiedFactoryCustomerData) = 0x0101 indicates
5716 ///           eFrameworkunifiedUserData bit value 1 means delete user data
5717 ///           eFrameworkunifiedFactoryData  bit value 0 means persist factory data
5718 ///           eFrameworkunifiedFactoryCustomerData bit value 1 means delete factory customer data
5719 ///           eFrameworkunifiedDealerData bit value 0 means persist dealer data
5720 ///
5721 /// \return status
5722 ///         EFrameworkunifiedStatus - success if request sent to NPPService or error
5723 /// \~english @par Type
5724 ///         Pub-Sub
5725 ///
5726 ////////////////////////////////////////////////////////////////////////////////////////////
5727 EFrameworkunifiedStatus FrameworkunifiedSendStopToNSNPP(HANDLE hApp, EFrameworkunifiedShutdownType eShutdownType, UI_32 uiStopMsgData = 0x0);
5728
5729 ////////////////////////////////////////////////////////////////////////////////////////////
5730 /// \ingroup  FrameworkunifiedNPGetReadyStatusOfNPP
5731 /// \~english @par Brief
5732 ///        APIs that send messages to notification services and obtain Ready status
5733 /// \~english @param [in] hApp
5734 ///        HANDLE           - Handle for the application
5735 /// \~english @retval eFrameworkunifiedStatusOK success
5736 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5737 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid handle type
5738 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
5739 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue full
5740 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid file descriptor
5741 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR Generating an interrupt by a system call (signal)
5742 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer size
5743 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5744 /// \~english @par Prerequisite
5745 ///       - The process of NS_NPPService is started.
5746 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5747 /// \~english @par Change of internal state
5748 ///       - The internal state is not changed.
5749 /// \~english @par Conditions of processing failure
5750 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5751 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
5752 ///       - When the application-name storage area address in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldParam]
5753 ///       - If the application name in the handle (hApp) specified by the arguments is empty, [eFrameworkunifiedStatusInvldParam]
5754 ///       - When the message queue handle in the handle (hApp) specified by the arguments is NULL, [eFrameworkunifiedStatusInvldHandle]
5755 ///       - When the message queue type of the handle (hApp) specified in the parameter is not the send type, [eFrameworkunifiedStatusInvldHndlType]
5756 ///       - If the message queue handle in the hApp specified by the arguments is inappropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
5757 ///       - The message queue name of the handle (hApp) specified in the arguments is not appropriate (the name exceeds NULL, 20 bytes) [eFrameworkunifiedStatusInvldHandle]
5758 ///       - Full Message Queue for Sessions for NPP Service [eFrameworkunifiedStatusMsgQFull]
5759 ///       - Incorrect file descriptors for sending messages for NPP Service sessions [eFrameworkunifiedStatusErrNoEBADF]
5760 ///       - When an interrupt by a system call (signal) occurs while sending NPP Service session-specific messages [eFrameworkunifiedStatusErrNoEINTR]
5761 ///       - Incorrectly sized send buffers for sessions destined for NPP Service [eFrameworkunifiedStatusInvldBufSize]
5762 ///       - If there are any errors sending messages for sessions intended for NPP Service [eFrameworkunifiedStatusFail]
5763 /// \~english @par Detail
5764 ///       Sends messages to the notification service (NS_NPPService) and acquires the Ready status.\n
5765 /// \~english @par Classification
5766 ///          Public
5767 /// \~english @par Type
5768 ///          Method
5769 /// \~english @see  
5770 ///
5771 /// FrameworkunifiedNPGetReadyStatusOfNPP
5772 /// To be used by System Manager Service only. SystemManager will use this API to get the
5773 /// ready status of NPPService.
5774 ///
5775 /// \param [in] hApp
5776 ///         HANDLE - Application Handle
5777 ///
5778 /// \return status
5779 ///         EFrameworkunifiedStatus - success if request sent to NPPService or error
5780 ///
5781 ////////////////////////////////////////////////////////////////////////////////////////////
5782 EFrameworkunifiedStatus FrameworkunifiedNPGetReadyStatusOfNPP(HANDLE hApp);
5783
5784 ////////////////////////////////////////////////////////////////////////////////////////////
5785 /// \ingroup FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification
5786 /// \~english @par Brief
5787 ///        Get the available service names
5788 /// \~english @param [in] hApp
5789 ///        HANDLE   - Handle for the application
5790 /// \~english @param [out] pServiceName
5791 ///        PSTR   - Invalid buffer size
5792 /// \~english @retval eFrameworkunifiedStatusOK success
5793 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5794 /// \~english @retval eFrameworkunifiedStatusFail Some error occurred
5795 /// \~english @par Prerequisite
5796 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5797 /// \~english @par Change of internal state
5798 ///       - The internal state is not changed.
5799 /// \~english @par Conditions of processing failure
5800 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5801 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldParam]
5802 ///       - When the service-name storage area (pServiceName) specified in the parameter is NULL, [eFrameworkunifiedStatusInvldParam]
5803 ///       - If the received message is not a service-availability notice... [eFrameworkunifiedStatusFail]
5804 ///       - Incoming messages are invalid [eFrameworkunifiedStatusFail]
5805 /// \~english @par Detail
5806 ///        When an application receives a service availability notification, it gets the name of the available service.
5807 /// \~english @par
5808 ///        Please note the following points when using this API for application.
5809 ///        - The application shall execute this API using an application handle passed as an argument to the callback function.\n
5810 ///         (The callback functions are executed after the information required to execute the APIs is stored in the application handles (hApp) by receiving messages in the frameworks.)
5811 ///        - The size of the buffer passed in the argument pServiceName must be at least MAX_NAME_SIZE_APP(20).
5812 /// \~english @par Classification
5813 ///          Public
5814 /// \~english @par Type
5815 ///          Not applicable
5816 /// \~english @see FrameworkunifiedIsServiceAvailable, FrameworkunifiedSubscribeNotificationWithCallback,
5817 ///                 FrameworkunifiedSubscribeNotificationsWithCallback
5818 ///
5819 /// To be used when client receives service availability notification to get the available
5820 /// service name.
5821 ///
5822 /// \param [in] hApp
5823 ///         HANDLE - Application Handle
5824 /// \param [out] pServiceName
5825 ///         PSTR - Name of the available service.
5826 ///          Size of the buffer should be equal to or greater than MAX_NAME_SIZE_APP
5827 ///
5828 /// \return status
5829 ///         EFrameworkunifiedStatus - success or error
5830 ////////////////////////////////////////////////////////////////////////////////////////////
5831 EFrameworkunifiedStatus FrameworkunifiedGetServiceNameOnServiceAvailabilityNotification(HANDLE hApp, PSTR pServiceName);
5832
5833 ////////////////////////////////////////////////////////////////////////////////////////////
5834 /// FrameworkunifiedGetCurrentUser
5835 /// Get the current user for the application
5836 ///
5837 /// \param [in] hApp
5838 ///         HANDLE - Application handle
5839 ///
5840 /// \return userhandle
5841 ///      HANDLE - Returns current user handle
5842 ///
5843 ///
5844 ////////////////////////////////////////////////////////////////////////////////////////////
5845 HANDLE FrameworkunifiedGetCurrentUser(HANDLE hApp);
5846
5847 ////////////////////////////////////////////////////////////////////////////////////////////
5848 /// FrameworkunifiedSetUser
5849 /// Set the current user for the application in application framework
5850 ///
5851 /// \param [in] hApp
5852 ///         HANDLE - Application handle
5853 /// \param [in] hUser
5854 ///         HANDLE - User handle
5855 ///
5856 /// \return status
5857 ///         EFrameworkunifiedStatus - success or error
5858 ///
5859 ///
5860 ////////////////////////////////////////////////////////////////////////////////////////////
5861 EFrameworkunifiedStatus FrameworkunifiedSetUser(HANDLE hApp, HANDLE hUser);
5862
5863 ////////////////////////////////////////////////////////////////////////////////////////////
5864 /// \ingroup FrameworkunifiedSetAppData
5865 /// \~english @par Brief
5866 ///        Hold the specified arbitrary data
5867 /// \~english @param [in] hApp
5868 ///        HANDLE   - Handle for the application
5869 /// \~english @param [in] pKey
5870 ///        PCSTR    - Key strings
5871 /// \~english @param [in] pData
5872 ///        PVOID    - Service name that can be used
5873 /// \~english @retval eFrameworkunifiedStatusOK success
5874 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
5875 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
5876 /// \~english @retval eFrameworkunifiedStatusFail Retention failure
5877 /// \~english @par Prerequisite
5878 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5879 /// \~english @par Change of internal state
5880 ///       - The internal state is not changed.
5881 /// \~english @par Conditions of processing failure
5882 ///       - If the hApp specified in the parameter is NULL, [eFrameworkunifiedStatusInvldHandle]
5883 ///       - If the hApp specified in the arguments is not appropriate (not valid) [eFrameworkunifiedStatusInvldHandle]
5884 ///       - If the addresses of the key strings are NULL [eFrameworkunifiedStatusInvldParam]
5885 ///       - Failed to retain arbitrary data. [eFrameworkunifiedStatusFail]
5886 /// \~english @par Detail
5887 ///       This function stores an arbitrary data address in the heap using the specified key string as a key.
5888 ///       Since the object to be held is an address, the caller must specify an accessible global address, etc.
5889 ///       The caller should pay attention to the addresses of arbitrary data, since they retain the addresses of arbitrary data even if they are NULL.
5890 /// \~english @par Classification
5891 ///          Public
5892 /// \~english @par Type
5893 ///          Set Get
5894 /// \~english @see FrameworkunifiedGetAppData, FrameworkunifiedRemoveAppData
5895 ///
5896 /// FrameworkunifiedSetAppData
5897 /// This API stores the data pointer against a key in application framework. This can be used
5898 /// as a global data and can be accessed in the FRAMEWORKUNIFIED functions. Please note that application
5899 /// developer should avoid using global data.
5900 ///
5901 /// \param [in] hApp
5902 ///         HANDLE - Application handle
5903 /// \param [in] pKey
5904 ///         PSTR - Data key
5905 /// \param [in] pData
5906 ///         PVOID - data
5907 /// \return status
5908 ///         EFrameworkunifiedStatus - success or error
5909 ///
5910 /// \see FrameworkunifiedGetAppData, FrameworkunifiedRemoveAppData
5911 ///
5912 ////////////////////////////////////////////////////////////////////////////////////////////
5913 EFrameworkunifiedStatus FrameworkunifiedSetAppData(HANDLE hApp, PCSTR pKey, PVOID pData);
5914
5915 ////////////////////////////////////////////////////////////////////////////////////////////
5916 /// \ingroup FrameworkunifiedGetAppData
5917 /// \~english @par Brief
5918 ///        Returns the address of any data associated with the key string
5919 /// \~english @param [in] hApp
5920 ///        HANDLE   - Handle for the application
5921 /// \~english @param [in] pKey
5922 ///        PCSTR    - Key strings
5923 /// \~english @retval PVOID Address of arbitrary data
5924 /// \~english @retval NULL NULL pointers (unsuccessful retrieval, anomaly parameters)
5925 /// \~english @par Prerequisite
5926 ///       - Creation/initialization (FrameworkunifiedCreateDispatcherWithoutLoop, etc.) of the Dispatcher for the application must be performed.
5927 /// \~english @par Change of internal state
5928 ///       - The internal state is not changed.
5929 /// \~english @par Conditions of processing failure
5930 ///       - If the hApp specified in the parameter is NULL, [NULL]
5931 ///       - If the hApp specified in the arguments is not appropriate (not valid) [NULL]
5932 ///       - If the addresses of the Key strings are NULL [NULL]
5933 /// \~english @par Detail
5934 ///       Returns the corresponding data address using the specified key string as the key.
5935 /// \~english @par Classification
5936 ///          Public
5937 /// \~english @par Type
5938 ///          Set Get
5939 /// \~english @see FrameworkunifiedSetAppData, FrameworkunifiedRemoveAppData
5940 ///
5941 /// FrameworkunifiedGetAppData
5942 /// This API retrieves the data stored against a key in application framework.
5943 ///
5944 /// \param [in] hApp
5945 ///         HANDLE - Application handle
5946 /// \param [in] pKey
5947 ///         PSTR - Data key
5948 /// \return [in] pData
5949 ///         PVOID - data
5950 ///
5951 /// \see FrameworkunifiedSetAppData, FrameworkunifiedRemoveAppData
5952 ////////////////////////////////////////////////////////////////////////////////////////////
5953 PVOID FrameworkunifiedGetAppData(HANDLE hApp, PCSTR pKey);
5954
5955 ////////////////////////////////////////////////////////////////////////////////////////////
5956 /// FrameworkunifiedRemoveAppData
5957 /// This API removes the data stored against a key in application framework.
5958 ///
5959 /// \param [in] hApp
5960 ///         HANDLE - Application handle
5961 /// \param [in] pKey
5962 ///         PSTR - Data key
5963 /// \return status
5964 ///         EFrameworkunifiedStatus - success or error
5965 ///
5966 /// \see FrameworkunifiedSetAppData, FrameworkunifiedGetAppData
5967 ///
5968 ////////////////////////////////////////////////////////////////////////////////////////////
5969 EFrameworkunifiedStatus FrameworkunifiedRemoveAppData(HANDLE hApp, PCSTR pKey);
5970
5971 ////////////////////////////////////////////////////////////////////////////////////////////
5972 /// FrameworkunifiedGetSystemInfo
5973 /// Gets some internal notification information
5974 ///
5975 /// \param [in] hApp
5976 ///         HANDLE - Handle to a Application Framework
5977 /// \param [in, out] pSystemInfo
5978 ///         PVOID - Buffer pointer to which system info is copied.
5979 ///
5980 /// \return status
5981 ///         EFrameworkunifiedStatus - success or error
5982 ///
5983 /// \see FrameworkunifiedMcOpenSender, FrameworkunifiedSendMsg, FrameworkunifiedGetMsgLength, FrameworkunifiedGetMsgSrc, FrameworkunifiedGetMsgDataOfSize,
5984 ///      FrameworkunifiedClearMsgData, FrameworkunifiedGetDataUSID, FrameworkunifiedForwardMessage, FrameworkunifiedGetSystemInfo
5985 ///
5986 ////////////////////////////////////////////////////////////////////////////////////////////
5987 EFrameworkunifiedStatus FrameworkunifiedGetSystemInfo(HANDLE hApp, PVOID pSystemInfo);
5988
5989 ////////////////////////////////////////////////////////////////////////////////////////////
5990 /// FrameworkunifiedSetDeferredSyncResponse
5991 /// Set sync response deferred flag
5992 ///
5993 /// \param [in] hApp
5994 ///         HANDLE - Handle to the dispatcher to receive message
5995 ///
5996 /// \return status
5997 ///         EFrameworkunifiedStatus - success or error
5998 ///
5999 ////////////////////////////////////////////////////////////////////////////////////////////
6000 EFrameworkunifiedStatus FrameworkunifiedSetDeferredSyncResponse(HANDLE hApp);
6001
6002 #endif /* __FRAMEWORKUNIFIED_NATIVESERVICES_FRAMEWORK_FRAMEWORKUNIFIED_FRAMEWORK_H__ */  // NOLINT  (build/header_guard)
6003 /**@}*/  // end of framework
6004 /**@}*/  // end of framework_unified
6005 /**@}*/  // end of native_service
6006 /**@}*/  // end of BaseSystem
6007 //@}