Skip to content

Commit

Permalink
Merge pull request #9 from woodemi/develop-1.23
Browse files Browse the repository at this point in the history
Add @deprecated('inline')
  • Loading branch information
Sunbreak authored Feb 9, 2021
2 parents 7f7ed5f + e878088 commit 18c9dda
Show file tree
Hide file tree
Showing 6 changed files with 293 additions and 1 deletion.
11 changes: 11 additions & 0 deletions lib/libusb_linux.dart
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ class Libusb {
/// the bytes are swapped.
/// \param x the host-endian value to convert
/// \returns the value in little-endian byte order
@Deprecated('inline')
int libusb_cpu_to_le16(
int x,
) {
Expand Down Expand Up @@ -1525,6 +1526,7 @@ class Libusb {
///
/// \param transfer a transfer
/// \returns pointer to the first byte of the data section
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_control_transfer_get_data(
ffi.Pointer<libusb_transfer> transfer,
) {
Expand Down Expand Up @@ -1712,6 +1714,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_control_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1747,6 +1750,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_bulk_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1789,6 +1793,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_bulk_stream_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1871,6 +1876,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_iso_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1907,6 +1913,7 @@ class Libusb {
/// \param transfer a transfer
/// \param length the length to set in each isochronous packet descriptor
/// \see libusb_get_max_packet_size()
@Deprecated('inline')
void libusb_set_iso_packet_lengths(
ffi.Pointer<libusb_transfer> transfer,
int length,
Expand Down Expand Up @@ -1937,6 +1944,7 @@ class Libusb {
/// \returns the base address of the packet buffer inside the transfer buffer,
/// or NULL if the packet does not exist.
/// \see libusb_get_iso_packet_buffer_simple()
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_get_iso_packet_buffer(
ffi.Pointer<libusb_transfer> transfer,
int packet,
Expand Down Expand Up @@ -1970,6 +1978,7 @@ class Libusb {
/// \returns the base address of the packet buffer inside the transfer buffer,
/// or NULL if the packet does not exist.
/// \see libusb_get_iso_packet_buffer()
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_get_iso_packet_buffer_simple(
ffi.Pointer<libusb_transfer> transfer,
int packet,
Expand Down Expand Up @@ -2070,6 +2079,7 @@ class Libusb {
/// \param data output buffer for descriptor
/// \param length size of data buffer
/// \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
@Deprecated('inline')
int libusb_get_descriptor(
ffi.Pointer<libusb_device_handle> dev_handle,
int desc_type,
Expand Down Expand Up @@ -2103,6 +2113,7 @@ class Libusb {
/// \param length size of data buffer
/// \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
/// \see libusb_get_string_descriptor_ascii()
@Deprecated('inline')
int libusb_get_string_descriptor(
ffi.Pointer<libusb_device_handle> dev_handle,
int desc_index,
Expand Down
14 changes: 14 additions & 0 deletions lib/libusb_macos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ class Libusb {
/// the bytes are swapped.
/// \param x the host-endian value to convert
/// \returns the value in little-endian byte order
@Deprecated('inline')
int libusb_cpu_to_le16(
int x,
) {
Expand Down Expand Up @@ -1461,6 +1462,7 @@ class Libusb {
///
/// \param transfer a transfer
/// \returns pointer to the first byte of the data section
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_control_transfer_get_data(
ffi.Pointer<libusb_transfer> transfer,
) {
Expand All @@ -1486,6 +1488,7 @@ class Libusb {
///
/// \param transfer a transfer
/// \returns a casted pointer to the start of the transfer data buffer
@Deprecated('inline')
ffi.Pointer<libusb_control_setup> libusb_control_transfer_get_setup(
ffi.Pointer<libusb_transfer> transfer,
) {
Expand Down Expand Up @@ -1522,6 +1525,7 @@ class Libusb {
/// \param wLength see the
/// \ref libusb_control_setup::wLength "wLength" field of
/// \ref libusb_control_setup
@Deprecated('inline')
void libusb_fill_control_setup(
ffi.Pointer<ffi.Uint8> buffer,
int bmRequestType,
Expand Down Expand Up @@ -1648,6 +1652,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_control_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1683,6 +1688,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_bulk_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1725,6 +1731,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_bulk_stream_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1767,6 +1774,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_interrupt_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1807,6 +1815,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_iso_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -1843,6 +1852,7 @@ class Libusb {
/// \param transfer a transfer
/// \param length the length to set in each isochronous packet descriptor
/// \see libusb_get_max_packet_size()
@Deprecated('inline')
void libusb_set_iso_packet_lengths(
ffi.Pointer<libusb_transfer> transfer,
int length,
Expand Down Expand Up @@ -1873,6 +1883,7 @@ class Libusb {
/// \returns the base address of the packet buffer inside the transfer buffer,
/// or NULL if the packet does not exist.
/// \see libusb_get_iso_packet_buffer_simple()
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_get_iso_packet_buffer(
ffi.Pointer<libusb_transfer> transfer,
int packet,
Expand Down Expand Up @@ -1906,6 +1917,7 @@ class Libusb {
/// \returns the base address of the packet buffer inside the transfer buffer,
/// or NULL if the packet does not exist.
/// \see libusb_get_iso_packet_buffer()
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_get_iso_packet_buffer_simple(
ffi.Pointer<libusb_transfer> transfer,
int packet,
Expand Down Expand Up @@ -2006,6 +2018,7 @@ class Libusb {
/// \param data output buffer for descriptor
/// \param length size of data buffer
/// \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
@Deprecated('inline')
int libusb_get_descriptor(
ffi.Pointer<libusb_device_handle> dev_handle,
int desc_type,
Expand Down Expand Up @@ -2039,6 +2052,7 @@ class Libusb {
/// \param length size of data buffer
/// \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
/// \see libusb_get_string_descriptor_ascii()
@Deprecated('inline')
int libusb_get_string_descriptor(
ffi.Pointer<libusb_device_handle> dev_handle,
int desc_index,
Expand Down
11 changes: 11 additions & 0 deletions lib/libusb_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100621,6 +100621,7 @@ class Libusb {
/// the bytes are swapped.
/// \param x the host-endian value to convert
/// \returns the value in little-endian byte order
@Deprecated('inline')
int libusb_cpu_to_le16(
int x,
) {
Expand Down Expand Up @@ -101492,6 +101493,7 @@ class Libusb {
///
/// \param transfer a transfer
/// \returns pointer to the first byte of the data section
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_control_transfer_get_data(
ffi.Pointer<libusb_transfer> transfer,
) {
Expand Down Expand Up @@ -101679,6 +101681,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_control_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -101714,6 +101717,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_bulk_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -101756,6 +101760,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_bulk_stream_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -101838,6 +101843,7 @@ class Libusb {
/// \param callback callback function to be invoked on transfer completion
/// \param user_data user data to pass to callback function
/// \param timeout timeout for the transfer in milliseconds
@Deprecated('inline')
void libusb_fill_iso_transfer(
ffi.Pointer<libusb_transfer> transfer,
ffi.Pointer<libusb_device_handle> dev_handle,
Expand Down Expand Up @@ -101874,6 +101880,7 @@ class Libusb {
/// \param transfer a transfer
/// \param length the length to set in each isochronous packet descriptor
/// \see libusb_get_max_packet_size()
@Deprecated('inline')
void libusb_set_iso_packet_lengths(
ffi.Pointer<libusb_transfer> transfer,
int length,
Expand Down Expand Up @@ -101904,6 +101911,7 @@ class Libusb {
/// \returns the base address of the packet buffer inside the transfer buffer,
/// or NULL if the packet does not exist.
/// \see libusb_get_iso_packet_buffer_simple()
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_get_iso_packet_buffer(
ffi.Pointer<libusb_transfer> transfer,
int packet,
Expand Down Expand Up @@ -101937,6 +101945,7 @@ class Libusb {
/// \returns the base address of the packet buffer inside the transfer buffer,
/// or NULL if the packet does not exist.
/// \see libusb_get_iso_packet_buffer()
@Deprecated('inline')
ffi.Pointer<ffi.Uint8> libusb_get_iso_packet_buffer_simple(
ffi.Pointer<libusb_transfer> transfer,
int packet,
Expand Down Expand Up @@ -102037,6 +102046,7 @@ class Libusb {
/// \param data output buffer for descriptor
/// \param length size of data buffer
/// \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
@Deprecated('inline')
int libusb_get_descriptor(
ffi.Pointer<libusb_device_handle> dev_handle,
int desc_type,
Expand Down Expand Up @@ -102070,6 +102080,7 @@ class Libusb {
/// \param length size of data buffer
/// \returns number of bytes returned in data, or LIBUSB_ERROR code on failure
/// \see libusb_get_string_descriptor_ascii()
@Deprecated('inline')
int libusb_get_string_descriptor(
ffi.Pointer<libusb_device_handle> dev_handle,
int desc_index,
Expand Down
Loading

0 comments on commit 18c9dda

Please sign in to comment.