diff --git a/usb/v2_0/IUsbDeviceInterface.idl b/usb/v2_0/IUsbDeviceInterface.idl index 1b3c9244d04a6b3721aaefb9c9fb6d022fbf87c8..09ebc69fd742bfc9d5175a24cf5630ce34d4b939 100644 --- a/usb/v2_0/IUsbDeviceInterface.idl +++ b/usb/v2_0/IUsbDeviceInterface.idl @@ -30,6 +30,7 @@ package ohos.hdi.usb.v2_0; +import ohos.hdi.usb.v2_0.UsbTypes; import ohos.hdi.usb.v2_0.IUsbdSubscriber; interface IUsbDeviceInterface { @@ -108,4 +109,32 @@ interface IUsbDeviceInterface { * @version 1.0 */ UnbindUsbdDeviceSubscriber([in] IUsbdSubscriber subscriber); + + /* * + * @brief Manage the authorization of the USB device. + * + * @param devNum Indicates the bus number of the USB device. + * @param devAddr Indicates the USB device address. + * @param authorized Indicates whether to authorize the USB device. + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 6.0 + * @version 1.0 + */ + UsbDeviceAuthorize([in] unsigned char busNum, [in] unsigned char devAddr, [in] boolean authorized); + + /* * + * @brief Manage the authorization of the interface of the USB device. + * + * @param dev Indicates the USB device. + * @param configId Indicates the config ID of the target interface. + * @param interfaceId Indicates the ID of the target interface. + * @param authorized Indicates whether to authorize the interface. + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 6.0 + * @version 1.0 + */ + UsbInterfaceAuthorize([in] struct UsbDev dev, [in] unsigned char configId, [in] unsigned char interfaceId, [in] boolean authorized); + } \ No newline at end of file