*/
int usb_host_interface_set_altsetting(usb_host_interface_h interface, int altsetting);
+/**
+ * @ingroup CAPI_USB_HOST_INTERFACE_MODULE
+ * @brief Gets current alternative setting from an interface.
+ * @since_tizen 4.0
+ * @param[in] interface Interface handle
+ * @param[out] altsetting Index of alternative setting set for the given interface
+ * @return 0 on success, otherwise a negative error value
+ * @retval #USB_HOST_ERROR_NONE Successful
+ * @retval #USB_HOST_ERROR_NOT_SUPPORTED Not supported
+ * @retval #USB_HOST_ERROR_INVALID_PARAMETER Invalid parameter was passed
+ */
+int usb_host_interface_get_altsetting(usb_host_interface_h interface, int *altsetting);
+
/**
* @ingroup CAPI_USB_HOST_INTERFACE_MODULE
* @brief Gets string describing an interface.
return 0;
}
+int usb_host_interface_get_altsetting(usb_host_interface_h interface, int *altsetting)
+{
+ if (!usb_host_feature_enabled())
+ return USB_HOST_ERROR_NOT_SUPPORTED;
+
+ if (!interface || !altsetting) {
+ _E("Invalid parameter was passed");
+ return USB_HOST_ERROR_INVALID_PARAMETER;
+ }
+
+ *altsetting = interface->altsetting;
+ return 0;
+}
+
int usb_host_config_get_interface(usb_host_config_h config, int interface_index, usb_host_interface_h *interface)
{
if (!usb_host_feature_enabled())