summaryrefslogtreecommitdiff
path: root/gusb/gusb-context.h
Commit message (Collapse)AuthorAgeFilesLines
* Do not emit spurious ::device-removed events when emulatingRichard Hughes2023-02-031-1/+2
| | | | | | | | | If we load new emulation data we have to do horrible tricks in the caller to avoid handling the remove event when loading new event data. Make the caller (fwupd) much simpler by emitting the correct signals. Also add a ::device-changed signal that we can use to reload the device events.
* Reduce the debugging level when emulating firmwareRichard Hughes2023-01-271-0/+1
|
* Save removed devices in JSON dump only when requestedFrédéric Danis2023-01-191-0/+1
| | | | | Removed devices should not be saved when trying dump events per update phase.
* Allow loading and saving only devices with specific tagsRichard Hughes2022-09-131-0/+10
| | | | | This would allow us, for example, to only load devices in bootloader or runtime phases.
* Save device events when requiredRichard Hughes2022-09-081-0/+1
| | | | | | This allows us to simulate an entire context of devices, simulating responses as if the hardware is connected. This allows building rich device-specific unit tests in programs like fwupd, without having to have the hardware attached.
* Serialize the GUsbDevice to and from JSON formatRichard Hughes2022-09-051-0/+5
| | | | This allows us to write tests that mock up entire devices.
* trivial: Use @self for instance dataRichard Hughes2022-09-051-16/+16
|
* Use G_DECLARE_DERIVABLE_TYPE to reduce boilerplateRichard Hughes2022-09-051-12/+1
|
* Reformat the code using clang-formatRichard Hughes2022-09-041-63/+61
| | | | | This frees up mental energy when reviewing patches and is something I should have done a long time ago.
* trivial: Remove some duplicate header includesRichard Hughes2022-06-161-2/+0
|
* Only include the start year in the copyright headerRichard Hughes2022-06-161-1/+1
| | | | | The end year is legally and functionally redundant, and more importantly causes cherry-pick conflicts when trying to maintain old branches.
* Add API to change the hotplug poll intervalRichard Hughes2022-01-061-0/+3
|
* Use '#pragma once' to reduce boilerplateRichard Hughes2020-01-211-4/+1
|
* trivial: Use SPDX-License-Identifier tagsRichard Hughes2020-01-211-14/+1
|
* Add g_usb_context_set_flags()Richard Hughes2017-07-231-0/+16
| | | | This allows us to auto-open devices as they are hotplugged.
* Add g_usb_context_wait_for_replug()Richard Hughes2016-03-101-1/+6
|
* Allow setting the GMainContext when used for sync methodsRichard Hughes2015-05-261-0/+3
|
* Add g_usb_context_find_by_platform_id()Richard Hughes2015-01-051-0/+3
|
* Use a thread to process libusb1 eventsRichard Hughes2014-11-251-10/+29
| | | | | | The libusb_set_pollfd_notifiers() function will only work on Linux and we can use a thread to do exactly the same thing in a cross platform way with a lot less code.
* Rename inconsistently named gusb_* symbols to g_usb_*Evan Nemerson2012-06-101-1/+1
| | | | Signed-off-by: Richard Hughes <richard@hughsie.com>
* Ensure that there is only one GUsbSource for each GUsbContextDebarshi Ray2011-09-081-0/+4
| | | | | | | | | | As a result, g_usb_source_{new,destroy} have been moved to a private header, and are called from the get_source and finalize methods of GUsbContext. Note that the GUsbSource is lazy allocated and only created when g_usb_context_get_source is called for the first time for a particular GUsbContext.
* Add padding to GUsb*Class structsHans de Goede2011-09-071-0/+7
| | | | | | This allows us to later add signals without changing the ABI. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Rename libgusb to gusbHans de Goede2011-08-101-0/+63
So that we can include our headers from other headers in the form of: include <gusb/gusb-foo.h> And still have a working local build.