Commit Graph
100 Commits
Author SHA1 Message Date
Guido Günther e47ce8e09e led: Add flash LED type
Camera flashes are also exported via the LED subsystem. We use a
separate LED type so they're not picked by default.

We don't use them as fallbacks either.
2024-06-15 11:14:40 +02:00
Guido Günther e16dc3cdab feedback-led: Check if at least one LED is available
So far we didn't create any FbdDevLeds if there wasn't at least one
usable LED. Once we introduce flash LEDs we might probe the LED but the
LED might not be usable as the user hasn't enabled using it. Prepare for
that scenario.
2024-06-15 11:14:40 +02:00
Guido Günther 417b34be89 led: Drop FBD_FEEDBACK_LED_COLOR_LAST
With new led types we might not loop over all of them. This makes
it a bit more obvious.
2024-06-15 11:14:40 +02:00
Guido Günther a71fd7d470 manager: Move schema name to header
This makes it available to other compilation units
2024-06-15 11:14:40 +02:00
Guido Günther afdeb8d56f theme: Use different colors for emails and calls
This makes them a bit simpler to distinguish
2024-06-13 15:19:08 +02:00
Guido Günther a4c35a8e61 led: Parse color values and pass them down the chain
We parse RGB color values as HEX ('#RRGGBB') and use those when a RGB
LED is available. Single color LEDs won't see a change.
2024-06-13 15:19:03 +02:00
Guido Günther efd088daa8 feedback-led: Document hw LED types 2024-06-13 15:17:52 +02:00
Guido Günther 4afc8398e2 feedbackd: Pass GMOBILE_USE_UNSTABLE_API to all files
No need to ack that individually
2024-06-13 15:17:52 +02:00
Guido Günther 5bd398ed18 feedback-led: Support colors as strings
The FbdDevLedColor enum defines the hardware color of the LED. We used
it for the feedbacks color value as long as the kernel mostly had
single color LEDs. As multicolor LEDs are common nowadays switch the
color to a string which will allow us to use RGB values later on.
2024-06-13 15:17:51 +02:00
Guido Günther 4551b1c939 fbd-feedback-led: Modernize property definitions
Adapt current phosh coding style before making other changes
2024-06-13 07:44:42 +02:00
Guido Günther 8d4c2590cb doc: Fix URLs
Don't use Markdown markup as it looks odd in the generated page.
2024-06-13 07:44:39 +02:00
Guido Günther 17d910651d doc: Document feedback types
This allows us to remove the list from the README
2024-06-13 07:44:36 +02:00
Guido Günther 6e9e5700c0 dev-led-multicolor: Use correct format specifier
The values are unsigned int
2024-06-13 07:44:34 +02:00
Guido Günther 9aa6696eb8 build: Let daemon dependency depend on generated enum headers
Otherwise it might not be available in the tests
2024-06-13 07:44:25 +02:00
Guido Günther 1c51eb20ec ci: Use common jobs from meta-phosh 2024-06-12 16:24:33 +02:00
Guido Günther e9743f3daa ci: Update common files from meta-phosh
This updates to commit f3c92e90dcc0d65322888217429b75dd101bd0d3
2024-06-12 16:24:33 +02:00
Guido Günther 3c588fdb8f led-qcom: Check for LED driver
The hw_pattern attribute is driver specific. Ensure we don't apply the
LED pattern to unknown drivers.

Closes: https://source.puri.sm/Librem5/feedbackd/-/issues/77
2024-06-10 15:50:50 +02:00
Guido Günther f581c15842 led-qcom-multicolor: Don't leak qcom_led 2024-06-10 10:33:05 +02:00
Guido Günther 255856822a led-qcom-multicolor: Drop unused defines 2024-06-10 10:33:03 +02:00
Guido Günther fcd210ef22 led-qcom: Use char instead of gchar
We prefer the C types in new code.
2024-06-10 10:33:03 +02:00
Guido Günther bc0449f79d lfb-event: Fix typo in docstring
Gbp-Dch: Ignore
2024-05-31 15:01:00 +02:00
Guido Günther d5b0f30205 tests: Add umockdev based tests for leds
This ensures we can probe the different led types correctly

