summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* lib: Add battery reporting through BluetoothDeviceBastien Nocera2022-02-071-0/+185
| | | | | | | | | | | | Connect and monitor UPower devices for devices reporting their battery status. This makes sure that we can show battery status for devices that emit their battery status through bluez (via the BATT LE service, or the org.bluez.BatteryProviderManager1 API, as well as devices for which the kernel is the battery info provider. Closes: #102
* lib: Add battery properties to BluetoothDeviceBastien Nocera2022-02-072-0/+41
|
* lib: Add BluetoothBatteryType enumBastien Nocera2022-02-071-0/+14
|
* lib: Use g_auto for this errorBastien Nocera2022-02-071-2/+1
|
* settings-widget: Simplify via `header-suffix`Christopher Davis2022-02-071-45/+26
| | | | | Now that libadwaita has the header-suffix property, we can use AdwPreferencesGroup's built-in header.
* lib: Add getter for connectable propertyJonas Dreßler2022-01-291-0/+3
| | | | | | | The property was forgotten in commit 6f611a67, which made the connect button in the settings panel not work properly. Fixes: 6f611a67
* settings-widget: Use AdwPreferences{Page,Group}Christopher Davis2022-01-252-103/+61
| | | | | | | | | | Panels in g-c-c should be using these widgets wherever possible. These are the widgets meant to be used for boxed list panels, and libadwaita provides a single source of truth for the styling. The UI file will be further reduced once https://gitlab.gnome.org/GNOME/libadwaita/-/merge_requests/433 is merged.
* bluetooth-settings-row: Subclass AdwActionRowChristopher Davis2022-01-253-41/+19
| | | | | Significantly reduces the size of the UI file and gives us consistent margins and padding.
* lib: Add docs for has_connected_input_devices()Bastien Nocera2022-01-201-0/+10
|
* lib: Update docs for device-removed signalBastien Nocera2022-01-201-0/+4
|
* lib: Remove bluetooth_client_get_connectable() APIBastien Nocera2022-01-202-30/+0
|
* settings: Use new "connectable" propertyBastien Nocera2022-01-201-3/+3
|
* lib: Add connectable property to BluetoothDeviceBastien Nocera2022-01-201-0/+41
|
* lib: Add API to check whether input devices are connectedBastien Nocera2022-01-203-0/+32
| | | | | | | | This will figure out whether there are any connected input devices, so that gnome-shell (or gnome-control-center) can show a confirmation dialogue before really turning things off. Closes: #101
* lib: Add separate string for Bluetooth LE servicesBastien Nocera2022-01-203-2/+7
|
* lib: Add constants for some Bluetooth LE servicesBastien Nocera2022-01-201-0/+3
|
* lib: Update links to assigned numbers docsBastien Nocera2022-01-201-3/+3
|
* lib: Split UI and non-UI librariesBastien Nocera2022-01-194-33/+74
| | | | | | Both UI and non-UI libraries export a pkg-config file. Only the non-UI library exports a Gir as it's the only one that gets to be used from a non-native program (gnome-shell).
* lib: Remove adapter power-upBastien Nocera2022-01-181-6/+0
| | | | | Remove the adapter power-up when a new default adapter is added. This should avoid unwanted power-up on the adapter.
* lib: Add settings widget helper to enable Bluetooth adapterBastien Nocera2022-01-183-0/+21
| | | | | This will be used when enabling Bluetooth (eg. disabling the Bluetooth rfkill).
* lib: Handle empty Icon property stringsBastien Nocera2022-01-171-1/+4
|
* lib: Use highest numbered adapter as the default oneBastien Nocera2022-01-061-1/+30
| | | | | | | | | This makes sure that whether, say, hci1 is plugged in before starting the programme using gnome-bluetooth, or after it's been started, the default adapter will still be hci1. The old behaviour could have caused discrepancies in what gnome-shell (long-running) and gnome-control-center saw as the default adapter.
* lib: Rename default adapter change typeBastien Nocera2022-01-061-6/+7
| | | | | "replacement" wasn't really a replacement, we were swapping a proxy for a new one attached to the correct D-Bus owner.
* lib: Sort adapters before inserting themBastien Nocera2022-01-061-20/+34
| | | | | | This would prefer hci1 as the default adapter, but that's already the order in which g_dbus_object_manager_get_objects() returns the objects, so it's more complicated code for the sake of clarity.
* lib: Fix comment to not mention old APIBastien Nocera2022-01-061-2/+1
|
* lib: Fix memory leak on coldplugBastien Nocera2022-01-051-1/+2
|
* lib: Remove unused variableBastien Nocera2022-01-051-2/+0
|
* lib: Add more debug in the discovery codeBastien Nocera2022-01-051-3/+13
| | | | Add debug output when enabling or disabling discovery.
* lib: Correct debug statement in adapter_set_powered()Bastien Nocera2022-01-051-1/+2
| | | | | | To take into account that we can power up, as well as down. Fixes: 96b89f86
* lib: Add more debug when powering up the default adapterBastien Nocera2021-12-161-1/+4
|
* lib: Make default-adapter-powered property settableBastien Nocera2021-12-161-1/+4
|
* lib: Simplify adapter_set_powered()Bastien Nocera2021-12-161-3/+12
| | | | | We don't need to pass the adapter we want to power, we only care about the default adapter.
* settings: Remove "sync" FIXMEBastien Nocera2021-12-151-2/+0
| | | | | This call isn't synchronous since commit 7bbbadd72a55595faaab063c758a7e53fc36b0a5.
* lib: Update existing adapter reference when bluetoothd restartsBastien Nocera2021-12-151-16/+46
| | | | | | Rework the default adapter setting to allow for just the proxy object to be updated, for the same reasons as mentioned earlier for the device proxies.
* lib: Add helper to check for the default adapterBastien Nocera2021-12-151-0/+15
|
* lib: Update device proxies when they changeBastien Nocera2021-12-151-0/+11
| | | | | | | It's possible, when bluetoothd is coming and going, that we'll still have a BluetoothDevice around when the service owner changes. Make sure to avoid duplicates and update the device already in the store instead.
* lib: Split off notifying about default-adapter* propsBastien Nocera2021-12-151-5/+11
|
* lib: Fix adapter never getting powered after it's made defaultBastien Nocera2021-12-151-1/+1
| | | | | | | Fix the inverted logic that meant that adapter_set_powered() was never called when the adapter was unpowered. Fixes: 7956dd42630fd52ba30417fbd4a65894f5fb0d3c
* settings: Make proxy replaceableBastien Nocera2021-12-151-4/+4
| | | | | When bluetoothd is restarted, it's possible that the proxy will need to be changed as the owner changed.
* lib: Fix refcounting of BluetoothDevice::proxyBastien Nocera2021-12-151-1/+1
|
* lib: Add debug to adapter's "notify" callbackBastien Nocera2021-12-151-1/+10
|
* agent: Avoid agent re-registration warningBastien Nocera2021-12-151-1/+1
| | | | Bluetooth-CRITICAL **: bluetooth_agent_register: assertion 'agent->path != NULL' failed
* agent: Add debug when unregistering an agentBastien Nocera2021-12-151-1/+3
|
* lib: Remove last sync callBastien Nocera2021-12-061-6/+53
| | | | Remove the last synchronous call in BluetoothClient.
* tests: Fix bluetooth-utils test buildBastien Nocera2021-12-061-1/+2
| | | | | gnome-bluetooth-enum-types.h could be missing at this point, make sure it's built before we compile the test program.
* lib: Remove GTK includesBastien Nocera2021-12-063-5/+0
|
* lib: Remove gtk include, add gio includeBastien Nocera2021-12-061-2/+1
| | | | | | BluetoothClient doesn't have any GTK types in its header or implementation, so remove the GTK header and "lower it down" to a GIO include.
* lib: Remove remnants of older _setup_device()Bastien Nocera2021-12-062-9/+0
| | | | | | _setup_device() was ported to a GIO-style function in commit 162d9fea90b664ddd822c6167065a93218a04829 but there were bits left around.
* lib: Modernise bluetooth_send_to_address()Bastien Nocera2021-12-063-19/+24
| | | | | Return success or error from the function, and require an address to be passed, now that bluetooth-sendto doesn't include a device chooser.
* lib: Simplify enum types generationBastien Nocera2021-12-023-64/+3
|