diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2016-02-24 00:23:49 -0800 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2016-02-24 00:23:49 -0800 |
commit | 8a0c14372f98d56529556f18126a42fda2ab0137 (patch) | |
tree | 2b665b5ad02dd052c650d6d20a921e4d13cb15d4 | |
parent | 60e875dc90c48df5101fefc4ef7c76516bbcc6e4 (diff) | |
download | libusb-8a0c14372f98d56529556f18126a42fda2ab0137.tar.gz |
Misc: Make API parameter names consistent and sensible
Prior to this commit, API functions taking a libusb_device_handle
argument had the parameter named dev, handle, or dev_handle. This
commit changes the name of all libusb_device_handle parameters to
dev_handle in both the documentation and actual code.
Closes #132
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r-- | libusb/core.c | 174 | ||||
-rw-r--r-- | libusb/descriptor.c | 24 | ||||
-rw-r--r-- | libusb/hotplug.c | 31 | ||||
-rw-r--r-- | libusb/io.c | 24 | ||||
-rw-r--r-- | libusb/libusb.h | 50 | ||||
-rw-r--r-- | libusb/libusbi.h | 32 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
7 files changed, 168 insertions, 169 deletions
diff --git a/libusb/core.c b/libusb/core.c index 90491e6..4d6d377 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -1216,7 +1216,7 @@ int usbi_clear_event(struct libusb_context *ctx) * This is a non-blocking function; no requests are sent over the bus. * * \param dev the device to open - * \param handle output location for the returned device handle pointer. Only + * \param dev_handle output location for the returned device handle pointer. Only * populated when the return code is 0. * \returns 0 on success * \returns LIBUSB_ERROR_NO_MEM on memory allocation failure @@ -1225,10 +1225,10 @@ int usbi_clear_event(struct libusb_context *ctx) * \returns another LIBUSB_ERROR code on other failure */ int API_EXPORTED libusb_open(libusb_device *dev, - libusb_device_handle **handle) + libusb_device_handle **dev_handle) { struct libusb_context *ctx = DEVICE_CTX(dev); - struct libusb_device_handle *_handle; + struct libusb_device_handle *_dev_handle; size_t priv_size = usbi_backend->device_handle_priv_size; int r; usbi_dbg("open %d.%d", dev->bus_number, dev->device_address); @@ -1237,34 +1237,34 @@ int API_EXPORTED libusb_open(libusb_device *dev, return LIBUSB_ERROR_NO_DEVICE; } - _handle = malloc(sizeof(*_handle) + priv_size); - if (!_handle) + _dev_handle = malloc(sizeof(*_dev_handle) + priv_size); + if (!_dev_handle) return LIBUSB_ERROR_NO_MEM; - r = usbi_mutex_init(&_handle->lock, NULL); + r = usbi_mutex_init(&_dev_handle->lock, NULL); if (r) { - free(_handle); + free(_dev_handle); return LIBUSB_ERROR_OTHER; } - _handle->dev = libusb_ref_device(dev); - _handle->auto_detach_kernel_driver = 0; - _handle->claimed_interfaces = 0; - memset(&_handle->os_priv, 0, priv_size); + _dev_handle->dev = libusb_ref_device(dev); + _dev_handle->auto_detach_kernel_driver = 0; + _dev_handle->claimed_interfaces = 0; + memset(&_dev_handle->os_priv, 0, priv_size); - r = usbi_backend->open(_handle); + r = usbi_backend->open(_dev_handle); if (r < 0) { usbi_dbg("open %d.%d returns %d", dev->bus_number, dev->device_address, r); libusb_unref_device(dev); - usbi_mutex_destroy(&_handle->lock); - free(_handle); + usbi_mutex_destroy(&_dev_handle->lock); + free(_dev_handle); return r; } usbi_mutex_lock(&ctx->open_devs_lock); - list_add(&_handle->list, &ctx->open_devs); + list_add(&_dev_handle->list, &ctx->open_devs); usbi_mutex_unlock(&ctx->open_devs_lock); - *handle = _handle; + *dev_handle = _dev_handle; return 0; } @@ -1283,8 +1283,8 @@ int API_EXPORTED libusb_open(libusb_device *dev, * \param ctx the context to operate on, or NULL for the default context * \param vendor_id the idVendor value to search for * \param product_id the idProduct value to search for - * \returns a handle for the first found device, or NULL on error or if the - * device could not be found. */ + * \returns a device handle for the first found device, or NULL on error + * or if the device could not be found. */ DEFAULT_VISIBILITY libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid( libusb_context *ctx, uint16_t vendor_id, uint16_t product_id) @@ -1292,7 +1292,7 @@ libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid( struct libusb_device **devs; struct libusb_device *found = NULL; struct libusb_device *dev; - struct libusb_device_handle *handle = NULL; + struct libusb_device_handle *dev_handle = NULL; size_t i = 0; int r; @@ -1311,14 +1311,14 @@ libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid( } if (found) { - r = libusb_open(found, &handle); + r = libusb_open(found, &dev_handle); if (r < 0) - handle = NULL; + dev_handle = NULL; } out: libusb_free_device_list(devs, 1); - return handle; + return dev_handle; } static void do_close(struct libusb_context *ctx, @@ -1388,7 +1388,7 @@ static void do_close(struct libusb_context *ctx, * * This is a non-blocking function; no requests are sent over the bus. * - * \param dev_handle the handle to close + * \param dev_handle the device handle to close */ void API_EXPORTED libusb_close(libusb_device_handle *dev_handle) { @@ -1436,7 +1436,7 @@ void API_EXPORTED libusb_close(libusb_device_handle *dev_handle) } /** \ingroup dev - * Get the underlying device for a handle. This function does not modify + * Get the underlying device for a device handle. This function does not modify * the reference count of the returned device, so do not feel compelled to * unreference it when you are done. * \param dev_handle a device handle @@ -1461,29 +1461,29 @@ libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle) * This function will return a value of 0 in the <tt>config</tt> output * parameter if the device is in unconfigured state. * - * \param dev a device handle + * \param dev_handle a device handle * \param config output location for the bConfigurationValue of the active * configuration (only valid for return code 0) * \returns 0 on success * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * \returns another LIBUSB_ERROR code on other failure */ -int API_EXPORTED libusb_get_configuration(libusb_device_handle *dev, +int API_EXPORTED libusb_get_configuration(libusb_device_handle *dev_handle, int *config) { int r = LIBUSB_ERROR_NOT_SUPPORTED; usbi_dbg(""); if (usbi_backend->get_configuration) - r = usbi_backend->get_configuration(dev, config); + r = usbi_backend->get_configuration(dev_handle, config); if (r == LIBUSB_ERROR_NOT_SUPPORTED) { uint8_t tmp = 0; usbi_dbg("falling back to control message"); - r = libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN, + r = libusb_control_transfer(dev_handle, LIBUSB_ENDPOINT_IN, LIBUSB_REQUEST_GET_CONFIGURATION, 0, 0, &tmp, 1, 1000); if (r == 0) { - usbi_err(HANDLE_CTX(dev), "zero bytes returned in ctrl transfer?"); + usbi_err(HANDLE_CTX(dev_handle), "zero bytes returned in ctrl transfer?"); r = LIBUSB_ERROR_IO; } else if (r == 1) { r = 0; @@ -1535,7 +1535,7 @@ int API_EXPORTED libusb_get_configuration(libusb_device_handle *dev, * * This is a blocking function. * - * \param dev a device handle + * \param dev_handle a device handle * \param configuration the bConfigurationValue of the configuration you * wish to activate, or -1 if you wish to put the device in an unconfigured * state @@ -1546,11 +1546,11 @@ int API_EXPORTED libusb_get_configuration(libusb_device_handle *dev, * \returns another LIBUSB_ERROR code on other failure * \see libusb_set_auto_detach_kernel_driver() */ -int API_EXPORTED libusb_set_configuration(libusb_device_handle *dev, +int API_EXPORTED libusb_set_configuration(libusb_device_handle *dev_handle, int configuration) { usbi_dbg("configuration %d", configuration); - return usbi_backend->set_configuration(dev, configuration); + return usbi_backend->set_configuration(dev_handle, configuration); } /** \ingroup dev @@ -1570,7 +1570,7 @@ int API_EXPORTED libusb_set_configuration(libusb_device_handle *dev, * * This is a non-blocking function. * - * \param dev a device handle + * \param dev_handle a device handle * \param interface_number the <tt>bInterfaceNumber</tt> of the interface you * wish to claim * \returns 0 on success @@ -1581,7 +1581,7 @@ int API_EXPORTED libusb_set_configuration(libusb_device_handle *dev, * \returns a LIBUSB_ERROR code on other failure * \see libusb_set_auto_detach_kernel_driver() */ -int API_EXPORTED libusb_claim_interface(libusb_device_handle *dev, +int API_EXPORTED libusb_claim_interface(libusb_device_handle *dev_handle, int interface_number) { int r = 0; @@ -1590,19 +1590,19 @@ int API_EXPORTED libusb_claim_interface(libusb_device_handle *dev, if (interface_number >= USB_MAXINTERFACES) return LIBUSB_ERROR_INVALID_PARAM; - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; - usbi_mutex_lock(&dev->lock); - if (dev->claimed_interfaces & (1 << interface_number)) + usbi_mutex_lock(&dev_handle->lock); + if (dev_handle->claimed_interfaces & (1 << interface_number)) goto out; - r = usbi_backend->claim_interface(dev, interface_number); + r = usbi_backend->claim_interface(dev_handle, interface_number); if (r == 0) - dev->claimed_interfaces |= 1 << interface_number; + dev_handle->claimed_interfaces |= 1 << interface_number; out: - usbi_mutex_unlock(&dev->lock); + usbi_mutex_unlock(&dev_handle->lock); return r; } @@ -1616,7 +1616,7 @@ out: * If auto_detach_kernel_driver is set to 1 for <tt>dev</tt>, the kernel * driver will be re-attached after releasing the interface. * - * \param dev a device handle + * \param dev_handle a device handle * \param interface_number the <tt>bInterfaceNumber</tt> of the * previously-claimed interface * \returns 0 on success @@ -1625,7 +1625,7 @@ out: * \returns another LIBUSB_ERROR code on other failure * \see libusb_set_auto_detach_kernel_driver() */ -int API_EXPORTED libusb_release_interface(libusb_device_handle *dev, +int API_EXPORTED libusb_release_interface(libusb_device_handle *dev_handle, int interface_number) { int r; @@ -1634,18 +1634,18 @@ int API_EXPORTED libusb_release_interface(libusb_device_handle *dev, if (interface_number >= USB_MAXINTERFACES) return LIBUSB_ERROR_INVALID_PARAM; - usbi_mutex_lock(&dev->lock); - if (!(dev->claimed_interfaces & (1 << interface_number))) { + usbi_mutex_lock(&dev_handle->lock); + if (!(dev_handle->claimed_interfaces & (1 << interface_number))) { r = LIBUSB_ERROR_NOT_FOUND; goto out; } - r = usbi_backend->release_interface(dev, interface_number); + r = usbi_backend->release_interface(dev_handle, interface_number); if (r == 0) - dev->claimed_interfaces &= ~(1 << interface_number); + dev_handle->claimed_interfaces &= ~(1 << interface_number); out: - usbi_mutex_unlock(&dev->lock); + usbi_mutex_unlock(&dev_handle->lock); return r; } @@ -1659,7 +1659,7 @@ out: * * This is a blocking function. * - * \param dev a device handle + * \param dev_handle a device handle * \param interface_number the <tt>bInterfaceNumber</tt> of the * previously-claimed interface * \param alternate_setting the <tt>bAlternateSetting</tt> of the alternate @@ -1670,7 +1670,7 @@ out: * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * \returns another LIBUSB_ERROR code on other failure */ -int API_EXPORTED libusb_set_interface_alt_setting(libusb_device_handle *dev, +int API_EXPORTED libusb_set_interface_alt_setting(libusb_device_handle *dev_handle, int interface_number, int alternate_setting) { usbi_dbg("interface %d altsetting %d", @@ -1678,19 +1678,19 @@ int API_EXPORTED libusb_set_interface_alt_setting(libusb_device_handle *dev, if (interface_number >= USB_MAXINTERFACES) return LIBUSB_ERROR_INVALID_PARAM; - usbi_mutex_lock(&dev->lock); - if (!dev->dev->attached) { - usbi_mutex_unlock(&dev->lock); + usbi_mutex_lock(&dev_handle->lock); + if (!dev_handle->dev->attached) { + usbi_mutex_unlock(&dev_handle->lock); return LIBUSB_ERROR_NO_DEVICE; } - if (!(dev->claimed_interfaces & (1 << interface_number))) { - usbi_mutex_unlock(&dev->lock); + if (!(dev_handle->claimed_interfaces & (1 << interface_number))) { + usbi_mutex_unlock(&dev_handle->lock); return LIBUSB_ERROR_NOT_FOUND; } - usbi_mutex_unlock(&dev->lock); + usbi_mutex_unlock(&dev_handle->lock); - return usbi_backend->set_interface_altsetting(dev, interface_number, + return usbi_backend->set_interface_altsetting(dev_handle, interface_number, alternate_setting); } @@ -1703,21 +1703,21 @@ int API_EXPORTED libusb_set_interface_alt_setting(libusb_device_handle *dev, * * This is a blocking function. * - * \param dev a device handle + * \param dev_handle a device handle * \param endpoint the endpoint to clear halt status * \returns 0 on success * \returns LIBUSB_ERROR_NOT_FOUND if the endpoint does not exist * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * \returns another LIBUSB_ERROR code on other failure */ -int API_EXPORTED libusb_clear_halt(libusb_device_handle *dev, +int API_EXPORTED libusb_clear_halt(libusb_device_handle *dev_handle, unsigned char endpoint) { usbi_dbg("endpoint %x", endpoint); - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; - return usbi_backend->clear_halt(dev, endpoint); + return usbi_backend->clear_halt(dev_handle, endpoint); } /** \ingroup dev @@ -1733,19 +1733,19 @@ int API_EXPORTED libusb_clear_halt(libusb_device_handle *dev, * * This is a blocking function which usually incurs a noticeable delay. * - * \param dev a handle of the device to reset + * \param dev_handle a handle of the device to reset * \returns 0 on success * \returns LIBUSB_ERROR_NOT_FOUND if re-enumeration is required, or if the * device has been disconnected * \returns another LIBUSB_ERROR code on other failure */ -int API_EXPORTED libusb_reset_device(libusb_device_handle *dev) +int API_EXPORTED libusb_reset_device(libusb_device_handle *dev_handle) { usbi_dbg(""); - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; - return usbi_backend->reset_device(dev); + return usbi_backend->reset_device(dev_handle); } /** \ingroup asyncio @@ -1763,22 +1763,22 @@ int API_EXPORTED libusb_reset_device(libusb_device_handle *dev) * * Since version 1.0.19, \ref LIBUSB_API_VERSION >= 0x01000103 * - * \param dev a device handle + * \param dev_handle a device handle * \param num_streams number of streams to try to allocate * \param endpoints array of endpoints to allocate streams on * \param num_endpoints length of the endpoints array * \returns number of streams allocated, or a LIBUSB_ERROR code on failure */ -int API_EXPORTED libusb_alloc_streams(libusb_device_handle *dev, +int API_EXPORTED libusb_alloc_streams(libusb_device_handle *dev_handle, uint32_t num_streams, unsigned char *endpoints, int num_endpoints) { usbi_dbg("streams %u eps %d", (unsigned) num_streams, num_endpoints); - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; if (usbi_backend->alloc_streams) - return usbi_backend->alloc_streams(dev, num_streams, endpoints, + return usbi_backend->alloc_streams(dev_handle, num_streams, endpoints, num_endpoints); else return LIBUSB_ERROR_NOT_SUPPORTED; @@ -1791,21 +1791,21 @@ int API_EXPORTED libusb_alloc_streams(libusb_device_handle *dev, * * Since version 1.0.19, \ref LIBUSB_API_VERSION >= 0x01000103 * - * \param dev a device handle + * \param dev_handle a device handle * \param endpoints array of endpoints to free streams on * \param num_endpoints length of the endpoints array * \returns LIBUSB_SUCCESS, or a LIBUSB_ERROR code on failure */ -int API_EXPORTED libusb_free_streams(libusb_device_handle *dev, +int API_EXPORTED libusb_free_streams(libusb_device_handle *dev_handle, unsigned char *endpoints, int num_endpoints) { usbi_dbg("eps %d", num_endpoints); - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; if (usbi_backend->free_streams) - return usbi_backend->free_streams(dev, endpoints, + return usbi_backend->free_streams(dev_handle, endpoints, num_endpoints); else return LIBUSB_ERROR_NOT_SUPPORTED; @@ -1818,7 +1818,7 @@ int API_EXPORTED libusb_free_streams(libusb_device_handle *dev, * * This functionality is not available on Windows. * - * \param dev a device handle + * \param dev_handle a device handle * \param interface_number the interface to check * \returns 0 if no kernel driver is active * \returns 1 if a kernel driver is active @@ -1828,16 +1828,16 @@ int API_EXPORTED libusb_free_streams(libusb_device_handle *dev, * \returns another LIBUSB_ERROR code on other failure * \see libusb_detach_kernel_driver() */ -int API_EXPORTED libusb_kernel_driver_active(libusb_device_handle *dev, +int API_EXPORTED libusb_kernel_driver_active(libusb_device_handle *dev_handle, int interface_number) { usbi_dbg("interface %d", interface_number); - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; if (usbi_backend->kernel_driver_active) - return usbi_backend->kernel_driver_active(dev, interface_number); + return usbi_backend->kernel_driver_active(dev_handle, interface_number); else return LIBUSB_ERROR_NOT_SUPPORTED; } @@ -1852,7 +1852,7 @@ int API_EXPORTED libusb_kernel_driver_active(libusb_device_handle *dev, * driver, if this driver is already attached to the device, this call will * not detach it and return LIBUSB_ERROR_NOT_FOUND. * - * \param dev a device handle + * \param dev_handle a device handle * \param interface_number the interface to detach the driver from * \returns 0 on success * \returns LIBUSB_ERROR_NOT_FOUND if no kernel driver was active @@ -1863,16 +1863,16 @@ int API_EXPORTED libusb_kernel_driver_active(libusb_device_handle *dev, * \returns another LIBUSB_ERROR code on other failure * \see libusb_kernel_driver_active() */ -int API_EXPORTED libusb_detach_kernel_driver(libusb_device_handle *dev, +int API_EXPORTED libusb_detach_kernel_driver(libusb_device_handle *dev_handle, int interface_number) { usbi_dbg("interface %d", interface_number); - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; if (usbi_backend->detach_kernel_driver) - return usbi_backend->detach_kernel_driver(dev, interface_number); + return usbi_backend->detach_kernel_driver(dev_handle, interface_number); else return LIBUSB_ERROR_NOT_SUPPORTED; } @@ -1884,7 +1884,7 @@ int API_EXPORTED libusb_detach_kernel_driver(libusb_device_handle *dev, * * This functionality is not available on Darwin or Windows. * - * \param dev a device handle + * \param dev_handle a device handle * \param interface_number the interface to attach the driver from * \returns 0 on success * \returns LIBUSB_ERROR_NOT_FOUND if no kernel driver was active @@ -1897,16 +1897,16 @@ int API_EXPORTED libusb_detach_kernel_driver(libusb_device_handle *dev, * \returns another LIBUSB_ERROR code on other failure * \see libusb_kernel_driver_active() */ -int API_EXPORTED libusb_attach_kernel_driver(libusb_device_handle *dev, +int API_EXPORTED libusb_attach_kernel_driver(libusb_device_handle *dev_handle, int interface_number) { usbi_dbg("interface %d", interface_number); - if (!dev->dev->attached) + if (!dev_handle->dev->attached) return LIBUSB_ERROR_NO_DEVICE; if (usbi_backend->attach_kernel_driver) - return usbi_backend->attach_kernel_driver(dev, interface_number); + return usbi_backend->attach_kernel_driver(dev_handle, interface_number); else return LIBUSB_ERROR_NOT_SUPPORTED; } @@ -1923,7 +1923,7 @@ int API_EXPORTED libusb_attach_kernel_driver(libusb_device_handle *dev, * this function will return LIBUSB_ERROR_NOT_SUPPORTED, and libusb will * continue as if this function was never called. * - * \param dev a device handle + * \param dev_handle a device handle * \param enable whether to enable or disable auto kernel driver detachment * * \returns LIBUSB_SUCCESS on success @@ -1934,12 +1934,12 @@ int API_EXPORTED libusb_attach_kernel_driver(libusb_device_handle *dev, * \see libusb_set_configuration() */ int API_EXPORTED libusb_set_auto_detach_kernel_driver( - libusb_device_handle *dev, int enable) + libusb_device_handle *dev_handle, int enable) { if (!(usbi_backend->caps & USBI_CAP_SUPPORTS_DETACH_KERNEL_DRIVER)) return LIBUSB_ERROR_NOT_SUPPORTED; - dev->auto_detach_kernel_driver = enable; + dev_handle->auto_detach_kernel_driver = enable; return LIBUSB_SUCCESS; } diff --git a/libusb/descriptor.c b/libusb/descriptor.c index defcacb..402c91d 100644 --- a/libusb/descriptor.c +++ b/libusb/descriptor.c @@ -888,14 +888,14 @@ static int parse_bos(struct libusb_context *ctx, * Get a Binary Object Store (BOS) descriptor * This is a BLOCKING function, which will send requests to the device. * - * \param handle the handle of an open libusb device + * \param dev_handle the handle of an open libusb device * \param bos output location for the BOS descriptor. Only valid if 0 was returned. * Must be freed with \ref libusb_free_bos_descriptor() after use. * \returns 0 on success * \returns LIBUSB_ERROR_NOT_FOUND if the device doesn't have a BOS descriptor * \returns another LIBUSB_ERROR code on error */ -int API_EXPORTED libusb_get_bos_descriptor(libusb_device_handle *handle, +int API_EXPORTED libusb_get_bos_descriptor(libusb_device_handle *dev_handle, struct libusb_bos_descriptor **bos) { struct libusb_bos_descriptor _bos; @@ -906,15 +906,15 @@ int API_EXPORTED libusb_get_bos_descriptor(libusb_device_handle *handle, /* Read the BOS. This generates 2 requests on the bus, * one for the header, and one for the full BOS */ - r = libusb_get_descriptor(handle, LIBUSB_DT_BOS, 0, bos_header, + r = libusb_get_descriptor(dev_handle, LIBUSB_DT_BOS, 0, bos_header, LIBUSB_DT_BOS_SIZE); if (r < 0) { if (r != LIBUSB_ERROR_PIPE) - usbi_err(handle->dev->ctx, "failed to read BOS (%d)", r); + usbi_err(HANDLE_CTX(dev_handle), "failed to read BOS (%d)", r); return r; } if (r < LIBUSB_DT_BOS_SIZE) { - usbi_err(handle->dev->ctx, "short BOS read %d/%d", + usbi_err(HANDLE_CTX(dev_handle), "short BOS read %d/%d", r, LIBUSB_DT_BOS_SIZE); return LIBUSB_ERROR_IO; } @@ -926,12 +926,12 @@ int API_EXPORTED libusb_get_bos_descriptor(libusb_device_handle *handle, if (bos_data == NULL) return LIBUSB_ERROR_NO_MEM; - r = libusb_get_descriptor(handle, LIBUSB_DT_BOS, 0, bos_data, + r = libusb_get_descriptor(dev_handle, LIBUSB_DT_BOS, 0, bos_data, _bos.wTotalLength); if (r >= 0) - r = parse_bos(handle->dev->ctx, bos, bos_data, r, host_endian); + r = parse_bos(HANDLE_CTX(dev_handle), bos, bos_data, r, host_endian); else - usbi_err(handle->dev->ctx, "failed to read BOS (%d)", r); + usbi_err(HANDLE_CTX(dev_handle), "failed to read BOS (%d)", r); free(bos_data); return r; @@ -1135,13 +1135,13 @@ void API_EXPORTED libusb_free_container_id_descriptor( * Wrapper around libusb_get_string_descriptor(). Uses the first language * supported by the device. * - * \param dev a device handle + * \param dev_handle a device handle * \param desc_index the index of the descriptor to retrieve * \param data output buffer for ASCII string descriptor * \param length size of data buffer * \returns number of bytes returned in data, or LIBUSB_ERROR code on failure */ -int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev, +int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev_handle, uint8_t desc_index, unsigned char *data, int length) { unsigned char tbuf[255]; /* Some devices choke on size > 255 */ @@ -1160,7 +1160,7 @@ int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev, if (desc_index == 0) return LIBUSB_ERROR_INVALID_PARAM; - r = libusb_get_string_descriptor(dev, 0, 0, tbuf, sizeof(tbuf)); + r = libusb_get_string_descriptor(dev_handle, 0, 0, tbuf, sizeof(tbuf)); if (r < 0) return r; @@ -1169,7 +1169,7 @@ int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev, langid = tbuf[2] | (tbuf[3] << 8); - r = libusb_get_string_descriptor(dev, desc_index, langid, tbuf, + r = libusb_get_string_descriptor(dev_handle, desc_index, langid, tbuf, sizeof(tbuf)); if (r < 0) return r; diff --git a/libusb/hotplug.c b/libusb/hotplug.c index 779cb6b..85d44af 100644 --- a/libusb/hotplug.c +++ b/libusb/hotplug.c @@ -55,7 +55,7 @@ * * To receive hotplug notification you register a callback by calling * \ref libusb_hotplug_register_callback(). This function will optionally return - * a handle that can be passed to \ref libusb_hotplug_deregister_callback(). + * a callback handle that can be passed to \ref libusb_hotplug_deregister_callback(). * * A callback function must return an int (0 or 1) indicating whether the callback is * expecting additional events. Returning 0 will rearm the callback and 1 will cause @@ -75,7 +75,7 @@ * * Note: If you receive notification that a device has left and you have any * a libusb_device_handles for the device it is up to you to call libusb_close() - * on each handle to free up any remaining resources associated with the device. + * on each device handle to free up any remaining resources associated with the device. * Once a device has left any libusb_device_handle associated with the device * are invalid and will remain so even if the device comes back. * @@ -100,21 +100,21 @@ static int count = 0; int hotplug_callback(struct libusb_context *ctx, struct libusb_device *dev, libusb_hotplug_event event, void *user_data) { - static libusb_device_handle *handle = NULL; + static libusb_device_handle *dev_handle = NULL; struct libusb_device_descriptor desc; int rc; (void)libusb_get_device_descriptor(dev, &desc); if (LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED == event) { - rc = libusb_open(dev, &handle); + rc = libusb_open(dev, &dev_handle); if (LIBUSB_SUCCESS != rc) { printf("Could not open USB device\n"); } } else if (LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT == event) { - if (handle) { - libusb_close(handle); - handle = NULL; + if (dev_handle) { + libusb_close(dev_handle); + dev_handle = NULL; } } else { printf("Unhandled event %d\n", event); @@ -125,7 +125,7 @@ int hotplug_callback(struct libusb_context *ctx, struct libusb_device *dev, } int main (void) { - libusb_hotplug_callback_handle handle; + libusb_hotplug_callback_handle callback_handle; int rc; libusb_init(NULL); @@ -133,7 +133,7 @@ int main (void) { rc = libusb_hotplug_register_callback(NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT, 0, 0x045a, 0x5005, LIBUSB_HOTPLUG_MATCH_ANY, hotplug_callback, NULL, - &handle); + &callback_handle); if (LIBUSB_SUCCESS != rc) { printf("Error creating a hotplug callback\n"); libusb_exit(NULL); @@ -145,7 +145,7 @@ int main (void) { usleep(10000); } - libusb_hotplug_deregister_callback(NULL, handle); + libusb_hotplug_deregister_callback(NULL, callback_handle); libusb_exit(NULL); return 0; @@ -237,7 +237,7 @@ int API_EXPORTED libusb_hotplug_register_callback(libusb_context *ctx, libusb_hotplug_event events, libusb_hotplug_flag flags, int vendor_id, int product_id, int dev_class, libusb_hotplug_callback_fn cb_fn, void *user_data, - libusb_hotplug_callback_handle *handle) + libusb_hotplug_callback_handle *callback_handle) { libusb_hotplug_callback *new_callback; static int handle_id = 1; @@ -304,15 +304,14 @@ int API_EXPORTED libusb_hotplug_register_callback(libusb_context *ctx, } - if (handle) { - *handle = new_callback->handle; - } + if (callback_handle) + *callback_handle = new_callback->handle; return LIBUSB_SUCCESS; } void API_EXPORTED libusb_hotplug_deregister_callback (struct libusb_context *ctx, - libusb_hotplug_callback_handle handle) + libusb_hotplug_callback_handle callback_handle) { struct libusb_hotplug_callback *hotplug_cb; @@ -326,7 +325,7 @@ void API_EXPORTED libusb_hotplug_deregister_callback (struct libusb_context *ctx usbi_mutex_lock(&ctx->hotplug_cbs_lock); list_for_each_entry(hotplug_cb, &ctx->hotplug_cbs, list, struct libusb_hotplug_callback) { - if (handle == hotplug_cb->handle) { + if (callback_handle == hotplug_cb->handle) { /* Mark this callback for deregistration */ hotplug_cb->needs_free = 1; } diff --git a/libusb/io.c b/libusb/io.c index 91ea044..908acfd 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -97,7 +97,7 @@ \code unsigned char data[4]; int actual_length; -int r = libusb_bulk_transfer(handle, LIBUSB_ENDPOINT_IN, data, sizeof(data), &actual_length, 0); +int r = libusb_bulk_transfer(dev_handle, LIBUSB_ENDPOINT_IN, data, sizeof(data), &actual_length, 0); if (r == 0 && actual_length == sizeof(data)) { // results of the transaction can now be found in the data buffer // parse them here and report button press @@ -567,12 +567,12 @@ void *event_thread_func(void *ctx) * thread until after their first call to libusb_open(), and should stop the * thread when closing the last open device as follows: \code -void my_close_handle(libusb_device_handle *handle) +void my_close_handle(libusb_device_handle *dev_handle) { if (open_devs == 1) event_thread_run = 0; - libusb_close(handle); // This wakes up libusb_handle_events() + libusb_close(dev_handle); // This wakes up libusb_handle_events() if (open_devs == 1) pthread_join(event_thread); @@ -626,7 +626,7 @@ void my_libusb_exit(void) * descriptors in your main event loop, you must also consider that libusb * sometimes needs to be called into at fixed points in time even when there * is no file descriptor activity, see \ref polltime details. - * + * * In order to know precisely when libusb needs to be called into, libusb * offers you a set of pollable file descriptors and information about when * the next timeout expires. @@ -1627,7 +1627,7 @@ int usbi_handle_transfer_completion(struct usbi_transfer *itransfer, { struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); - struct libusb_device_handle *handle = transfer->dev_handle; + struct libusb_device_handle *dev_handle = transfer->dev_handle; uint8_t flags; int r; @@ -1661,7 +1661,7 @@ int usbi_handle_transfer_completion(struct usbi_transfer *itransfer, * this point. */ if (flags & LIBUSB_TRANSFER_FREE_TRANSFER) libusb_free_transfer(transfer); - libusb_unref_device(handle->dev); + libusb_unref_device(dev_handle->dev); return r; } @@ -2759,13 +2759,13 @@ void API_EXPORTED libusb_free_pollfds(const struct libusb_pollfd **pollfds) * device. This function ensures transfers get cancelled appropriately. * Callers of this function must hold the events_lock. */ -void usbi_handle_disconnect(struct libusb_device_handle *handle) +void usbi_handle_disconnect(struct libusb_device_handle *dev_handle) { struct usbi_transfer *cur; struct usbi_transfer *to_cancel; usbi_dbg("device %d.%d", - handle->dev->bus_number, handle->dev->device_address); + dev_handle->dev->bus_number, dev_handle->dev->device_address); /* terminate all pending transfers with the LIBUSB_TRANSFER_NO_DEVICE * status code. @@ -2781,9 +2781,9 @@ void usbi_handle_disconnect(struct libusb_device_handle *handle) while (1) { to_cancel = NULL; - usbi_mutex_lock(&HANDLE_CTX(handle)->flying_transfers_lock); - list_for_each_entry(cur, &HANDLE_CTX(handle)->flying_transfers, list, struct usbi_transfer) - if (USBI_TRANSFER_TO_LIBUSB_TRANSFER(cur)->dev_handle == handle) { + usbi_mutex_lock(&HANDLE_CTX(dev_handle)->flying_transfers_lock); + list_for_each_entry(cur, &HANDLE_CTX(dev_handle)->flying_transfers, list, struct usbi_transfer) + if (USBI_TRANSFER_TO_LIBUSB_TRANSFER(cur)->dev_handle == dev_handle) { usbi_mutex_lock(&cur->flags_lock); if (cur->flags & USBI_TRANSFER_IN_FLIGHT) to_cancel = cur; @@ -2794,7 +2794,7 @@ void usbi_handle_disconnect(struct libusb_device_handle *handle) if (to_cancel) break; } - usbi_mutex_unlock(&HANDLE_CTX(handle)->flying_transfers_lock); + usbi_mutex_unlock(&HANDLE_CTX(dev_handle)->flying_transfers_lock); if (!to_cancel) break; diff --git a/libusb/libusb.h b/libusb/libusb.h index c7dccc0..7fe01db 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -1334,7 +1334,7 @@ int LIBUSB_CALL libusb_get_ss_endpoint_companion_descriptor( struct libusb_ss_endpoint_companion_descriptor **ep_comp); void LIBUSB_CALL libusb_free_ss_endpoint_companion_descriptor( struct libusb_ss_endpoint_companion_descriptor *ep_comp); -int LIBUSB_CALL libusb_get_bos_descriptor(libusb_device_handle *handle, +int LIBUSB_CALL libusb_get_bos_descriptor(libusb_device_handle *dev_handle, struct libusb_bos_descriptor **bos); void LIBUSB_CALL libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos); int LIBUSB_CALL libusb_get_usb_2_0_extension_descriptor( @@ -1367,39 +1367,39 @@ int LIBUSB_CALL libusb_get_max_packet_size(libusb_device *dev, int LIBUSB_CALL libusb_get_max_iso_packet_size(libusb_device *dev, unsigned char endpoint); -int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **handle); +int LIBUSB_CALL libusb_open(libusb_device *dev, libusb_device_handle **dev_handle); void LIBUSB_CALL libusb_close(libusb_device_handle *dev_handle); libusb_device * LIBUSB_CALL libusb_get_device(libusb_device_handle *dev_handle); -int LIBUSB_CALL libusb_set_configuration(libusb_device_handle *dev, +int LIBUSB_CALL libusb_set_configuration(libusb_device_handle *dev_handle, int configuration); -int LIBUSB_CALL libusb_claim_interface(libusb_device_handle *dev, +int LIBUSB_CALL libusb_claim_interface(libusb_device_handle *dev_handle, int interface_number); -int LIBUSB_CALL libusb_release_interface(libusb_device_handle *dev, +int LIBUSB_CALL libusb_release_interface(libusb_device_handle *dev_handle, int interface_number); libusb_device_handle * LIBUSB_CALL libusb_open_device_with_vid_pid( libusb_context *ctx, uint16_t vendor_id, uint16_t product_id); -int LIBUSB_CALL libusb_set_interface_alt_setting(libusb_device_handle *dev, +int LIBUSB_CALL libusb_set_interface_alt_setting(libusb_device_handle *dev_handle, int interface_number, int alternate_setting); -int LIBUSB_CALL libusb_clear_halt(libusb_device_handle *dev, +int LIBUSB_CALL libusb_clear_halt(libusb_device_handle *dev_handle, unsigned char endpoint); -int LIBUSB_CALL libusb_reset_device(libusb_device_handle *dev); +int LIBUSB_CALL libusb_reset_device(libusb_device_handle *dev_handle); -int LIBUSB_CALL libusb_alloc_streams(libusb_device_handle *dev, +int LIBUSB_CALL libusb_alloc_streams(libusb_device_handle *dev_handle, uint32_t num_streams, unsigned char *endpoints, int num_endpoints); -int LIBUSB_CALL libusb_free_streams(libusb_device_handle *dev, +int LIBUSB_CALL libusb_free_streams(libusb_device_handle *dev_handle, unsigned char *endpoints, int num_endpoints); -int LIBUSB_CALL libusb_kernel_driver_active(libusb_device_handle *dev, +int LIBUSB_CALL libusb_kernel_driver_active(libusb_device_handle *dev_handle, int interface_number); -int LIBUSB_CALL libusb_detach_kernel_driver(libusb_device_handle *dev, +int LIBUSB_CALL libusb_detach_kernel_driver(libusb_device_handle *dev_handle, int interface_number); -int LIBUSB_CALL libusb_attach_kernel_driver(libusb_device_handle *dev, +int LIBUSB_CALL libusb_attach_kernel_driver(libusb_device_handle *dev_handle, int interface_number); int LIBUSB_CALL libusb_set_auto_detach_kernel_driver( - libusb_device_handle *dev, int enable); + libusb_device_handle *dev_handle, int enable); /* async I/O */ @@ -1754,17 +1754,17 @@ int LIBUSB_CALL libusb_interrupt_transfer(libusb_device_handle *dev_handle, * This is a convenience function which formulates the appropriate control * message to retrieve the descriptor. * - * \param dev a device handle + * \param dev_handle a device handle * \param desc_type the descriptor type, see \ref libusb_descriptor_type * \param desc_index the index of the descriptor to retrieve * \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 */ -static inline int libusb_get_descriptor(libusb_device_handle *dev, +static inline int libusb_get_descriptor(libusb_device_handle *dev_handle, uint8_t desc_type, uint8_t desc_index, unsigned char *data, int length) { - return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN, + return libusb_control_transfer(dev_handle, LIBUSB_ENDPOINT_IN, LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t) ((desc_type << 8) | desc_index), 0, data, (uint16_t) length, 1000); } @@ -1775,7 +1775,7 @@ static inline int libusb_get_descriptor(libusb_device_handle *dev, * message to retrieve the descriptor. The string returned is Unicode, as * detailed in the USB specifications. * - * \param dev a device handle + * \param dev_handle a device handle * \param desc_index the index of the descriptor to retrieve * \param langid the language ID for the string descriptor * \param data output buffer for descriptor @@ -1783,15 +1783,15 @@ static inline int libusb_get_descriptor(libusb_device_handle *dev, * \returns number of bytes returned in data, or LIBUSB_ERROR code on failure * \see libusb_get_string_descriptor_ascii() */ -static inline int libusb_get_string_descriptor(libusb_device_handle *dev, +static inline int libusb_get_string_descriptor(libusb_device_handle *dev_handle, uint8_t desc_index, uint16_t langid, unsigned char *data, int length) { - return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN, + return libusb_control_transfer(dev_handle, LIBUSB_ENDPOINT_IN, LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t)((LIBUSB_DT_STRING << 8) | desc_index), langid, data, (uint16_t) length, 1000); } -int LIBUSB_CALL libusb_get_string_descriptor_ascii(libusb_device_handle *dev, +int LIBUSB_CALL libusb_get_string_descriptor_ascii(libusb_device_handle *dev_handle, uint8_t desc_index, unsigned char *data, int length); /* polling and timeouts */ @@ -1967,7 +1967,7 @@ typedef int (LIBUSB_CALL *libusb_hotplug_callback_fn)(libusb_context *ctx, * \param[in] dev_class the device class to match or \ref LIBUSB_HOTPLUG_MATCH_ANY * \param[in] cb_fn the function to be invoked on a matching event/device * \param[in] user_data user data to pass to the callback function - * \param[out] handle pointer to store the handle of the allocated callback (can be NULL) + * \param[out] callback_handle pointer to store the handle of the allocated callback (can be NULL) * \returns LIBUSB_SUCCESS on success LIBUSB_ERROR code on failure */ int LIBUSB_CALL libusb_hotplug_register_callback(libusb_context *ctx, @@ -1977,7 +1977,7 @@ int LIBUSB_CALL libusb_hotplug_register_callback(libusb_context *ctx, int dev_class, libusb_hotplug_callback_fn cb_fn, void *user_data, - libusb_hotplug_callback_handle *handle); + libusb_hotplug_callback_handle *callback_handle); /** \ingroup hotplug * Deregisters a hotplug callback. @@ -1988,10 +1988,10 @@ int LIBUSB_CALL libusb_hotplug_register_callback(libusb_context *ctx, * Since version 1.0.16, \ref LIBUSB_API_VERSION >= 0x01000102 * * \param[in] ctx context this callback is registered with - * \param[in] handle the handle of the callback to deregister + * \param[in] callback_handle the handle of the callback to deregister */ void LIBUSB_CALL libusb_hotplug_deregister_callback(libusb_context *ctx, - libusb_hotplug_callback_handle handle); + libusb_hotplug_callback_handle callback_handle); #ifdef __cplusplus } diff --git a/libusb/libusbi.h b/libusb/libusbi.h index 9ffee40..75a5a81 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -507,7 +507,7 @@ struct libusb_device *usbi_alloc_device(struct libusb_context *ctx, struct libusb_device *usbi_get_device_by_session_id(struct libusb_context *ctx, unsigned long session_id); int usbi_sanitize_device(struct libusb_device *dev); -void usbi_handle_disconnect(struct libusb_device_handle *handle); +void usbi_handle_disconnect(struct libusb_device_handle *dev_handle); int usbi_handle_transfer_completion(struct usbi_transfer *itransfer, enum libusb_transfer_status status); @@ -704,7 +704,7 @@ struct usbi_os_backend { * Do not worry about freeing the handle on failed open, the upper layers * do this for you. */ - int (*open)(struct libusb_device_handle *handle); + int (*open)(struct libusb_device_handle *dev_handle); /* Close a device such that the handle cannot be used again. Your backend * should destroy any resources that were allocated in the open path. @@ -714,7 +714,7 @@ struct usbi_os_backend { * * This function is called when the user closes a device handle. */ - void (*close)(struct libusb_device_handle *handle); + void (*close)(struct libusb_device_handle *dev_handle); /* Retrieve the device descriptor from a device. * @@ -821,7 +821,7 @@ struct usbi_os_backend { * blocking * - another LIBUSB_ERROR code on other failure. */ - int (*get_configuration)(struct libusb_device_handle *handle, int *config); + int (*get_configuration)(struct libusb_device_handle *dev_handle, int *config); /* Set the active configuration for a device. * @@ -838,7 +838,7 @@ struct usbi_os_backend { * was opened * - another LIBUSB_ERROR code on other failure. */ - int (*set_configuration)(struct libusb_device_handle *handle, int config); + int (*set_configuration)(struct libusb_device_handle *dev_handle, int config); /* Claim an interface. When claimed, the application can then perform * I/O to an interface's endpoints. @@ -857,7 +857,7 @@ struct usbi_os_backend { * was opened * - another LIBUSB_ERROR code on other failure */ - int (*claim_interface)(struct libusb_device_handle *handle, int interface_number); + int (*claim_interface)(struct libusb_device_handle *dev_handle, int interface_number); /* Release a previously claimed interface. * @@ -874,7 +874,7 @@ struct usbi_os_backend { * was opened * - another LIBUSB_ERROR code on other failure */ - int (*release_interface)(struct libusb_device_handle *handle, int interface_number); + int (*release_interface)(struct libusb_device_handle *dev_handle, int interface_number); /* Set the alternate setting for an interface. * @@ -890,7 +890,7 @@ struct usbi_os_backend { * was opened * - another LIBUSB_ERROR code on other failure */ - int (*set_interface_altsetting)(struct libusb_device_handle *handle, + int (*set_interface_altsetting)(struct libusb_device_handle *dev_handle, int interface_number, int altsetting); /* Clear a halt/stall condition on an endpoint. @@ -904,12 +904,12 @@ struct usbi_os_backend { * was opened * - another LIBUSB_ERROR code on other failure */ - int (*clear_halt)(struct libusb_device_handle *handle, + int (*clear_halt)(struct libusb_device_handle *dev_handle, unsigned char endpoint); /* Perform a USB port reset to reinitialize a device. * - * If possible, the handle should still be usable after the reset + * If possible, the device handle should still be usable after the reset * completes, assuming that the device descriptors did not change during * reset and all previous interface state can be restored. * @@ -923,14 +923,14 @@ struct usbi_os_backend { * has been disconnected since it was opened * - another LIBUSB_ERROR code on other failure */ - int (*reset_device)(struct libusb_device_handle *handle); + int (*reset_device)(struct libusb_device_handle *dev_handle); /* Alloc num_streams usb3 bulk streams on the passed in endpoints */ - int (*alloc_streams)(struct libusb_device_handle *handle, + int (*alloc_streams)(struct libusb_device_handle *dev_handle, uint32_t num_streams, unsigned char *endpoints, int num_endpoints); /* Free usb3 bulk streams allocated with alloc_streams */ - int (*free_streams)(struct libusb_device_handle *handle, + int (*free_streams)(struct libusb_device_handle *dev_handle, unsigned char *endpoints, int num_endpoints); /* Determine if a kernel driver is active on an interface. Optional. @@ -945,7 +945,7 @@ struct usbi_os_backend { * was opened * - another LIBUSB_ERROR code on other failure */ - int (*kernel_driver_active)(struct libusb_device_handle *handle, + int (*kernel_driver_active)(struct libusb_device_handle *dev_handle, int interface_number); /* Detach a kernel driver from an interface. Optional. @@ -961,7 +961,7 @@ struct usbi_os_backend { * was opened * - another LIBUSB_ERROR code on other failure */ - int (*detach_kernel_driver)(struct libusb_device_handle *handle, + int (*detach_kernel_driver)(struct libusb_device_handle *dev_handle, int interface_number); /* Attach a kernel driver to an interface. Optional. @@ -978,7 +978,7 @@ struct usbi_os_backend { * preventing reattachment * - another LIBUSB_ERROR code on other failure */ - int (*attach_kernel_driver)(struct libusb_device_handle *handle, + int (*attach_kernel_driver)(struct libusb_device_handle *dev_handle, int interface_number); /* Destroy a device. Optional. diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 9bb57fa..bb4ce8e 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11054 +#define LIBUSB_NANO 11055 |