The umockdev data was recoreded on an Librem 5 and Librem 14
2024-05-17 06:24:50 +00:00
Guido Günther 2db8e8f820 ci: Add clang build 2024-05-17 06:24:50 +00:00
Guido Günther a188cdde7c Build: Use meson instead of ninja 2024-05-17 06:24:50 +00:00
Guido Günther f6a92231db fbd-theme-validate: Use G_NORETURN 2024-05-17 06:24:50 +00:00
Guido Günther 95c51c021d fbd-dev-led-multicolor: Drop unused variable 2024-05-17 06:24:50 +00:00
Guido Günther 973c7e006e led: Don't forget to init variable 2024-05-17 06:24:50 +00:00
Guido Günther b8718992d1 led: Drop unused variable 2024-05-17 06:24:50 +00:00
Guido Günther 83f14a451a led: Add doc strings 2024-05-17 06:24:50 +00:00
Guido Günther 945435f0b5 docs: Expand the examples section a bit 2024-05-11 13:59:55 +02:00
Guido Günther ec6e86ee0c Document changes and release 0.3.0 2024-04-21 12:20:58 +02:00
Guido Günther 2d1d72c746 feedback-manager: Handle important hint
This allows blessed apps to override the per-app as well as the global
feedback level. This can e.g. be useful for alarm clocks.
2024-04-20 13:21:56 +00:00
Guido Günther f575d32651 cli: Allow to set important hint 2024-04-20 13:21:56 +00:00
Guido Günther 716f296ab8 feedback-manager: Parse important hint 2024-04-20 13:21:56 +00:00
Guido Günther 14ffd9722d libfeedback: Allow to set important hint 2024-04-20 13:21:56 +00:00
Guido Günther e6845a52d3 feedback-manager: Use MIN()
A bit easier to read
2024-04-20 13:21:56 +00:00
Guido Günther 6a5d558a83 fbcli: Allow to override app-id
Useful for testing
2024-04-20 13:21:56 +00:00
Guido Günther 7640a73e82 data/schema: Add 'allow-override' gsetting
This allows to list apps that can override the currently
effective feedback level by setting the 'impotant' hint in
the event.
2024-04-20 13:21:56 +00:00
Guido Günther f71ece5d8b data/dbus: Document important hint
The important hint can be used by apps to override the current per app
or system wide feedback level (if the feedback server allows it).
2024-04-20 13:21:56 +00:00
Guido Günther 106663e41c data/dbus: Document current flags 2024-04-20 13:21:56 +00:00
Guido Günther d73677dfff build: Validate schema file 2024-04-20 13:21:56 +00:00
Guido Günther bf52369e68 README: Note what's the preferred way to specify a theme 2024-04-20 13:21:56 +00:00
Guido Günther 673d5df9fd packaging: Add libgirepository1.0-dev 2024-04-20 13:21:56 +00:00
Guido Günther 72ef71a01b build: Allow to use shared gmobile 2024-04-15 10:06:05 +00:00
Guido Günther 8d4fe9f902 build: Switch to gmobile 0.1.0 2024-04-15 10:06:05 +00:00
Guido Günther e656775409 Draft: ci: Add rules for format-check 2024-04-15 09:46:44 +00:00
Guido Günther 0dbbc93adc fbd-dev-led-multicolor: Make it a derivable type
This will allow hw-pattern classes to derive from it.
2024-04-09 15:43:03 +00:00
Guido Günther aa96b064b1 fbd-dev-led-multicolor: Drop unused variable 2024-04-09 15:43:03 +00:00
Guido Günther 987e6371f9 fbd-dev-led-multicolor: Fix indentation 2024-04-09 15:43:03 +00:00
Guido Günther 8020ccc65c ci: Run style checks on merge requests 2023-11-14 17:26:07 +01:00
Guido Günther ba4576d490 ci: Add uncrustify config and checker
Based on what we added to phoc recently
2023-11-14 17:26:07 +01:00
Guido Günther 6c9cadc009 ci: Switch to trixie 2023-11-14 17:26:07 +01:00
Guido Günther d83397279f build: Switch gmobile to 0.0.4
We switch to a wrap which helps us to avoid the submodule
2023-11-14 17:26:07 +01:00
Guido Günther fea20a73d4 packaging: Use meson's default wrap mode
ci should be allowed to download gmobile
2023-11-14 17:26:07 +01:00
Guido Günther 3b970ef34b debian: Install NEWS 2023-09-01 13:06:08 +02:00
Guido Günther 708abf1e4a debian: Fix nodoc build
Don't try to install the dev docs in that case.
2023-09-01 13:06:08 +02:00
Guido Günther b20f08c030 debian: Update from the current packaging in Debian
- Validate fbd-theme-validate
- Add Build-dep to symbols file
- Add doc-base registration
- Use dh_installman to fix nodoc build
- Update debian/copyright
- Improve Recommends: and multi arch annotations
- Add lintian overrides
2023-09-01 13:06:08 +02:00
Guido Günther 48b5ca547f manpages: Fix whatis entry 2023-09-01 13:06:08 +02:00
Guido Günther 93dab70f24 manpages: Improve references 2023-09-01 13:00:49 +02:00
Guido Günther b96a25394b feedback-themes: Improve wording 2023-09-01 13:00:49 +02:00
Guido Günther 5f9d576de8 gitignore gir package 2023-09-01 13:00:48 +02:00
Guido Günther 7521e5b5db NEWS: Add missing contributors for 0.2.1 2023-09-01 13:00:47 +02:00
Guido Günther 9316426225 Document changes and release 0.2.1 2023-08-29 18:32:34 +02:00
Guido Günther 154701fee6 doc: Add manpage for feedback themes
This should direct users to the documentation.

