summaryrefslogtreecommitdiff
path: root/usbredirhost/usbredirhost.h
AgeCommit message (Collapse)AuthorFilesLines
2012-09-19Make usbredir*_has_data_to_write return the write queue depthHans de Goede1-2/+2
Instead of only returning 0 or 1, this can be used for flowcontrol purposes. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06usbredirhost: Failure to re-claim after a set_config means we've lost the devHans de Goede1-1/+5
So cleanup on failure to re-claim after a set_config, and let our user know that we've lost the device with a new usbredirhost_read_device_lost status. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-02-22usbredirfilter: constify various rules pointersHans de Goede1-2/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-02-16usbredirhost: Allow re-using a host instance with multiple devicesHans de Goede1-13/+37
See the description of the new usbredirhost_set_device() function in usbredirhost/usbredirhost.h Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-02-14Add a usb_redir_filter_filter packetHans de Goede1-0/+5
Make this conditional on the same cap as device_reject, rename the cap to usb_redir_cap_filter. Rename device_reject to filter_reject to reflect that it is filtering related and that the the cap and packet names are consistent with each other. Also cleanup some related comments / docs. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-02-14usbredirhost.h: Fix comment about our multi-thread safenessHans de Goede1-7/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-02-10Add an usb_redir_device_reject packetHans de Goede1-4/+13
Add an usb_redir_device_reject packet to allow notifying the usb-host when an usb-guest rejects a device because of usb-guest side device filtering. Also bump the version to 0.3.4 so that apps can check if libusbredirparser / libusbredirhost knows about usb_redir_device_reject by checking the version number. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-11usbredirparser: Add usbredirfilter codeHans de Goede1-0/+11
Add usbredirfilter code, to help apps exclude certain devices from redirection. See the new usbredirfilter.h for details. This commit also bumps the reported version to 0.3.3, so that apps using libusbredirparser can check for this version to check the presence of the new usbredirfilter functions. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-12-19Allow specifying locking functions for multi-threading on open / createHans de Goede1-10/+14
Having separate set_locking_funcs functions causes the locking functions to be available potentially too late. And it just is not very pretty. This commit changes the API (in a way which is backward compat with 0.3.1), so that locking functions can be specified at creation time, just like all the other callbacks. This commit also bumps the reported version to 0.3.2, so that apps using libusbredirhost can check for this version to check the presence of the new usbredirhost_open_full function. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-08-24usbredirhost: Add a write flush callbackHans de Goede1-0/+5
2011-08-24libusbredir*: Add (limited) multi-threading supportHans de Goede1-0/+7
2011-08-05libusbredirhost: Document libusbredirhost_open closing the handle on failureHans de Goede1-0/+4
Document that libusbredirhost_open closes the past in libusb device handle on failure, and make sure this is always true.
2011-08-04usbredirhost: Add usbredirhost_free_write_buffer functionHans de Goede1-0/+5
2011-08-01usbredirhost: Add a flags parameter to usbredirhost_openHans de Goede1-1/+6
2011-07-13usbredirhost: Wait for cancelled packets to complete on device closeHans de Goede1-1/+6
This: -fixes a memleak where we would not free the transfer + transfer buffer for iso / int transfers -stops libusb from complaining there are still transfers pending on device close
2011-06-08Silence cancel urb errors during iso stream cancelHans de Goede1-1/+3
When cancelling an active iso stream some iso packets will likely complete while we are cancelling, but we will see them as uncomplete as long as we've not asked libusb to check for complete transfers, this is inherently racy and there is nothing we can do. Thus we will sometimes try to cancel already completed transfers which will fail. This is not a problem, but libusb spews ugly error messages to stderr when this happens. This patch silences these error messages.
2011-05-06Put source files into subdirsHans de Goede1-0/+80