diff --git a/usb/v1_0/IUsbInterface.idl b/usb/v1_0/IUsbInterface.idl index 25ce5eec7a4dde6f0a7d42e4995c9c444de4ccd9..1876d798554570dbf73f5c9168585a28ce7a4103 100644 --- a/usb/v1_0/IUsbInterface.idl +++ b/usb/v1_0/IUsbInterface.idl @@ -127,6 +127,8 @@ interface IUsbInterface { * * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. * @since 3.2 + * @deprecated since 5.0 + * @useinstead ohos.hdi.usb.v1_1.IUsbInterface.GetDeviceFileDescriptor */ GetFileDescriptor([in] struct UsbDev dev, [out] int fd); diff --git a/usb/v1_1/IUsbInterface.idl b/usb/v1_1/IUsbInterface.idl index c44392087210847011acf6be8731197874dfa4d0..67e9ef040b3f5f0782b0cfbffb8ceefbd240f09c 100644 --- a/usb/v1_1/IUsbInterface.idl +++ b/usb/v1_1/IUsbInterface.idl @@ -76,4 +76,15 @@ interface IUsbInterface extends ohos.hdi.usb.v1_0.IUsbInterface{ * @since 5.0 */ GetDeviceSpeed ([in] struct UsbDev dev, [out] unsigned char speed ); + + /* * + * @brief Obtains the file descriptor. + * + * @param dev Indicates the USB device address. + * @param fd USB device file descriptor + * + * @return Returns 0 if the operation is successful; returns a non-0 value if the operation fails. + * @since 5.0 + */ + GetDeviceFileDescriptor([in] struct UsbDev dev, [out] FileDescriptor fd); } \ No newline at end of file