Prompted by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050762
2023-08-29 12:19:54 +02:00
Guido Günther 2ca7a329b7 doc: Better cross reference manpages 2023-08-29 12:14:11 +02:00
Guido Günther 65fa915184 treewide: Drop superfluous '()' after functions in doc strings
Otherwise we have that doubled in the docs
2023-08-29 12:14:11 +02:00
Guido Günther fd28bfd78e event: Fix doc link 2023-08-29 12:14:11 +02:00
Guido Günther b3758dee3d Update NEWS 2023-04-24 10:54:44 +02:00
Guido Günther 8d4b1a09ab Document changes and release 0.2.0 2023-04-17 13:33:08 +02:00
Guido Günther 08ee0daa12 debian/symbols: Update with new API 2023-04-17 13:32:21 +02:00
Guido Günther f9aae0b689 build: Bump version to 0.2.0
We have a slight api change
2023-04-17 13:32:21 +02:00
Guido Günther 2de190fb09 lfb-event: Add getter and setter for app-id
For applications this is figured out automatically but notification
daemons and portal implementations might want to override it to have the
per-app feedback profile picked up automatically.
2023-04-17 13:32:21 +02:00
Guido Günther a58b47e1eb tests: Get properties all at once 2023-04-17 12:21:06 +02:00
Guido Günther 1a5cd090de lfb-event: Avoid allocation when getting profile
We can return the const *. This makes it consistent with other getters.

