feedbackd (0.1.0) experimental; urgency=medium

  [ Dylan Van Assche ]
  * udev: load the required kernel modules.
    Loading the required kernel modules such as ledtrig-pattern via
    /etc/modules-load.d may introduce a race condition on some systems such
    as non-systemd based distros. Load the kernel modules using the builtin
    'kmod load' udev command instead.

  [ Guido Günther ]
  * debian: Drop obsolete conf file.
    As this is now handled via udev's kmod builtin we can drop this.
  * theme: Fix some indentation
  * fbd-dev-leds: Use gi-docgen compatible format.
    We don't document the server classes via gi-docgen atm but
    as we use it for the lib update classes we touch.
  * Move LED device to separate file.
    We separate out the led as different LED types have different
    ways to set patterns, etc
  * fbd-dev-leds: Move led creation into fbd-dev-led.
    This will allow us to separate the different led types
  * fbd-dev-leds: Move pattern trigger into fbd-dev-led
  * fbd-dev-led: Allow to lookup color.
    This allows us to make the led structure into an opaque in
    the next commit
  * fbd-dev-led: Make structure opaque.
    This will allow us to turn it into a GObject
  * fbd-dev-led: Turn into a GObject.
    This is just the minimal changes to switch to a derivable GObject
  * fbd-dev-led: Use GInitable.
    Use default GObject patterns instead of stuffing things into the
    fbd_dev_led_new () so derived classes can override it.
  * fbd-dev-led: Add class methods so derived classes can override functionality
  * fbd-dev-led: Move multicolor handling to separate class.
    Everything related to multicolor moves into the new class and we add the
    necessary getters and setters so derived classes can access the parent
    classes attributes where needed.
  * d/gbp.conf: Be less strict when matching the meson version field

 -- Guido Günther <agx@sigxcpu.org>  Sat, 25 Feb 2023 14:04:43 +0100

feedbackd (0.0.3) experimental; urgency=medium

  * build: Add dbus sources to the lib dependency.  Otherwise we might fail to
    generate it for the executables
  * event-naming-spec: Separate application and system events.
    Make it obvious which events are meant to be used by "normal" GUI
    applications in contrast to system components like desktop shells or
    components monitoring the battery, etc.
    This was prompted by
    https://github.com/flatpak/xdg-desktop-portal/issues/929
  * feedback-theme: Add screen-shot event.
    Used to indicate that a screen shot is being taken.
  * lfb-event: Fix docstring.
    This allows gi-docgen to pick it up
  * doc: Fix link to spec in manpage
  * libfeedback: Fix link to specs.
    Since we now have them as part of the API docs we can avoid any remote
    URLs
  * Update gmobile to 0.0.1

 -- Guido Günther <agx@sigxcpu.org>  Thu, 02 Feb 2023 12:10:51 +0100

