1. 16 May, 2022 1 commit
  2. 10 May, 2022 1 commit
  3. 09 May, 2022 3 commits
    • Benjamin Berg's avatar
      device: Add polling related properties · 3b287504
      Benjamin Berg authored
      Add last-refresh and poll-timeout properties. Update the last-refresh
      property automatically from the internal refresh method. Note that it is
      fine if we miss (some) updates for now, as the polling code which uses
      the property will update it.
    • Benjamin Berg's avatar
      device: Remove useless comments · 8080119e
      Benjamin Berg authored
    • Benjamin Berg's avatar
      device: Flag refresh reason · 7f7839bd
      Benjamin Berg authored
      The reason of a refresh may be interesting to special case certain
      situation (e.g. discontinuity of charge after wakeup, polling again
      after an event). As such, add an enum parameter that signals the reason
      for the refresh.
  4. 20 Apr, 2022 2 commits
    • Benjamin Berg's avatar
      device: Handle device coldplug using GInitable · 25ddb11f
      Benjamin Berg authored
      There are only a few cases where we separate construction and coldplug.
      Porting to GInitable is relatively natural here and makes the code a
      little nicer overall. In the case that immediate coldplug/initialization
      is not desired, we can still split the operations.
    • Benjamin Berg's avatar
      device: Register display device the same way as other devices · 20fed261
      Benjamin Berg authored
      We can just assume that a device with a NULL native device is the
      display device. Using this, we can special case the naming and rely on
      the normal internal up_device_register_device function to register the
      display device.
  5. 19 Apr, 2022 1 commit
    • Bastien Nocera's avatar
      device: Only handle Refresh() method if in debug mode · d0ebbe32
      Bastien Nocera authored
      The Refresh D-Bus method could be used by clients to force re-reading
      the state of batteries in the upower backends. This is not needed as
      all the backends should be sending events when their states changes,
      removing the need for an explicit refresh.
      This is also a potential security problem if applications keep on
      refreshing their data.
      We now only allow access to the Refresh() method if the daemon was
      started in debugging mode. This should make it clearer that it is a
      debug tool.
      Also remove a mention of the never implemented refresh-power-source
      polkit authorisation.
  6. 01 Apr, 2022 2 commits
  7. 21 Feb, 2022 1 commit
  8. 16 Feb, 2022 1 commit
    • Bastien Nocera's avatar
      daemon: Remove warning_level variable · dc891bd5
      Bastien Nocera authored
      It was only used in one function. The value should be kept in the
      DisplayDevice instead, but we need to make sure that the UpDevice code
      never changes the warning-level, only the daemon does.
  9. 07 Sep, 2021 1 commit
  10. 30 Jun, 2021 2 commits
    • Pablo Correa Gomez's avatar
      device: Don't update properties when device isn't exported · 988e79ae
      Pablo Correa Gomez authored and Bastien Nocera's avatar Bastien Nocera committed
      The code in up_device_notify() will still eventually be reached when the
      up_device_coldplug() implementations are called, and properties are set
      for the device type for the first time (rather than during instance
    • Pablo Correa Gomez's avatar
      daemon: Sync icon and warning for non-default low level · 665a3b27
      Pablo Correa Gomez authored and Bastien Nocera's avatar Bastien Nocera committed
      Before, the low level for changing the battery icon was hardcoded.
      However, as the `low_percentage` property is settable by the user using
      `PercentageLow` option. That can lead to inconsistencies when PercentageLow
      is not the default. For example, if PercentageLow is set higher than 10,
      the Low Battery level warning will be sent at the user-set level, but the
      battery icon would not be updated to "caution" until the percentage
      drops below 10%.
      This issue is solved in this commit by using the `low_percentage` property
      for the comparison instead of hardcoding the default.
  11. 18 Jun, 2021 1 commit
  12. 21 Feb, 2019 2 commits
    • Christian Kellner's avatar
      Replace use of G_TYPE_INSTANCE_GET_PRIVATE · 9b7ce3de
      Christian Kellner authored
      G_TYPE_INSTANCE_GET_PRIVATE has been deprecated since glib version
      2.58 and should be replaced with the xxx_get_instance_private (obj)
      which is generated by G_ADD_PRIVATE.
    • Christian Kellner's avatar
      Replace use of deprecated g_type_class_add_private · 8da188b3
      Christian Kellner authored
      Use G_DEFINE_TYPE_WITH_CODE (..., G_PRIVATE_ADD (...)) instead of
      the (deprecated since glib 2.58) function g_type_class_add_private
      to add a private structure for a type.
      Bump the minimal required version of glib to 2.38.0, the version
      where G_PRIVATE_ADD was added.
  13. 19 Apr, 2018 1 commit
  14. 31 Oct, 2017 1 commit
  15. 08 Sep, 2017 1 commit
  16. 06 Apr, 2017 1 commit
  17. 24 Mar, 2017 1 commit
  18. 29 Jul, 2015 4 commits
  19. 26 Nov, 2014 2 commits
  20. 18 Oct, 2013 3 commits
  21. 17 Oct, 2013 2 commits
    • Bastien Nocera's avatar
      daemon: Fix crash when device is removed · aa5636e5
      Bastien Nocera authored
      When the device was removed, we forgot to cancel sending
      out changed properties, causing illegal memory accesses.
    • Bastien Nocera's avatar
      all: Remove *changed signals · 0010e932
      Bastien Nocera authored
      Now that we send out PropertiesChanged signals (on the daemon side)
      and "notify" signals (on the client side), there's no need for the
      all encompassing DeviceChanged and Changed signals.
      They would have woken up any client, even if they were not interested
      in receiving the signals.
  22. 16 Oct, 2013 5 commits
  23. 15 Oct, 2013 1 commit