This is an API change we didn't find any users and the API is declared
unstable.
2023-04-17 12:21:06 +02:00
Guido Günther 31a592e18e debian/symbols: Bump all symbol dependencies to 0.1.1
We want to make sure apps run against a recent version even on
partial upgrades.
2023-04-17 12:21:06 +02:00
Guido Günther 40e1c58de1 Document changes and release 0.1.1 2023-03-23 10:38:30 +01:00
Guido Günther f9c65381db tests/profile: Don't leak json node 2023-03-13 15:26:20 +01:00
Guido Günther 3d7c4b376a feedback-theme: Don't leak parent name 2023-03-13 15:26:18 +01:00
Guido Günther 7becab3346 feedback-theme: Don't leak json array when serializing profile
json_array_add_element doesn't transfer ownership.
2023-03-13 15:26:15 +01:00
Guido Günther 5206c3aae5 feedback-profile: Don't leak json array when serializing profile
json_array_add_element doesn't transfer ownership
2023-03-13 15:26:10 +01:00
Guido Günther 1933a23172 tests: Don't leak profiles and test that
We finalize the theme first so the last reference is dropped when
finalizing the profiles.
2023-03-13 15:26:07 +01:00
Guido Günther 460985cfa0 tests: Don't leak json string 2023-03-13 15:26:04 +01:00
Guido Günther 03b0f4c2aa fbd-event: Make sure we iterate the list safely
When all feedbacks are done the event signals "feedbacks-ended" which
lets the manager dispose the feedback. When all feedbacks end instantly
and synchronously (as is the case with the dummy feedback) this triggers
the disposal of the event within the loop leading to a crash.

Make sure the object doesn't go away be referencing it during the loop
iteration.

We didn't see this before as glib's slice allocator for lists papered
over this for us.

Closes: https://source.puri.sm/Librem5/feedbackd/-/issues/69
2023-03-13 15:25:41 +01:00
Guido Günther 64076e5ad0 fbd-event: Simplify
Gbp-Dch: Ignore
2023-03-13 15:25:37 +01:00
Guido Günther 847c21d78e build: Avoid meson deprecation warning 2023-03-13 15:25:31 +01:00
Guido Günther f50db727a1 Document changes and release 0.1.0 2023-02-25 14:07:09 +01:00
Guido Günther b76e7f775f d/gbp.conf: Be less strict when matching the meson version field 2023-02-25 14:04:09 +01:00
Guido Günther 995d21b587 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.
2023-02-10 15:15:12 +00:00
Guido Günther ca712e9a32 fbd-dev-led: Add class methods so derived classes can override functionality 2023-02-10 15:15:12 +00:00
Guido Günther ac0516329c 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.
2023-02-10 15:15:12 +00:00
Guido Günther f7ec08497e fbd-dev-led: Turn into a GObject
This is just the minimal changes to switch to a derivable GObject
2023-02-10 15:15:12 +00:00
Guido Günther f17ca72c1b fbd-dev-led: Make structure opaque
This will allow us to turn it into a GObject
2023-02-10 15:15:12 +00:00
Guido Günther 5d8b2e5fe4 fbd-dev-led: Allow to lookup color
This allows us to make the led structure into an opaque in
the next commit
2023-02-10 15:15:12 +00:00
Guido Günther 8ad1c43ff1 fbd-dev-leds: Move pattern trigger into fbd-dev-led 2023-02-10 15:15:12 +00:00
Guido Günther fd852c6f69 fbd-dev-leds: Move led creation into fbd-dev-led
This will allow us to separate the different led types
2023-02-10 15:15:12 +00:00
Guido Günther 5fc0372b45 Move LED device to separate file
We separate out the led as different LED types have different
ways to set patterns, etc
2023-02-10 15:15:12 +00:00
Guido Günther 253d178cfc 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.
2023-02-10 15:15:12 +00:00
Guido Günther 1013974958 theme: Fix some indentation 2023-02-10 15:15:12 +00:00
Guido Günther 4ea946b059 debian: Drop obsolete conf file
As this is now handled via udev's kmod builtin we can drop this.
2023-02-09 13:56:08 +01:00
Guido Günther 45bc7bc417 Document changes and release 0.0.3 2023-02-02 13:49:09 +01:00