feedbackd (0.0.2) experimental; urgency=medium

  [ Chris Vogel ]
  * docs: Update references to documentation from branch master to branch main.
  * README: Mention python example
  * doc: feedback stops when client disconnects
  * run: Export GI_TYPELIB_PATH as well.
    This is needed for programs needing GObject introspection data
  * run: Don't hardcode feedbackd.
    This allows arbitrary executables from the source tree with
    a well defined environment.
  * example: Document usage

  [ Guido Günther ]
  * run: Fix daemon name.
    Fixes: 99fc8c2 ("run: Make it easy to run under gdb and document usage")
  * example: Wait a bit before ending
    feedbackd terminates feedback when clients disconnect from DBus so
    we need to wait a bit before quitting as otherwise no feedback will
    be played. (Closes: #65)
  * d/gbp.conf: Update branch.
    Missed that one when switching to 'main'
  * ci: Switch build to bookworm / byzantium.
    Use Debian bookworm for the tests and PureOS byzantium for the
    package build
    We use the arm64 builder as the amd64 one fails to find a shell in the
    bookworm image.
  * d/control: Add settings schema for the tests
  * d/control: Drop Breaks/Replaces on packages long gone
  * d/rules: Support nodoc build profile
  * build: Bump required meson version
  * Switch library documentation to gi-docgen.
    Switch from gtk-doc to gi-docgen for the library documentation and
    adjust the source files accordingly.
    We don't bother about the daemon doc headers as they're not built into
    any docs atm. (Closes: #56)
  * Include specifications in the documentation.
    Now that we can use markdown easily add them as they provide
    help to the developer what events exist, etc.
  * dir-locals: Simlify consistent JS indenting
  * feedback-vibra: Fix indentation
  * tests: Test feedback theme name
  * feedback-theme: No need for constructed.
    We can do all that in init
  * feedback-theme: Fix indentation
  * feedback-theme: Use getter.
    Ensures we stay consistent with future changes
  * feedback-theme: Allow to set name
  * feedback-profile: Document hash types
  * feedback-dummy: Add getter for duration.
    Useful in tests
  * feedback-profile: Allow to update profiles.
    Allow to add feedbacks from a profile to another one
  * feedback-theme: Allow to update theme.
    New profiles are added, existing profiles updated. This will
    allow to merge themes.
  * feedback-theme: Allow to get and set parent theme name.
    If set the parent theme's feedbackd and profiles should be merged into
    this theme.
  * ci: Install git.
    Needed for the submodule
  * Add gmobile library
  * build: Don't include main in lib.
    For that move the error quark to a separate file.
  * Recursively load themes.
    Themes (other than the default theme) can specify a `parent-name` in the
    json file. This theme will be used as a base for the theme. Events and
    profiles of the children override those in the parents.
    For this we move the lookup code into it's separate class and also add
    tests. (Closes: #38)
  * theme-expander: Allow to set the theme to expand
  * data: Allow to set feedback theme
  * manager: Don't load theme in constructor.
    Loading the theme can trigger calls to
    fbd_feedback_manager_get_default() which then results in an endless look
    as the object isn't fully initialized in constructed. Instead do
    the setup in main() which has the advantage that the manager's life
    cycle becomes more obvious too.
  * feedback-manager: Handle theme gsetting.
    Update the theme when the gsetting changes
  * README: Document custom themes
  * tests: Help old glib on PureOS along
  * theme-expander: Also log initial theme file
  * Add theme validator.
    Recursively loads a given theme file.
  * ci: Use bookworm image for package build too.
    No need to fight against old glib and friends in PureOS
  * doc: Convert manpages to rst.
    This will make it more fun to add details and more manpages.
  * doc: Add manual page for fbd-theme-validate
  * d/rules: Don't build tests with nocheck

 -- Guido Günther <agx@sigxcpu.org>  Tue, 13 Dec 2022 13:53:57 +0100

feedbackd (0.0.1) byzantium; urgency=medium

  [ Evangelos Ribeiro Tzaras ]
  * spec: Clarify feedback noisiness.
    The old wording could be interpreted as the feedback being discarded if
    it's noisier than the currently selected profile which is not the case.
    Also take the new per application settings into account.
  * lfb-event: Fix SPDX identifier.
    The library is LGPL-2.1+, not GPL-3.0+
  * test-lfb-integration: Test event state in async callback
  * lfb-event: Notify state change before completing async task
    lfb_event_trigger_feedback_async() internally uses a GTask to handle
    invocation of the user provided callback when g_task_return_*() is
    called.
    Currently GTask is completed first and only afterwards is the state of
    the event being updated which can lead to surprising behaviour.
  * feedback-manager: Use guint for event id.
    The ID is inserted into a hashtable below with GUINT_TO_POINTER
    and is set using self->next_id++ with next_id also being a guint,
    so change the type accordingly.
  * run: Make it easy to run under gdb and document usage.
    Having a fast and easy way to run the daemon under gdb can be beneficial
    for debugging. For that start the run script with FBD_GDB=1.
  * tests/integration: Indicate that callback quits main loop
    on_event_triggered() is renamed to on_event_triggered_quit()
    as we will shortly introduce a variant that does not quit.
  * tests/integration: Fix whitespace.
    Remove all tabs in favour of spaces and align function arguments.
  * tests/integration: Test that "feedback-ended" is propagated through
    LfbEvent.
    When no feedbacks are available (either because the requested event does
    not exist in the theme or because the system does not have required
    capabilities, e.g. no vibration motor or LED) feedbackd will emit a
    "feedback-ended" signal (with reason LFB_EVENT_STATE_REASON_NOT_FOUND)
    on DBus _before_ completing the event triggering DBus call.
    Since the DBus call was not completed yet, LfbEvent will not have
    learned it's ID yet and therefore not emit it's own "feedback-ended"
    GObject signal.
    In this case the test will timeout since the main loop is never quit.
  * feedback-manager: Complete DBus call before emitting "feedback-ended"
    See previous commit adding the test (that now passes) for the reasoning.
    Fixes: #62

  [ Guido Günther ]
  * data: Drop outdated comment.
    We use the hints since some time, see lfb_event_set_feedback_profile().
  * lfb-event: Fix typo. It's LfbEvent
  * lfb-event: Use consistent prefix.
    Make async data use the same prefix.
  * Use g_error() when library is not initialized.
    This makes sure it still works when asserts are disabled.
  * lfb-event: Untabify
  * tests: Drop unused variable
  * tests/integration: Check the state of the ended event
  * manager: Use FEEDBACKD_UDEV_ATTR.
    It was introduced in
    a5b4f99 ("feedbackd: Support visual feedback via LEDs")
  * fbd: Fix indentation

 -- Guido Günther <agx@sigxcpu.org>  Thu, 10 Nov 2022 13:53:19 +0100

feedbackd (0.0.0+git20220520) byzantium; urgency=medium

  [ Guido Günther ]
  * udev: Drop pre L5 pre 5.9 workaround.
    Not neeed in 2022.
  * udev: Use more generic comment.
    Make it more obvious that this isn't device specific

  [ Dylan Van Assche ]
  * fbd-dev-leds: use define for max_brightness.
    All other attributes use a define, let's do the same for max_brightness.
  * fbd-dev-leds: rename var to max_brightness_percentage.
    Improve readability of the code.

  [ Luca Weiss ]
  * fbd-dev-leds: support for multicolor LEDs.
    Add support for multicolor LEDs as supported by the kernel.
    Used by Qualcomm devices such as SHIFT 6mq, OnePlus 6, etc.
    Co-Developed-by: Dylan Van Assche <me@dylanvanassche.be>

 -- Guido Günther <agx@sigxcpu.org>  Fri, 20 May 2022 10:55:13 +0200

feedbackd (0.0.0+git20220208) byzantium; urgency=medium

  [ Pablo Correa Gómez ]
  * Reload theme on SIGHUP signal.
    Allows for users/applications to request a theme reload
    by sending SIGHUP signal to the daemon.

  [ Evangelos Ribeiro Tzaras ]
  * lfb-event: Clarify docstring on lfb_event_set_feedback_profile
  * fbd-event: Fix return value for fbd_event_get_sender
  * doc: Clarify that the timeout is in seconds

  [ Guido Günther ]
  * libfeedback: Remove unused variables
  * tests: Remove unused variables
  * manager: Set initial profile to unknown.
    This makes sure we sync the profile with the DBus property after
    fetching it from GSettings.
  * manager: Sync profile with setting on startup.
    On startup the GSetting is the relevant input for selecting the profle.
    (Closes: #52)
  * manager: Don't sync DBus profile property.
    This will happen in on_feedbackd_setting_changed() once the
    profile was adjusted.

 -- Guido Günther <agx@sigxcpu.org>  Tue, 08 Feb 2022 11:29:41 +0100

feedbackd (0.0.0+git20211018) byzantium; urgency=medium

  [ Evangelos Ribeiro Tzaras ]
  * fbd-dev-sound: Honour sound theme name for all GNOME based desktops.
  * d/control: Add json-glib-tools as build dependency.
    This will make sure that the json theme file gets validated in CI.
  * feedback-theme: Add phone-{hangup,failure,outgoing-busy} events.
  * naming-spec: Fix upper cases, whitespaces and punctuation.

  [ Andreas Hartmann ]
  * fbd-feedback-manager: Make sure theme path components are '/' separated.
  * README: Add explanation on custom theme paths.

  [ Pablo Correa Gómez ]
  * feedback-manager: Search for default theme under XDG_CONFIG_HOME first.
    This would allow users to create their own feedback profiles
  * Fix typos in documentation
  * README: dbus calls not usable to trigger feedback.
    Fixes #45

  [ Guido Günther ]
  * examples: Unbreak python example.
  * docs: Fix --profile short option. It's '-P', not '-p'.
  * cli: Fix changing global profile.
  * feedback-theme: Add camera related events
  * gitlab-ci: Switch to bullseye.
  * fbd-dev-sound: Delay sending `ended` signal. This makes sure
    we properly end the feedback even when looping.

 -- Guido Günther <agx@sigxcpu.org>  Tue, 19 Oct 2021 13:13:43 +0200

feedbackd (0.0.0+git20210426) byzantium; urgency=medium

  [ Martin Bürgmann ]
  * implement fbd_dev_sound_stop
    tracks the FdbFeedbackSounds in a GHashTable in the FdbDevSound
    (Closes: #10)

  [ Guido Günther ]
  * fbd-dev-sound: Don't leak GError
  * fbd-dev-sound: Don't warn when sound was cancelled.
    This is not an error per se.
  * lfb-event: Don't leak error.
    Don't leak the error values in the success case
  * tests: Run lfb_event_{get,set}_timeout
  * test-lfb-integration: Test invocation error
  * event: Make log-domain match source file name
  * tests: Run event tests too
  * event: Remove 'g' prefix from common C types.
    This matchs phosh's style.
  * fbd-event: Add sender property.
    This allows us to store the DBus sender
  * fbd-manager: Keep DBus sender around
  * feedback-manager: Track DBus clients and end feedbacks if they go away.
    When the client goes away we build up a list of events to end feedback
    for to make sure the hash table isn't modified in place. tThe alternative
    approach would be to disconnect the on_event_feedbacks_ended handler,
    duplicate the DBus signal emission and use g_hash_table_foreach_remove
    but that looks less robust than using the same code path. (Closes: #25)
  * Help emacs to indent properly
  * fbd-feedback-theme: Don't leak JSON node
  * fbd-dev-leds: Free actual FbdDevLed as well.
    So far we only unref'ed the device.
  * fbd-dev-leds: Don't leak enum_name
    g_enum_to_string() is transfer full.
  * fbd-dev-leds: Don't leak color
    g_ascii_strdown() creates a copy already.
  * fbd-dev-leds: Use automatic deep cleanup for device list.
    The current logic was fragile and failed e.g. when the
    FEEDBACKD_UDEV_VAL_LED would not match leaking the dev since the
    g_object_unref() at the end of the loop was never hit.
    Prevent that with automatic cleanup and explicitly ref'ing the
    devs we want to use.
  * fbd-dev-sound: Use correct cleanup for hash table.
    This went unnoticed since the manager forgot to cleanup
    this at all (see follow up commit).
  * fbd-feedback-manager: Make sure to dispose sound device as well.
    Fixes another leak.
  * fbd-feedback-manager: Don't leak config_path.
    It's assigned multiple times.
  * fbd-feedback-manager: Don't leak device list

  [ Clayton Craft ]
  * fbd-ledctrl: fix matching of trigger in list of triggers.
    If the trigger is the last thing in sysfs_path/LED_TRIGGER_ATTR, then
    the new-line at the end of the output causes g_strv_contains to fail to
    find the trigger in the list. This strips the new-line before splitting
    the output into a list for searching.

  [ Sebastian Spaeth ]
  * README: Fix gdbus test command.
    It is TriggerFeedback and not Feedback (anymore). Also add a note how to
    end the feedback in order to prevent loss of hearing :-).

 -- Guido Günther <agx@sigxcpu.org>  Mon, 26 Apr 2021 12:34:38 +0200

feedbackd (0.0.0+git20210125) amber-phone; urgency=medium

  [ Dylan Van Assche ]
  * meson.build: compile GLib schemas on install.
    Run a script as a post install to make sure that all GLib schemas are compiled
  * fbd-feedback-manager: Allow device-specific feedbackd themes.

  [ Guido Günther ]
  * feedback-manager: Fix formatting.

 -- Guido Günther <agx@sigxcpu.org>  Mon, 25 Jan 2021 10:50:15 +0100

feedbackd (0.0.0+git20201114) amber-phone; urgency=high

  [ Guido Günther ]
  * sound: Set 'event' media role.  This allows pa to cork, duck, etc.
  * gitlab-ci: Honor PKG_ONLY.  This allow us to get debs quicker
  * udev: Update led maching for the librem5.  The names changed in device
    tree which tickles up into userspace.
  * debian: Don't abuse the video group.  Use a separate group for users that
    should be able to access the LED devices.

  [ Luca Weiss ]
  * fbd-dev-leds: fix brightness parameter.
    The fbd_dev_led_set_brightness function is only getting called with
    parameter 0 at the moment so this was never noticed.
  * Fix typos

 -- Guido Günther <agx@sigxcpu.org>  Sat, 14 Nov 2020 15:54:23 +0100

feedbackd (0.0.0+git20200726) amber-phone; urgency=medium

  [ Arnaud Ferraris ]
  * debian: udev: add support for PinePhone front LEDs
  * fbd-dev-leds: store LED color when parsing devices.
    Failing to do so will always select the first recognized LED (the blue 
    one for the PinePhone).

  [ Guido Günther ]
  * Release new git snapshot
  * fbd-dev-sound: Be less verbose on missing sound files.
    This is quite common so don't fill the logs at normal debug levels
    but be more specific about what is missing.
  * fbd-feedback-base: Add fbd_feedback_is_available ()
    This allows to check if a feedback type is available
    at all.
  * feedback-manager: Fix indentation
  * fbd-feedback-manager: Check if feedback is usable.
    If we don't find any usable feedbacks for an event return
    FBD_EVENT_END_REASON_NOT_FOUND.
  * fbd-feedback-led: Implement is_available ()
    This avoids criticals when there's no Leds available.
  * feedback-vibra-rumble: Implement is_available.
    This avoids criticals when there's no rumble vibra available.
  * feedback-vibra-periodic: Implement is_available.
    This avoids criticals when there's no periodic vibra available.
  * feedback-sound: Implement is_available.
    This avoids criticals when there's sound device available. We
    can also be more precise about the reason why feedback ended.
  * feedback-theme: Avoid warning when feedback is not found.
    We tell the caller so debug level is enough
  * tests: Don't check end reason in feedback handler.
    This allows to reuse the feedback handler and we check the
    reason in the actual test function anyway.
  * tests: Test event not found case too
  * feedback-manager: Deeply free the feedback list.
    Instead of freeing each element after each iteration and then the list
    itself at the very end just fully free the list. g_autoslist does
    not work well on oder glib so do that manually.
    This is just cosmetics.
  * feedback-manager: Don't forget to remove not found events from the hash table.
    This plugs a leak.
  * feedback-manager: Dispose leds too
  * feedback-led: Stop the correct led color
  * feedback-led: Don't try to stop led when there's no led device.
    This is not a critical since we prevented submitting initially
    but daemon cleanup processes all entries in the theme.
  * fbd: Dispose manager at the very end

 -- Guido Günther <agx@sigxcpu.org>  Sun, 26 Jul 2020 13:05:59 +0200

feedbackd (0.0.0+git20200714) amber-phone; urgency=medium

  [ Arnaud Ferraris ]
  * doc: fix typos
  * doc: feedbackd: add short description.
    Lintian issues a warning if short description is empty.
  * fbd-ledctrl: fix typo

  [ Guido Günther ]
  * lfb-event: Clarify return values of `finished` functions.
    They just inidicate that we talked to feedbackd successfully.
  * lfb-event: Connect done handler in async case too.
    Otherwise the event state is not updated properly
  * tests: Don't quit mainloop on event end.
    This is needed to properly test aync where we have the
    finished async event handler and the signal.
  * tests: Use async feedback as the test name implies

 -- Guido Günther <agx@sigxcpu.org>  Tue, 14 Jul 2020 10:30:45 +0200

feedbackd (0.0.0+git20200707) amber-phone; urgency=medium

  [ Sebastian Krzyszkowiak ]
  * data: Lower rumble time for window-close and button-pressed even more.
    Haptic feedback for touchscreen input should be as subtle as possible
    to not make it distracting.
  * data: Add button-released event

  [ Guido Günther ]
  * feedback-sound: Plug a leak.
    We did not free the effect name
  * Doc cleanups
  * feedback-manager: Only act on add.
    We would otherwise ignore the action when no vibra device was yet found.
    Make sure we release the old device when updating.
  * libfeedback: Unset _initted early.
    This make sure a client does not end up in our shutdown phase and sees a
    half initted library.
  * libfeedback: Cancel all running feedbacks on uninit.
    We keep track of the active ids and end them on uninit. This
    make sure feedbacks don't continue to run if the application quits
    and forgets to end a feedback.
  * fbcli: Quit main loop on CTRL-C / SIGTERM.
    This makes sure we invoke the cleanup function correctly and allows
    to test running event handling.
  * docs: Add manpages (Closes: #12)
  * data: Drop phone-missed-call in 'quiet' profile.  Only want LEDs there.
  * feedbackd: Add helper to set up permissions for LEDs.
    This helper knows about the triggers and necessary permission.
    It's intended to be run via udev.
  * debian: Setup leds via udev.
    This allows feedbackd to set periodic feedback and makes usable
    LED devices identifiable by feedbackd.
  * feedbackd: Support visual feedback via LEDs.
    later on by using the 'repeat' attribute of the LED pattern
    trigger.
  * data: Use LED feedback for missed calls, IMs and SMS
  * Add generic missed notification.
    This can be used e.g. by the shell for general purpose notifictions
    but also for in app notifications of the foreground app.
  * feedback-manager: Add hint to select feedback profile per event.
    This e.g. allows events that are meant for haptic only to avoid
    emitting a sound by omitting the 'full' level and using "quiet"
    instead. (Closes: #7)
  * LfbEvent: Add feedback-profile property.
    This allows to specify the feedback profile to use for
    this particular event.
  * cli: Allow to set profile per event.
    We allowed set the global profile via `-P` use it as per event
    profile when used with `-E`.

  [ Dorota Czaplejewicz ]
  * build: Remove feedback dependencies from libfeedback builds

 -- Guido Günther <agx@sigxcpu.org>  Fri, 10 Jul 2020 11:52:07 +0200

feedbackd (0.0.0+git20200527) amber; urgency=medium

  [ Rasmus Thomsen ]
  * build: add proper dependencies on gdbus-codgen-generated headers.
    Without this it was possible that ninja built a target that needs
    the generated header before the header was generated

  [ Guido Günther ]
  * Release another git snapshot
  * Honor sound theme on GNOME.
    We don't set this for other DEs since they might want to pick a good
    default from elsewhere.

 -- Guido Günther <agx@sigxcpu.org>  Wed, 27 May 2020 10:00:08 +0200

feedbackd (0.0.0+git20200420) amber; urgency=medium

  [ Guido Günther ]
  * Release another git snapshot
  * Add symbols file
  * theme: order feedbacks alphabetically.
  * theme: Add feedbacks for window-close and button-press
  * Allow to lower the feedback level per application.

  [ Arnaud Ferraris ]
  * d/control: customize short descriptions per binary package
  * d/control: change feedbackd-common architecture to 'all'
  * debian: rename gir package to match typelib name

 -- Guido Günther <agx@sigxcpu.org>  Mon, 20 Apr 2020 09:55:33 +0200

feedbackd (0.0.0+git20200305) amber-phone; urgency=medium

  * feedbackd-common: Add proper Breaks/Replaces.
    This handles partial upgrades with newer schema but old feebackd.

 -- Guido Günther <agx@sigxcpu.org>  Mon, 23 Mar 2020 10:21:14 +0100

feedbackd (0.0.0+git20200304) amber-phone; urgency=medium

  [ Guido Günther ]
  * libfeedback: Drop trailing semicolon.
    Trips up some compilers.
    Thanks to Andrea Schaefer
  * build: Don't add lfb-enums.c to list of generated sources.
    Otherwise when used as a subproject the master project will try
    to rebuild with it's own set of flags. These lack
    LIBFEEDBACK_COMPILATION which does not end well.
  * Fix typos
  * theme: Add timeout-completed event for alarms and stop watches
  * Update docs (Closes: #4, #8)
  * debian: Split out shared files.
    This allows other programs (like gnome-control-center) to consume the
    settings schema without having to depend on the daemon itself.

  [ Rasmus Thomsen ]
  * fbd-feedback-profile: use G_GSIZE_FORMAT instead of hardcoding lu.
    On 32-bit platforms lu doesn't apply since GType is defined as a gsize
    fixes #15

 -- Guido Günther <agx@sigxcpu.org>  Wed, 04 Mar 2020 16:46:36 +0100

feedbackd (0.0.0+git20200214) amber-phone; urgency=medium

  * Initial git snapshot

 -- Guido Günther <agx@sigxcpu.org>  Wed, 16 Oct 2019 21:22:33 +0200
