2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file ss_devicedetection_service_ifc.h
19 * @brief This file supports the Device Detection service interface.
22 /** @addtogroup BaseSystem
25 /** @addtogroup system_service
29 /** @addtogroup device_detection_service
30 * @ingroup system_service
33 /** @addtogroup device_manager
34 * @ingroup device_detection_service
38 #ifndef SS_DEVICE_DETECTION_SERVICE_IFC_H_ // NOLINT (build/header_guard)
39 #define SS_DEVICE_DETECTION_SERVICE_IFC_H_
41 #include <native_service/frameworkunified_types.h>
42 #include <native_service/frameworkunified_framework_types.h>
43 #include "system_service/ss_devicedetection_service_protocol.h"
45 // CID(Card Identification Register Data)of SD/MMC card
46 typedef struct T_cid {
47 UI_8 mid; // Manufacture ID
48 UI_8 oid[3]; // OEM/Application ID
49 UI_8 pnm[6]; // Product name
50 UI_8 prv; // Product revision
51 UI_32 psn; // Product serial number
52 UI_16 mdt; // Manufacture date code
53 UI_8 cr7cs; // CRC7 Check sum
57 * @class DeviceDetectionServiceIf
58 * \~english @brief Device detection
59 * \~english @par Brief Introduction
60 * Class to provide the device detection function
63 class DeviceDetectionServiceIf {
65 /////////////////////////////////////////////////////////////////////////////////////
66 /// \ingroup DeviceDetectionServiceIf
67 /// \~english @par Summary
68 /// Constructor of DeviceDetectionServiceIf class.
69 /// \~english @param None
70 /// \~english @retval None
71 /// \~english @par Preconditions
73 /// \~english @par Change of the internal state
74 /// - The internal state is not changed.
75 /// \~english @par Causes of failures
77 /// \~english @par Classification
79 /// \~english @par Type
81 /// \~english @par Detail
82 /// To generate a DeviceDetectionServiceIf class. \n
83 /// Member variables (m_hApp, m_hService, m_hSession) to be NULL initialization. \n
84 /// After the constructor, be sure to call Initialize method.
85 /// \~english @see ~DeviceDetectionServiceIf, Initialize
86 ////////////////////////////////////////////////////////////////////////////////////
87 DeviceDetectionServiceIf();
89 /////////////////////////////////////////////////////////////////////////////////////
90 /// \ingroup ~DeviceDetectionServiceIf
91 /// \~english @par Summary
92 /// Destructor of DeviceDetectionServiceIf class.
93 /// \~english @param None
94 /// \~english @retval None
95 /// \~english @par Preconditions
97 /// \~english @par Change of the internal state
98 /// - The internal state is not changed.
99 /// \~english @par Causes of failures
101 /// \~english @par Classification
103 /// \~english @par Type
105 /// \~english @par Detail
106 /// To delete a DeviceDetectionServiceIf class. \n
107 /// Session is the case still open, to close the session.\n
108 /// Service is the case still open, to close the service.
109 /// Member variables (m_hApp, m_hService, m_hSession) to be NULL initialization.
110 /// \~english @see DeviceDetectionServiceIf
111 ////////////////////////////////////////////////////////////////////////////////////
112 virtual ~DeviceDetectionServiceIf();
114 /////////////////////////////////////////////////////////////////////////////////////
115 /// \ingroup Initialize
116 /// \~english @par Summary
117 /// API to initialize the DeviceDetectionServiceIf class.
118 /// \~english @param [in] hApp
119 /// HANDLE - HANDLE for Application
120 /// \~english @retval TRUE Success
121 /// \~english @retval FALSE Failure
122 /// \~english @par Preconditions
123 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
125 /// \~english @par Change of the internal state
126 /// - The internal state is not changed.
127 /// \~english @par Causes of failures
128 /// Conditions for return FALSE is as follows.
129 /// - NULL handle specified in the argument
130 /// \~english @par Classification
132 /// \~english @par Type
133 /// Sync only(None communication)
134 /// \~english @par Detail
135 /// Application to use the services of device_detection_service is, after generating a \n
136 /// DeviceDetectionServiceIf class, which is a method to be executed first. \n
137 /// Member variable(m_hApp) of DeviceDetectionServiceIf class initialized with hApp \n
138 /// that has been specified by the argument.
139 /// \~english @see DeviceDetectionServiceIf
140 ////////////////////////////////////////////////////////////////////////////////////
141 BOOL Initialize(HANDLE hApp);
143 /////////////////////////////////////////////////////////////////////////////////////
144 /// \ingroup NotifyOnDeviceDetectionAvailability
145 /// \~english @par Summary
146 /// API to set the Callback function for Availability notification of Device Detection Service.
147 /// \~english @param [in] f_pCallBackFn
148 /// CbFuncPtr - Pointer to function callback for Device Detection Service Availability Notification
149 /// \~english @retval eFrameworkunifiedStatusOK Success
150 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
151 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
152 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
153 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
154 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
155 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
156 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
157 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
158 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
159 /// \~english @par Preconditions
160 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
162 /// \~english @par Change of the internal state
163 /// - The internal state is not changed.
164 /// \~english @par Causes of failures
165 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
166 /// - Callback function pointer specified by the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
167 /// - Can not get the App/Thread name from HANDLE in the class member variables (m_hApp).
168 /// [eFrameworkunifiedStatusInvldHandle]
169 /// - HANDLE (m_hApp) in the class member variables are not appropriate(which is invalid).
170 /// [eFrameworkunifiedStatusInvldParam]
171 /// - The acquisition of the buffer that stores the Callback information specified in the argument failed.
172 /// [eFrameworkunifiedStatusInvldParam]
173 /// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
174 /// [eFrameworkunifiedStatusFail]
175 /// - Message queue HANDLE is NULL in the HANDLE of the class member variables (m_hApp). [eFrameworkunifiedStatusInvldParam]
176 /// - Message queue HANDLE in HANDLE (m_hApp) of the class member variables are not appropriate(which is
177 /// invalid). [eFrameworkunifiedStatusInvldParam]
178 /// - It is not appropriate message queue name of HANDLE (m_hApp) in the class member variables(The name is
179 /// NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
180 /// - Is not a transmission type message queue type of HANDLE (m_hApp) in the class member variables.
181 /// [eFrameworkunifiedStatusInvldHndlType]
182 /// - Session message queue is full to SS_DeviceDetectionService. [eFrameworkunifiedStatusMsgQFull]
183 /// - It is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
184 /// [eFrameworkunifiedStatusErrNoEBADF]
185 /// - Interruption by the system call (signal) has occurred during the transmission of the session message for
186 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
187 /// - Incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
188 /// [eFrameworkunifiedStatusInvldBufSize]
189 /// - Any errors occur during the transmission of a session message to SS_DeviceDetectionService.
190 /// [eFrameworkunifiedStatusFail]
191 /// - It failed to shared memory access for transmission of the session message for SS_DeviceDetectionService.
192 /// [eFrameworkunifiedStatusErrOther]
193 /// \~english @par Classification
195 /// \~english @par Type
197 /// \~english @par Detail
198 /// Which is a method to register a Callback function for the initialization of the \n
199 /// device_detection_service receives the timing at which the start (open) is possible \n
200 /// of completed service.\n
201 /// (Native Service of API: Use the FrameworkunifiedSubscribeNotificationsWithCallback, to register \n
202 /// a Callback function for Availability notification of Device Detection Service.)
203 /// \~english @see DetachDeviceDetectionAvailabilityCb
204 ////////////////////////////////////////////////////////////////////////////////////
205 EFrameworkunifiedStatus NotifyOnDeviceDetectionAvailability(CbFuncPtr f_pCallBackFn);
207 /////////////////////////////////////////////////////////////////////////////////////
208 /// \ingroup NotifyOnOpenSessionAck
209 /// \~english @par Summary
210 /// API to set the Callback function for OpenSessionRequest response from the Device Detection Service.
211 /// \~english @param [in] f_pCallBackFn
212 /// CbFuncPtr - Callback function pointer for receiving the response of OpenSessionRequest
213 /// \~english @retval eFrameworkunifiedStatusOK Success
214 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
215 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
216 /// \~english @par Preconditions
217 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
219 /// \~english @par Change of the internal state
220 /// - The internal state is not changed.
221 /// \~english @par Causes of failures
222 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
223 /// - Callback function pointer specified by the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
224 /// - HANDLE (m_hApp) in the class member variables are not appropriate(which is invalid).
225 /// [eFrameworkunifiedStatusInvldParam]
226 /// \~english @par Classification
228 /// \~english @par Type
229 /// Sync only(None communication)
230 /// \~english @par Detail
231 /// To register the Callback function for receiving a response of completion of OpenSessionRequest to
233 /// (Native Service of API: Use the FrameworkunifiedAttachCallbackToDispatcher, to register a Callback function for receiving
235 /// a response of completion of OpenSessionRequest to Dispatcher.) \n
236 /// On successful session establishment, the client can register for device information.
237 /// \~english @see DetachOpenSessionAckCb
238 ////////////////////////////////////////////////////////////////////////////////////
239 EFrameworkunifiedStatus NotifyOnOpenSessionAck(CbFuncPtr f_pCallBackFn);
241 /////////////////////////////////////////////////////////////////////////////////////
242 /// \ingroup NotifyOnCloseSessionAck
243 /// \~english @par Summary
244 /// API to set the Callback function for CloseSessionRequest response from the Device Detection Service.
245 /// \~english @param [in] f_pCallBackFn
246 /// CbFuncPtr - Callback function pointer for receiving the response of CloseSessionRequest
247 /// \~english @retval eFrameworkunifiedStatusOK Success
248 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
249 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
250 /// \~english @par Preconditions
251 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
253 /// \~english @par Change of the internal state
254 /// - The internal state is not changed.
255 /// \~english @par Causes of failures
256 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
257 /// - Callback function pointer specified by the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
258 /// - HANDLE (m_hApp) in the class member variables are not appropriate(which is invalid).
259 /// [eFrameworkunifiedStatusInvldParam]
260 /// \~english @par Classification
262 /// \~english @par Type
263 /// Sync only(None communication)
264 /// \~english @par Detail
265 /// To register the Callback function for receiving a response of completion of CloseSessionRequest to
267 /// (Native Service of API: Use the FrameworkunifiedAttachCallbackToDispatcher, to register a Callback function for receiving
269 /// a response of completion of CloseSessionRequest to Dispatcher.) \n
270 /// \~english @see DetachCloseSessionAckCb
271 ////////////////////////////////////////////////////////////////////////////////////
272 EFrameworkunifiedStatus NotifyOnCloseSessionAck(CbFuncPtr f_pCallBackFn);
274 /////////////////////////////////////////////////////////////////////////////////////
275 /// \ingroup OpenSessionRequest
276 /// \~english @par Summary
277 /// API to perform the generation of the service/session of Device Detection Service
278 /// \~english @param None
279 /// \~english @retval eFrameworkunifiedStatusOK Success
280 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
281 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
282 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
283 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
284 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
285 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
286 /// \~english @par Preconditions
287 /// - SS_DeviceDetectionService process has been started.
288 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
289 /// has been done, and Availability of Device Detection Service is TRUE.
290 /// \~english @par Change of the internal state
291 /// - The internal state is not changed.
292 /// \~english @par Causes of failures
293 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
294 /// - Service of Device Detection Service is not Availability state. [eFrameworkunifiedStatusFail]
295 /// - Service of Device Detection Service can not be opened (can not start). [eFrameworkunifiedStatusFail]
296 /// - SS_DeviceDetectionService message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
297 /// - Is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
298 /// [eFrameworkunifiedStatusErrNoEBADF]
299 /// - Interruption by the system call (signal) has occurred during the transmission of the session message to
300 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
301 /// - It is an incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
302 /// [eFrameworkunifiedStatusInvldBufSize]
303 /// - Some sort of error has occurred at the time of transmission of the session message to
304 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusFail]
305 /// - It failed to shared memory access for transmission of the session message to SS_DeviceDetectionService.
306 /// [eFrameworkunifiedStatusErrOther]
307 /// \~english @par Classification
309 /// \~english @par Type
311 /// \~english @par Detail
312 /// And generate the service of device_detection_service, which is a method for generating a session.\n
313 /// (To send the command of PROTOCOL_OPEN_SESSION_REQ to device_detection_service.)\n
314 /// If you already service has been created, once to close the service.
315 /// \~english @see CloseSessionRequest
316 ////////////////////////////////////////////////////////////////////////////////////
317 EFrameworkunifiedStatus OpenSessionRequest();
319 /////////////////////////////////////////////////////////////////////////////////////
320 /// \ingroup DecodeOpenSessionResponse
321 /// \~english @par Summary
322 /// API to perform the generation of the service/session of Device Detection Service
323 /// \~english @param None
324 /// \~english @retval eFrameworkunifiedStatusOK Success
325 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
326 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
327 /// \~english @par Preconditions
328 /// - SS_DeviceDetectionService process has been started.
329 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
330 /// has been done, and Availability of Device Detection Service is TRUE.
331 /// \~english @par Change of the internal state
332 /// - The internal state is not changed.
333 /// \~english @par Causes of failures
334 /// - HANDLES in the class member variables (m_hService/m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
335 /// - Incorrect PROTOCOL_OPEN_SESSION_ACK message length of Device Detection Service. [eFrameworkunifiedStatusFail]
336 /// - PROTOCOL_OPEN_SESSION_ACK message of Device Detection Service can not be acquired. [eFrameworkunifiedStatusFail]
337 /// - Can not session generation of message transmission to Device Detection Service. [eFrameworkunifiedStatusFail]
338 /// \~english @par Classification
340 /// \~english @par Type
341 /// Sync only(None communication)
342 /// \~english @par Detail
343 /// Get the session initiation response message(PROTOCOL_OPEN_SESSION_ACK) of Device Detection \n
344 /// Service, and get the session ID from the message. \n
345 /// Acquired session ID, (after opening the message transmission queue) created after a session \n
346 /// of message transmission, hold as the session information in the session HANDLE (m_hSession).\n
347 /// of the class member variable.
348 /// \~english @see OpenSessionRequest, CloseSessionRequest
349 ////////////////////////////////////////////////////////////////////////////////////
350 EFrameworkunifiedStatus DecodeOpenSessionResponse();
352 /////////////////////////////////////////////////////////////////////////////////////
353 /// \ingroup RegisterForDeviceDetectionEvent
354 /// \~english @par Summary
355 /// API to register a Callback function for receiving the timing of when an event occurs in the device.
356 /// \~english @param [in] f_eDevDetectEvent
357 /// SS_DeviceDetectionServerEvents - Event type (USB/SD/...etc event)
358 /// \~english @param [in] f_pCallBackFn
359 /// CbFuncPtr - Pointer to a callback function that corresponds to the event
360 /// \~english @param [in] pfilepath
361 /// PCSTR - Pointer to the file path name(Non-support:Be NULL)
363 /// Event type (enum values of SS_DeviceDetectionServerEvents)
364 /// - SS_DEV_DETECT_ANY_USB_EV : Notify the insertion and mount path of USB MassStorage class(USB
365 /// mass storage is subject)
366 /// - SS_DEV_DETECT_ANY_SD_EV : Notify the insertion and mount path of SD card
367 /// - SS_DEV_INFO_ANY_USB_EV : Notify the USB device insertion and removal detection(All USB
368 /// devices are subject)
369 /// - SS_DEV_DETECT_ANY_DISC_EV : Notify the insertion of DISC(BD, DVD, CD) and mount path of block
371 /// - SS_DEV_DETECT_ANY_USB_NCM_EV : Notify the insertion and network IF name of the USB NCM class
372 /// device(for MirrorLink)
373 /// - SS_DEV_DETECT_ANY_USB__CWORD57__EV : Notify the insertion and removal and the device file name of the
374 /// _CWORD57_ device(Rather than the _CWORD57_ only class, the device is subject)
375 /// - SS_DEV_DETECT_ANY_USB_ACM_EV : Notify the insertion and removal and device file name of the USB
376 /// ACM class device(for DCM device)
377 /// - SS_DEV_DETECT_ANY_USB_DEV_MNG_EV : Notify the insertion and removal and device file name of the USB
378 /// DeviceManagementModel class(for DCM device)
379 /// - SS_DEV_DETECT_ANY_USB_VEHICLE_CTRL_EV : Notify the insertion and removal and device file name of the USB
380 /// Vehicle Control class(for DCM device)
381 /// - SS_DEV_DETECT_ANY_USB_DSRC_APP_EV : Notify the insertion and removal and device file name of the USB
382 /// DSRC Application class(for DSRC device)
383 /// - SS_DEV_DETECT_ANY_USB_DSRC_CTRL_EV : Notify the insertion and removal and device file name of the USB
384 /// DSRC Control class(for DSRC device)
385 /// - SS_DEV_DETECT_ANY_USB_IR_VICS_DATA_EV : Notify the insertion and removal and device file name of the USB
386 /// IR-VICS Data class(for DSRC device)
387 /// - SS_DEV_ERR_USB_OVER_CURRENT_EV : Notify the overcurrent detection error of USB
388 /// - SS_DEV_DETECT_ANY_USB_MTP_EV : Notify the insertion and mount path of USB MTP class device
389 /// - SS_DEV_INFO_ANY_USB_NOTIFY_EV : Notify the connection of non-compliant USB device
390 /// - SS_DEV_DETECT_ANY_USB__CWORD57__ROLE_EV : Notify the insertion and removal of the _CWORD57_ device after
391 /// RoleSW(Rather than the _CWORD57_ only class, the device is subject)
392 /// - SS_DEV_INFO_SD_FORMAT_COMP_EV : Notify the SD format results
393 /// - SS_DEV_DETECT_ANY_USB_DCM_NCM_EV : Notify the insertion and removal and network IF name of the USB
394 /// NCM class device(for DCM)
395 /// - SS_DEV_INFO_ANY_USB_DVDP_EV : Notify the insertion and removal of the DVD-P device
397 /// For SS_DEV_INFO_ANY_USB_NOTIFY_EV, it is also notified in the event the following conditions.
398 /// - When the enumeration failed.
399 /// - When it detects the current excess of the USB device connected to the bus power HUB.
400 /// - When it is detected that the number of the USB device has exceeded the number of support.
401 /// - When it is detected that the HUB is connected beyond the HUB number that supports.
402 /// \~english @retval eFrameworkunifiedStatusOK Success
403 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
404 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
405 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
406 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
407 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
408 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
409 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
410 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
411 /// \~english @retval eFrameworkunifiedStatusErrOther Other error(It failed to open/allocation of shared memory)
412 /// \~english @par Preconditions
413 /// - SS_DeviceDetectionService process has been started.
414 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
415 /// has been done, and Availability of Device Detection Service is TRUE.
416 /// \~english @par Change of the internal state
417 /// - The internal state is not changed.
418 /// \~english @par Causes of failures
419 /// - HANDLES in the class member variables (m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
420 /// - Callback function pointer specified by the argument is NULL. [eFrameworkunifiedStatusInvldHandle]
421 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
422 /// - HANDLE in the class member variables (m_hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldParam]
423 /// - HANDLE in the class member variables (m_hSession) is not appropriate. (which is invalid)
424 /// [eFrameworkunifiedStatusNullPointer]
425 /// - SS_DeviceDetectionService message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
426 /// - Message Queue HANDLE for the session for SS_DeviceDetectionService is NULL. [eFrameworkunifiedStatusInvldHandle]
427 /// - Message Queue HANDLE for the session for SS_DeviceDetectionService are not appropriate(which is invalid).
428 /// [eFrameworkunifiedStatusInvldHandle]
429 /// - Session message queue name to SS_DeviceDetectionService is NULL. [eFrameworkunifiedStatusInvldHandle]
430 /// - Is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
431 /// [eFrameworkunifiedStatusErrNoEBADF]
432 /// - Interruption by the system call (signal) has occurred during the transmission of the session message to
433 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
434 /// - It is an incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
435 /// [eFrameworkunifiedStatusInvldBufSize]
436 /// - Some sort of error has occurred at the time of transmission of the session message to
437 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusFail]
438 /// - It failed to shared memory access for transmission of the session message to SS_DeviceDetectionService.
439 /// [eFrameworkunifiedStatusErrOther]
440 /// \~english @par Classification
442 /// \~english @par Type
443 /// Pub-Sub x Pub-Sub
444 /// \~english @par Detail
445 /// Which is a method to register a callback function for receiving the timing of the \n
446 /// occurrence of an event in the device. \n
447 /// \~english @see UnRegisterForDeviceDetectionEvent
448 ////////////////////////////////////////////////////////////////////////////////////
449 EFrameworkunifiedStatus RegisterForDeviceDetectionEvent(
450 SS_DeviceDetectionServerEvents f_eDevDetectEvent, CbFuncPtr f_pCallBackFn,
451 PCSTR pfilepath = NULL);
453 /////////////////////////////////////////////////////////////////////////////////////
454 /// \ingroup UnRegisterForDeviceDetectionEvent
455 /// \~english @par Summary
456 /// API to release a Callback function that corresponds to the event notification from the device
457 /// \~english @param [in] f_eDevDetectEvent
458 /// SS_DeviceDetectionServerEvents - Event notification type (USB/SD/...etc event)
460 /// Releasable event notification type (enum values of SS_DeviceDetectionServerEvents)
461 /// - SS_DEV_DETECT_ANY_USB_EV : Notify the insertion and mount path of USB MassStorage class(USB
462 /// mass storage is subject)
463 /// - SS_DEV_DETECT_ANY_SD_EV : Notify the insertion and mount path of SD card
464 /// - SS_DEV_INFO_ANY_USB_EV : Notify the USB device insertion and removal detection(All USB
465 /// devices are subject)
466 /// - SS_DEV_DETECT_ANY_DISC_EV : Notify the insertion of DISC(BD, DVD, CD) and mount path of block
468 /// - SS_DEV_DETECT_ANY_USB_NCM_EV : Notify the insertion and network IF name of the USB NCM class
469 /// device(for MirrorLink)
470 /// - SS_DEV_DETECT_ANY_USB__CWORD57__EV : Notify the insertion and removal and the device file name of the
471 /// _CWORD57_ device(Rather than the _CWORD57_ only class, the device is subject)
472 /// - SS_DEV_DETECT_ANY_USB_ACM_EV : Notify the insertion and removal and device file name of the USB
473 /// ACM class device(for DCM device)
474 /// - SS_DEV_DETECT_ANY_USB_DEV_MNG_EV : Notify the insertion and removal and device file name of the USB
475 /// DeviceManagementModel class(for DCM device)
476 /// - SS_DEV_DETECT_ANY_USB_VEHICLE_CTRL_EV : Notify the insertion and removal and device file name of the USB
477 /// Vehicle Control class(for DCM device)
478 /// - SS_DEV_DETECT_ANY_USB_DSRC_APP_EV : Notify the insertion and removal and device file name of the USB
479 /// DSRC Application class(for DSRC device)
480 /// - SS_DEV_DETECT_ANY_USB_DSRC_CTRL_EV : Notify the insertion and removal and device file name of the USB
481 /// DSRC Control class(for DSRC device)
482 /// - SS_DEV_DETECT_ANY_USB_IR_VICS_DATA_EV : Notify the insertion and removal and device file name of the USB
483 /// IR-VICS Data class(for DSRC device)
484 /// - SS_DEV_ERR_USB_OVER_CURRENT_EV : Notify the overcurrent detection error of USB
485 /// - SS_DEV_DETECT_ANY_USB_MTP_EV : Notify the insertion and mount path of USB MTP class device
486 /// - SS_DEV_INFO_ANY_USB_NOTIFY_EV : Notify the connection of non-compliant USB device
487 /// - SS_DEV_DETECT_ANY_USB__CWORD57__ROLE_EV : Notify the insertion and removal of the _CWORD57_ device after
488 /// RoleSW(Rather than the _CWORD57_ only class, the device is subject)
489 /// - SS_DEV_INFO_SD_FORMAT_COMP_EV : Notify the SD format results
490 /// - SS_DEV_DETECT_FILEPATHNAME_EV : Notify the specified file access in pfilepath
491 /// - SS_DEV_DETECT_ANY_USB_DCM_NCM_EV : Notify the insertion and removal and network IF name of the USB
492 /// NCM class device(for DCM)
493 /// - SS_DEV_INFO_ANY_USB_DVDP_EV : Notify the insertion and removal of the DVD-P device
495 /// For SS_DEV_INFO_ANY_USB_NOTIFY_EV, it is also notified in the event the following conditions.
496 /// - When the enumeration failed.
497 /// - When it detects the current excess of the USB device connected to the bus power HUB.
498 /// - When it is detected that the number of the USB device has exceeded the number of support.
499 /// - When it is detected that the HUB is connected beyond the HUB number that supports.
500 /// \~english @retval eFrameworkunifiedStatusOK Success
501 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
502 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
503 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
504 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
505 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
506 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
507 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
508 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
509 /// \~english @retval eFrameworkunifiedStatusErrOther Other error(It failed to open/allocation of shared memory)
510 /// \~english @par Preconditions
511 /// - SS_DeviceDetectionService process has been started.
512 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
513 /// has been done, and Availability of Device Detection Service is TRUE.
514 /// \~english @par Change of the internal state
515 /// - The internal state is not changed.
516 /// \~english @par Causes of failures
517 /// - HANDLES in the class member variables (m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
518 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldParam]
519 /// - HANDLE in the class member variables (m_hApp) is not appropriate (which is invalid) [eFrameworkunifiedStatusInvldParam]
520 /// - The service can not be determined from the HANDLE in the class member variables (m_hApp). [eFrameworkunifiedStatusFail]
521 /// - HANDLE in the class member variables (m_hSession) is not appropriate. (which is invalid)
522 /// [eFrameworkunifiedStatusNullPointer]
523 /// - SS_DeviceDetectionService message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
524 /// - Message Queue HANDLE for the session for SS_DeviceDetectionService is NULL. [eFrameworkunifiedStatusInvldHandle]
525 /// - Message Queue HANDLE for the session for SS_DeviceDetectionService are not appropriate(which is invalid).
526 /// [eFrameworkunifiedStatusInvldHandle]
527 /// - Session message queue name to SS_DeviceDetectionService is NULL. [eFrameworkunifiedStatusInvldHandle]
528 /// - Is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
529 /// [eFrameworkunifiedStatusErrNoEBADF]
530 /// - Interruption by the system call (signal) has occurred during the transmission of the session message to
531 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
532 /// - It is an incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
533 /// [eFrameworkunifiedStatusInvldBufSize]
534 /// - Some sort of error has occurred at the time of transmission of the session message to
535 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusFail]
536 /// - It failed to shared memory access for transmission of the session message to SS_DeviceDetectionService.
537 /// [eFrameworkunifiedStatusErrOther]
538 /// \~english @par Classification
540 /// \~english @par Type
541 /// Pub-Sub x Pub-Sub
542 /// \~english @par Detail
543 /// Which is a method to release a callback function for receiving the timing of the \n
544 /// occurrence of an event in the device. \n
545 /// \~english @see RegisterForDeviceDetectionEvent
546 ////////////////////////////////////////////////////////////////////////////////////
547 EFrameworkunifiedStatus UnRegisterForDeviceDetectionEvent(
548 SS_DeviceDetectionServerEvents f_eDevDetectEvent);
550 /////////////////////////////////////////////////////////////////////////////////////
551 /// \ingroup CloseSessionRequest
552 /// \~english @par Summary
553 /// API to perform the destruction of services/session of Device Detection Service
554 /// \~english @param None
555 /// \~english @retval eFrameworkunifiedStatusOK Success
556 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
557 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
558 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
559 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
560 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
561 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
562 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
563 /// \~english @par Preconditions
564 /// - SS_DeviceDetectionService process has been started.
565 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
566 /// has been done, and Availability of Device Detection Service is TRUE.
567 /// \~english @par Change of the internal state
568 /// - The internal state is not changed.
569 /// \~english @par Causes of failures
570 /// - HANDLES in the class member variables (m_hService/m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
571 /// - SS_DeviceDetectionService message queue for the session is full. [eFrameworkunifiedStatusMsgQFull]
572 /// - Is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
573 /// [eFrameworkunifiedStatusErrNoEBADF]
574 /// - Interruption by the system call (signal) has occurred during the transmission of the session message to
575 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
576 /// - It is an incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
577 /// [eFrameworkunifiedStatusInvldBufSize]
578 /// - Some sort of error has occurred at the time of transmission of the session message to
579 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusFail]
580 /// - It failed to shared memory access for transmission of the session message to SS_DeviceDetectionService.
581 /// [eFrameworkunifiedStatusErrOther]
582 /// \~english @par Classification
584 /// \~english @par Type
586 /// \~english @par Detail
587 /// And destruct the service of device_detection_service, which is a method for destructing a session.\n
588 /// (To send the command of PROTOCOL_CLOSE_SESSION_REQ to device_detection_service.)\n
589 /// \~english @see OpenSessionRequest
590 ////////////////////////////////////////////////////////////////////////////////////
591 EFrameworkunifiedStatus CloseSessionRequest();
593 /////////////////////////////////////////////////////////////////////////////////////
594 /// \ingroup DetachDeviceDetectionAvailabilityCb
595 /// \~english @par Summary
596 /// API to release the Callback function for Availability notification of Device Detection Service.
597 /// \~english @param None
598 /// \~english @retval eFrameworkunifiedStatusOK Success
599 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
600 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
601 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
602 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
603 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
604 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
605 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
606 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
607 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
608 /// \~english @par Preconditions
609 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
610 /// has been done, and Availability of Device Detection Service is TRUE.
611 /// - The call-back function for Availability notification has been registered.
612 /// \~english @par Change of the internal state
613 /// - The internal state is not changed.
614 /// \~english @par Causes of failures
615 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
616 /// - Can not get the App/Thread name from HANDLE in the class member variables (m_hApp).
617 /// [eFrameworkunifiedStatusInvldHandle]
618 /// - HANDLE (m_hApp) in the class member variables are not appropriate(which is invalid).
619 /// [eFrameworkunifiedStatusInvldParam]
620 /// - Can not be acquired memory in the acquisition of the buffer of the message for transmission (malloc).
621 /// [eFrameworkunifiedStatusFail]
622 /// - Message queue HANDLE is NULL in the HANDLE of the class member variables (m_hApp). [eFrameworkunifiedStatusInvldParam]
623 /// - Message queue HANDLE in HANDLE (m_hApp) of the class member variables are not appropriate(which is
624 /// invalid). [eFrameworkunifiedStatusInvldParam]
625 /// - It is not appropriate message queue name of HANDLE (m_hApp) in the class member variables(The name is
626 /// NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
627 /// - Is not a transmission type message queue type of HANDLE (m_hApp) in the class member variables.
628 /// [eFrameworkunifiedStatusInvldHndlType]
629 /// - Callback function for Availability notification is not registered. [eFrameworkunifiedStatusFail]
630 /// - Session message queue is full to SS_DeviceDetectionService. [eFrameworkunifiedStatusMsgQFull]
631 /// - It is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
632 /// [eFrameworkunifiedStatusErrNoEBADF]
633 /// - Interruption by the system call (signal) has occurred during the transmission of the session message for
634 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
635 /// - Incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
636 /// [eFrameworkunifiedStatusInvldBufSize]
637 /// - Any errors occur during the transmission of a session message to SS_DeviceDetectionService.
638 /// [eFrameworkunifiedStatusFail]
639 /// - It failed to shared memory access for transmission of the session message for SS_DeviceDetectionService.
640 /// [eFrameworkunifiedStatusErrOther]
641 /// \~english @par Classification
643 /// \~english @par Type
644 /// Sync only(None communication)
645 /// \~english @par Detail
646 /// Is a method for releasing a Callback function registered to receive the timing \n
647 /// initialization is completed device_detection_service
648 /// (Native Service of API: Use the FrameworkunifiedUnsubscribeNotificationWithCallback, to release \n
649 /// a Callback function for Availability notification of Device Detection Service.)
650 /// \~english @see NotifyOnDeviceDetectionAvailability
651 ////////////////////////////////////////////////////////////////////////////////////
652 EFrameworkunifiedStatus DetachDeviceDetectionAvailabilityCb();
654 /////////////////////////////////////////////////////////////////////////////////////
655 /// \ingroup DetachOpenSessionAckCb
656 /// \~english @par Summary
657 /// API to release the Callback function for OpenSessionRequest response from the Device Detection Service.
658 /// \~english @param None
659 /// \~english @retval eFrameworkunifiedStatusOK Success
660 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
661 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
662 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
663 /// \~english @par Preconditions
664 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
666 /// \~english @par Change of the internal state
667 /// - The internal state is not changed.
668 /// \~english @par Causes of failures
669 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
670 /// - HANDLE (m_hApp) in the class member variables are not appropriate(which is invalid).
671 /// [eFrameworkunifiedStatusInvldParam]
672 /// - Not Callback function information of the release target is present. [eFrameworkunifiedStatusFail]
673 /// \~english @par Classification
675 /// \~english @par Type
676 /// Sync only(None communication)
677 /// \~english @par Detail
678 /// To cancel the Callback function for receiving a response of completion of OpenSessionRequest from
680 /// (Native Service of API: Use the FrameworkunifiedDetachCallbackFromDispatcher, to cancel a Callback function for receiving
682 /// a response of completion of OpenSessionRequest from Dispatcher.) \n
683 /// \~english @see NotifyOnOpenSessionAck
684 ////////////////////////////////////////////////////////////////////////////////////
685 EFrameworkunifiedStatus DetachOpenSessionAckCb();
687 /////////////////////////////////////////////////////////////////////////////////////
688 /// \ingroup DetachCloseSessionAckCb
689 /// \~english @par Summary
690 /// API to release the Callback function for CloseSessionRequest response from the Device Detection Service.
691 /// \~english @param None
692 /// \~english @retval eFrameworkunifiedStatusOK Success
693 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
694 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
695 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
696 /// \~english @par Preconditions
697 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
699 /// \~english @par Change of the internal state
700 /// - The internal state is not changed.
701 /// \~english @par Causes of failures
702 /// - HANDLES in the class member variables (m_hApp) is NULL. [eFrameworkunifiedStatusInvldHandle]
703 /// - HANDLE (m_hApp) in the class member variables are not appropriate(which is invalid).
704 /// [eFrameworkunifiedStatusInvldParam]
705 /// - Not Callback function information of the release target is present. [eFrameworkunifiedStatusFail]
706 /// \~english @par Classification
708 /// \~english @par Type
709 /// Sync only(None communication)
710 /// \~english @par Detail
711 /// To cancel the Callback function for receiving a response of completion of CloseSessionRequest from
713 /// (Native Service of API: Use the FrameworkunifiedDetachCallbackFromDispatcher, to cancel a Callback function for receiving
715 /// a response of completion of CloseSessionRequest from Dispatcher.) \n
716 /// \~english @see NotifyOnCloseSessionAck
717 ////////////////////////////////////////////////////////////////////////////////////
718 EFrameworkunifiedStatus DetachCloseSessionAckCb();
720 /////////////////////////////////////////////////////////////////////////////////////
722 /// \~english @par Summary
723 /// API to mount the specified SD partition
724 /// \~english @param [in] part_num
725 /// uint8_t - Partition number of SD card(From 0 to 3)
726 /// \~english @param [out] already_mounted
727 /// BOOL* - Mount existence result
729 /// - TRUE : Already mount
730 /// - FALSE : Mount request is accepted. Wait for mount notification.
731 /// \~english @retval eFrameworkunifiedStatusOK Success
732 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
733 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
734 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
735 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
736 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
737 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
738 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
739 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
740 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
741 /// \~english @retval eFrameworkunifiedStatusAccessError Access error occurred
742 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
743 /// \~english @par Preconditions
744 /// - SS_DeviceDetectionService process has been started.
745 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
746 /// has been done, and Availability of Device Detection Service is TRUE.
747 /// \~english @par Change of the internal state
748 /// - The internal state is not changed.
749 /// \~english @par Causes of failures
750 /// - HANDLES in the class member variables (m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
751 /// - SD card partition number (part_num) exceeds the 3 specified by the argument. [eFrameworkunifiedStatusInvldParam]
752 /// - Can not have access to the device file for the SD. [eFrameworkunifiedStatusAccessError]
753 /// - HANDLE (m_hSession) in the class member variables are not appropriate(which is invalid).
754 /// [eFrameworkunifiedStatusNullPointer]
755 /// - Message queue HANDLE is NULL in the HANDLE of the class member variables (m_hSession).
756 /// [eFrameworkunifiedStatusInvldHandle]
757 /// - HANDLE in the class member variables (m_hSession) in the message queue name is NULL.
758 /// [eFrameworkunifiedStatusInvldHandle]
759 /// - Message queue HANDLE in HANDLE (m_hSession) of the class member variables are not appropriate(which is
760 /// invalid). [eFrameworkunifiedStatusInvldHandle]
761 /// - It is not appropriate message queue name of HANDLE (m_hSession) in the class member variables(The name is
762 /// NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
763 /// - Is not a transmission type message queue type of HANDLE (m_hSession) in the class member variables.
764 /// [eFrameworkunifiedStatusInvldHndlType]
765 /// - Session message queue is full to SS_DeviceDetectionService. [eFrameworkunifiedStatusMsgQFull]
766 /// - It is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
767 /// [eFrameworkunifiedStatusErrNoEBADF]
768 /// - Interruption by the system call (signal) has occurred during the transmission of the session message for
769 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
770 /// - Incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
771 /// [eFrameworkunifiedStatusInvldBufSize]
772 /// - Any errors occur during the transmission of a session message to SS_DeviceDetectionService.
773 /// [eFrameworkunifiedStatusFail]
774 /// - It failed to shared memory access for transmission of the session message for SS_DeviceDetectionService.
775 /// [eFrameworkunifiedStatusErrOther]
776 /// \~english @par Classification
778 /// \~english @par Type
780 /// \~english @par Detail
781 /// The API is a method used to mount the specified partition (area).\n
782 /// The target device is an SD card.
783 /// Service(Thread) to call this method is not limited. Therefore, \n
784 /// to be utilized as a mismatch does not occur between the service \n
785 /// to use the SD card. \n
786 /// SD card in the specified partition, already returned eFrameworkunifiedStatusOK \n
787 /// if mount existence results (already_mounted) in the TRUE that is mounted.\n
788 /// If it is not already mounted mount existence results (already_mounted) \n
789 /// and to FALSE, then carry out the SD of the mount request to Device \n
790 /// Detection Service.
791 /// \~english @see UmountSD, RegisterForDeviceDetectionEvent
792 ////////////////////////////////////////////////////////////////////////////////////
793 EFrameworkunifiedStatus MountSD(uint8_t part_num, BOOL *already_mounted);
795 /////////////////////////////////////////////////////////////////////////////////////
796 /// \ingroup UmountSD
797 /// \~english @par Summary
798 /// API to mount the specified SD partition
799 /// \~english @param [in] part_num
800 /// uint8_t - Partition number of SD card(From 0 to 3)
801 /// \~english @param [out] already_umounted
802 /// BOOL* - Mount existence result
804 /// - TRUE : Already umount
805 /// - FALSE : Umount request is accepted. Wait for umount notification.
806 /// \~english @retval eFrameworkunifiedStatusOK Success
807 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
808 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
809 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
810 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
811 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
812 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
813 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
814 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
815 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
816 /// \~english @retval eFrameworkunifiedStatusAccessError Access error occurred
817 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
818 /// \~english @par Preconditions
819 /// - SS_DeviceDetectionService process has been started.
820 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
821 /// has been done, and Availability of Device Detection Service is TRUE.
822 /// \~english @par Change of the internal state
823 /// - The internal state is not changed.
824 /// \~english @par Causes of failures
825 /// - HANDLES in the class member variables (m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
826 /// - SD card partition number (part_num) exceeds the 3 specified by the argument. [eFrameworkunifiedStatusInvldParam]
827 /// - Can not have access to the device file for the SD. [eFrameworkunifiedStatusAccessError]
828 /// - HANDLE (m_hSession) in the class member variables are not appropriate(which is invalid).
829 /// [eFrameworkunifiedStatusNullPointer]
830 /// - Message queue HANDLE is NULL in the HANDLE of the class member variables (m_hSession).
831 /// [eFrameworkunifiedStatusInvldHandle]
832 /// - HANDLE in the class member variables (m_hSession) in the message queue name is NULL.
833 /// [eFrameworkunifiedStatusInvldHandle]
834 /// - Message queue HANDLE in HANDLE (m_hSession) of the class member variables are not appropriate(which is
835 /// invalid). [eFrameworkunifiedStatusInvldHandle]
836 /// - It is not appropriate message queue name of HANDLE (m_hSession) in the class member variables(The name is
837 /// NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
838 /// - Is not a transmission type message queue type of HANDLE (m_hSession) in the class member variables.
839 /// [eFrameworkunifiedStatusInvldHndlType]
840 /// - Session message queue is full to SS_DeviceDetectionService. [eFrameworkunifiedStatusMsgQFull]
841 /// - It is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
842 /// [eFrameworkunifiedStatusErrNoEBADF]
843 /// - Interruption by the system call (signal) has occurred during the transmission of the session message for
844 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
845 /// - Incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
846 /// [eFrameworkunifiedStatusInvldBufSize]
847 /// - Any errors occur during the transmission of a session message to SS_DeviceDetectionService.
848 /// [eFrameworkunifiedStatusFail]
849 /// - It failed to shared memory access for transmission of the session message for SS_DeviceDetectionService.
850 /// [eFrameworkunifiedStatusErrOther]
851 /// \~english @par Classification
853 /// \~english @par Type
855 /// \~english @par Detail
856 /// The API is a method used to mount the specified partition (area).\n
857 /// The target device is an SD card.
858 /// Service(Thread) to call this method is not limited. Therefore, \n
859 /// to be utilized as a mismatch does not occur between the service \n
860 /// to use the SD card. \n
861 /// SD card in the specified partition, already returned eFrameworkunifiedStatusOK \n
862 /// if unmount existence results (already_unmounted) in the TRUE that is unmounted.
863 /// If it is not already unmounted unmount existence results (already_unmounted) \n
864 /// and to FALSE, then carry out the SD of the unmount request to Device \n
865 /// Detection Service. \n
866 /// That all of the services specifically, to call this API after the close \n
867 /// completion of the directory and file of the SD card. \n
868 /// Also, do not call this API in a state in which a directory on the SD card \n
869 /// in the current directory. (At SD drive processing threads in SS_DeviceDetectionService, \n
870 /// umount fails, error of SS_DEV_ERR_BUSY is returned as an asynchronous notification \n
872 /// \~english @see MountSD, RegisterForDeviceDetectionEvent
873 ////////////////////////////////////////////////////////////////////////////////////
874 EFrameworkunifiedStatus UmountSD(uint8_t part_num, BOOL *already_umounted);
876 /////////////////////////////////////////////////////////////////////////////////////
877 /// \ingroup UsbVBusReset
878 /// \~english @par Summary
879 /// API to reset the VBUS of the specified USB port
880 /// \~english @param [in] port
881 /// uint8_t - USB port number
882 /// \~english @param [in] inteval
883 /// uint8_t - interval (interval * 100 [msec])
884 /// \~english @retval eFrameworkunifiedStatusOK Success
885 /// \~english @retval eFrameworkunifiedStatusInvldParam Invalid parameter
886 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
887 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
888 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
889 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
890 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
891 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
892 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
893 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
894 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
895 /// \~english @par Preconditions
896 /// - SS_DeviceDetectionService process has been started.
897 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
898 /// has been done, and Availability of Device Detection Service is TRUE.
899 /// - Checking USB port number should be done before calling this API.
900 /// \~english @par Change of the internal state
901 /// - The internal state is not changed.
902 /// \~english @par Causes of failures
903 /// - HANDLES in the class member variables (m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
904 /// - Environment variable (TARGET_BOARD) is not defined. [eFrameworkunifiedStatusFail]
905 /// [eFrameworkunifiedStatusInvldParam]
906 /// - Name of the target board in the environment variable (TARGET_BOARD) is not correct. [eFrameworkunifiedStatusInvldParam]
907 /// - HANDLE (m_hSession) in the class member variables are not appropriate(which is invalid).
908 /// [eFrameworkunifiedStatusNullPointer]
909 /// - Message queue HANDLE is NULL in the HANDLE of the class member variables (m_hSession).
910 /// [eFrameworkunifiedStatusInvldHandle]
911 /// - HANDLE in the class member variables (m_hSession) in the message queue name is NULL.
912 /// [eFrameworkunifiedStatusInvldHandle]
913 /// - Message queue HANDLE in HANDLE (m_hSession) of the class member variables are not appropriate(which is
914 /// invalid). [eFrameworkunifiedStatusInvldHandle]
915 /// - It is not appropriate message queue name of HANDLE (m_hSession) in the class member variables(The name is
916 /// NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
917 /// - Is not a transmission type message queue type of HANDLE (m_hSession) in the class member variables.
918 /// [eFrameworkunifiedStatusInvldHndlType]
919 /// - Session message queue is full to SS_DeviceDetectionService. [eFrameworkunifiedStatusMsgQFull]
920 /// - It is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
921 /// [eFrameworkunifiedStatusErrNoEBADF]
922 /// - Interruption by the system call (signal) has occurred during the transmission of the session message for
923 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
924 /// - Incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
925 /// [eFrameworkunifiedStatusInvldBufSize]
926 /// - Any errors occur during the transmission of a session message to SS_DeviceDetectionService.
927 /// [eFrameworkunifiedStatusFail]
928 /// - It failed to shared memory access for transmission of the session message for SS_DeviceDetectionService.
929 /// [eFrameworkunifiedStatusErrOther]
930 /// \~english @par Classification
932 /// \~english @par Type
933 /// Fire and Forget only
934 /// \~english @par Detail
935 /// The API is a method for resetting the VBUS of the specified USB port.\n
936 /// Environment variable (TARGET_BOARD) is defined in the configure options \n
937 /// specified at the time of build. \n
938 /// (Example. TARGET_BOARD:_CWORD71__CWORD91__e2_na_t__CWORD84_2__CWORD71_) \n
939 /// Before reset USB port for DCM, the device files(dcm_acm, dcm_vc, dcm_wdm) \n
940 /// related to DCM-related must be closed. \n
941 /// *) Device file may not be created correctly when the process of Disconnect/Connect \n
942 /// without closing to work.
943 /// \~english @see None
944 ////////////////////////////////////////////////////////////////////////////////////
945 EFrameworkunifiedStatus UsbVBusReset(int8_t port);
946 EFrameworkunifiedStatus UsbVBusReset(int8_t port, uint8_t interval);
948 /////////////////////////////////////////////////////////////////////////////////////
949 /// \ingroup RoleSwStateNotify
950 /// \~english @par Summary
951 /// API to notify RoleSW state
952 /// \~english @param [in] state
953 /// SS_DEV_ROLE_SW_STATE - RoleSW state
955 /// enum variable SS_DEV_ROLE_SW_STATE
956 /// - SS_DEV_ROLE_SW_START : Start
957 /// - SS_DEV_ROLE_SW_BEGIN_END : Beginning of End
958 /// - SS_DEV_ROLE_SW_END : End
959 /// - SS_DEV_ROLE_SW_RESTART : Restart
960 /// \~english @retval eFrameworkunifiedStatusOK Success
961 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
962 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
963 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
964 /// \~english @retval eFrameworkunifiedStatusInvldQName Invalid Message Queue Name
965 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
966 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
967 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
968 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
969 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
970 /// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
971 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
972 /// \~english @par Preconditions
973 /// - SS_DeviceDetectionService process has been started.
974 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
975 /// has been done, and Availability of Device Detection Service is TRUE.
976 /// \~english @par Change of the internal state
977 /// - The internal state is not changed.
978 /// \~english @par Causes of failures
979 /// - HANDLES in the class member variables (m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
980 /// - HANDLE (m_hSession) in the class member variables are not appropriate(which is invalid).
981 /// [eFrameworkunifiedStatusNullPointer]
982 /// - It failed to open the message queue for messages received from SS_DeviceDetectionService. [eFrameworkunifiedStatusFail]
983 /// - It failed to buffer acquisition for messages received from SS_DeviceDetectionService(malloc failure).
984 /// [eFrameworkunifiedStatusFail]
985 /// - It failed to create a sequence ID of the message to be sent to the SS_DeviceDetectionService.
986 /// [eFrameworkunifiedStatusFail]
987 /// - Message queue HANDLE is NULL in the HANDLE of the class member variables (m_hSession).
988 /// [eFrameworkunifiedStatusInvldHandle]
989 /// - HANDLE in the class member variables (m_hSession) in the message queue name is NULL.
990 /// [eFrameworkunifiedStatusInvldHandle]
991 /// - Message queue HANDLE name in the HANDLE (m_hSession) in the class member variables is NULL.
992 /// [eFrameworkunifiedStatusInvldQName]
993 /// - Message queue HANDLE name in the HANDLE (hService) in the class member variables exceeds 20byte.
994 /// [eFrameworkunifiedStatusInvldQName]
995 /// - Message queue HANDLE in HANDLE (m_hSession) of the class member variables are not appropriate(which is
996 /// invalid). [eFrameworkunifiedStatusInvldHandle]
997 /// - It is not appropriate message queue name of HANDLE (m_hSession) in the class member variables(The name is
998 /// NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
999 /// - Is not a transmission type message queue type of HANDLE (m_hSession) in the class member variables.
1000 /// [eFrameworkunifiedStatusInvldHndlType]
1001 /// - Session message queue is full to SS_DeviceDetectionService. [eFrameworkunifiedStatusMsgQFull]
1002 /// - It is invalid send and receive file descriptor of the session message to SS_DeviceDetectionService.
1003 /// [eFrameworkunifiedStatusErrNoEBADF]
1004 /// - Interruption by the system call (signal) has occurred during the send and receive of the session message
1005 /// for SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
1006 /// - Incorrect size of the send and receive buffer of the session message to SS_DeviceDetectionService.
1007 /// [eFrameworkunifiedStatusInvldBufSize]
1008 /// - Any errors occur during the send and receive of a session message to SS_DeviceDetectionService.
1009 /// [eFrameworkunifiedStatusFail]
1010 /// - It failed to shared memory access for send and receive of the session message for
1011 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrOther]
1012 /// - It failed to connect to the socket for the response message to be received from SS_DeviceDetectionService.
1013 /// [eFrameworkunifiedStatusFail]
1014 /// - It failed to wait control of the response message received from SS_DeviceDetectionService.
1015 /// [eFrameworkunifiedStatusFail]
1016 /// - Interruption by the system call (signal) has occurred in wait in the response message received from
1017 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusFail]
1018 /// - After the failure at the time of the response message received from SS_DeviceDetectionService, it failed
1019 /// to re-connection of the Socket. [eFrameworkunifiedStatusBadConnection]
1020 /// \~english @par Classification
1022 /// \~english @par Type
1024 /// \~english @par Detail
1025 /// By executing this API, Device Detection Service recognizes the state \n
1026 /// has been switched from the USB Host due to RoleSW to USB Function. \n
1027 /// The initial state of Detection is a state(SS_DEV_ROLE_SW_END:End state) \n
1028 /// that has not been RoleSW. \n
1029 /// (It is a state that accepts a SS_DEV_ROLE_SW_START:Start.)
1030 /// \~english @see None
1031 ////////////////////////////////////////////////////////////////////////////////////
1032 EFrameworkunifiedStatus RoleSwStateNotify(SS_DEV_ROLE_SW_STATE state);
1034 /////////////////////////////////////////////////////////////////////////////////////
1035 /// \ingroup FormatSD
1036 /// \~english @par Summary
1037 /// API to Format SD
1038 /// \~english @param None
1039 /// \~english @retval eFrameworkunifiedStatusOK Success
1040 /// \~english @retval eFrameworkunifiedStatusInvldHandle Invalid handle
1041 /// \~english @retval eFrameworkunifiedStatusNullPointer Invalid pointer
1042 /// \~english @retval eFrameworkunifiedStatusInvldHndlType Invalid type of handle
1043 /// \~english @retval eFrameworkunifiedStatusMsgQFull Message queue is full
1044 /// \~english @retval eFrameworkunifiedStatusErrNoEBADF Invalid File-Descriptor
1045 /// \~english @retval eFrameworkunifiedStatusErrNoEINTR An interrupt is generated by the system call (signal)
1046 /// \~english @retval eFrameworkunifiedStatusInvldBufSize Invalid buffer-size
1047 /// \~english @retval eFrameworkunifiedStatusFail Some sort of error occurred
1048 /// \~english @retval eFrameworkunifiedStatusAccessError Access error occurred
1049 /// \~english @retval eFrameworkunifiedStatusBadConnection It can not be a socket connection
1050 /// \~english @retval eFrameworkunifiedStatusErrOther Other error has occurred(Cannot access shared memory, etc.)
1051 /// \~english @par Preconditions
1052 /// - SS_DeviceDetectionService process has been started.
1053 /// - Generation/initialization of Dispatcher for the Application (FrameworkunifiedCreateDispatcherWithoutLoop etc) \n
1054 /// has been done, and Availability of Device Detection Service is TRUE.
1055 /// \~english @par Change of the internal state
1056 /// - The internal state is not changed.
1057 /// \~english @par Causes of failures
1058 /// - HANDLES in the class member variables (m_hSession) is NULL. [eFrameworkunifiedStatusInvldHandle]
1059 /// - Can not have access to the device file for the SD. [eFrameworkunifiedStatusAccessError]
1060 /// - HANDLE (m_hSession) in the class member variables are not appropriate(which is invalid).
1061 /// [eFrameworkunifiedStatusNullPointer]
1062 /// - Message queue HANDLE is NULL in the HANDLE of the class member variables (m_hSession).
1063 /// [eFrameworkunifiedStatusInvldHandle]
1064 /// - HANDLE in the class member variables (m_hSession) in the message queue name is NULL.
1065 /// [eFrameworkunifiedStatusInvldHandle]
1066 /// - Message queue HANDLE in HANDLE (m_hSession) of the class member variables are not appropriate(which is
1067 /// invalid). [eFrameworkunifiedStatusInvldHandle]
1068 /// - It is not appropriate message queue name of HANDLE (m_hSession) in the class member variables(The name is
1069 /// NULL, more than 20byte). [eFrameworkunifiedStatusInvldHandle]
1070 /// - Is not a transmission type message queue type of HANDLE (m_hSession) in the class member variables.
1071 /// [eFrameworkunifiedStatusInvldHndlType]
1072 /// - Session message queue is full to SS_DeviceDetectionService. [eFrameworkunifiedStatusMsgQFull]
1073 /// - It is invalid transmission file descriptor of the session message to SS_DeviceDetectionService.
1074 /// [eFrameworkunifiedStatusErrNoEBADF]
1075 /// - Interruption by the system call (signal) has occurred during the transmission of the session message for
1076 /// SS_DeviceDetectionService. [eFrameworkunifiedStatusErrNoEINTR]
1077 /// - Incorrect size of the transmit buffer of the session message to SS_DeviceDetectionService.
1078 /// [eFrameworkunifiedStatusInvldBufSize]
1079 /// - Any errors occur during the transmission of a session message to SS_DeviceDetectionService.
1080 /// [eFrameworkunifiedStatusFail]
1081 /// - It failed to shared memory access for transmission of the session message for SS_DeviceDetectionService.
1082 /// [eFrameworkunifiedStatusErrOther]
1083 /// \~english @par Detail
1084 /// The SD card inserted into the _CWORD84_ side in this API is formatted in compliance with the SD standard.\n
1085 /// A result of format implementation is notified by SS_DEV_INFO_SD_FORMAT_COMP_EV events.\n
1086 /// String pickled notification content and the result is as follows.\n
1087 /// - SS_DEV_OK : Format success \n
1088 /// - SS_DEV_ERR_BUSY : For unmount unexecuted, format failure \n
1089 /// - SS_DEV_ERR : Format fails for any other factors
1090 /// \~english @par Classification
1092 /// \~english @par Type
1095 /// This API is able to call after the SD card umount completion and the device file close of \n
1096 /// SD card is complete.\n
1097 /// If the SD card umount of has not been completed, SS_DEV_ERR_BUSY is notified.\n
1098 /// If the device file of the SD card has not been close, although it is the format becomes \n
1099 /// the operation completed, there can be no assurance of the operation.
1100 /// \~english @see MountSD, UmountSD, RegisterForDeviceDetectionEvent
1101 ////////////////////////////////////////////////////////////////////////////////////
1102 EFrameworkunifiedStatus FormatSD(void);
1105 HANDLE OpenService();
1106 UI_8 Crc7Checksum(UI_8 *data, UI_8 sz);
1110 BOOL CheckDetectEvent(SS_DeviceDetectionServerEvents f_eDevDetectEvent);
1113 #endif /* SS_DEVICE_DETECTION_SERVICE_IFC_H_ */ // NOLINT (build/header_guard)
1115 /** @}*/ // end of device_manager
1116 /** @}*/ // end of device_detection_service
1117 /** @}*/ // end of system_service
1118 /** @}*/ // end of BaseSystem