Guido Günther
e6f1c351e2
feedback-theme: Fix indentation
2022-12-08 10:05:47 +01:00
Guido Günther
c9404d871e
feedback-theme: No need for constructed
...
We can do all that in init
2022-12-08 10:05:47 +01:00
Guido Günther
96b6af3766
tests: Test feedback theme name
2022-12-08 10:05:47 +01:00
Guido Günther
3c124e8ecd
feedback-vibra: Fix indentation
2022-12-08 10:05:47 +01:00
Guido Günther
3e4f66993e
dir-locals: Simlify consistent JS indenting
2022-12-08 10:05:47 +01:00
Guido Gunther
7ab5af7269
Merge branch 'gi-docgen' into 'main'
...
Switch library documentation to gi-docgen
Closes #56
See merge request Librem5/feedbackd!94
2022-12-08 09:04:40 +00:00
Guido Günther
6acdb67b78
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.
2022-12-06 13:58:04 +01:00
Guido Günther
a150c2cbc3
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
2022-12-06 12:44:54 +01:00
Guido Günther
7b7422f98e
build: Bump required meson version
2022-12-06 11:49:13 +01:00
Guido Günther
94880dbc0d
d/rules: Support nodoc build profile
2022-12-06 11:49:13 +01:00
Guido Günther
dfe2cdc665
d/control: Drop Breaks/Replaces on packages long gone
2022-12-06 11:21:04 +01:00
Guido Gunther
1e3175301c
Merge branch 'sid' into 'main'
...
Add a missing dependencies for the tests to pass on Debian sid
See merge request Librem5/feedbackd!92
2022-12-05 19:10:12 +00:00
Guido Günther
388cf959ce
d/changelog: Fix typos
...
Gbp-Dch: Ignore
2022-12-05 19:00:18 +00:00
Guido Günther
a6809dccbc
d/control: Add settings schema for the tests
2022-12-05 19:00:18 +00:00
Guido Gunther
c01ac64212
Merge branch 'update-ci' into 'main'
...
ci: Switch build to bookworm / byzantium
See merge request Librem5/feedbackd!91
2022-12-05 13:28:06 +00:00
Guido Günther
bbcb396df8
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.
2022-12-05 13:18:23 +00:00
Guido Gunther
50608ce5a2
Merge branch 'gbp.conf' into 'main'
...
d/gbp.conf: Update branch
See merge request Librem5/feedbackd!84
2022-12-03 14:34:30 +00:00
Guido Günther
fbfcce4470
d/gbp.conf: Update branch
...
Missed that one when switching to 'main'
2022-12-03 14:27:57 +00:00
Guido Gunther
59363bfed1
Merge branch 'example-wait' into 'main'
...
example: Wait a bit before ending
Closes #65
See merge request Librem5/feedbackd!85
2022-12-03 12:48:09 +00:00
Guido Günther
254bf944eb
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
2022-12-03 12:42:41 +00:00
Guido Gunther
3206976a4a
Merge branch 'calls-vs-feedbackd' into 'main'
...
run: Fix daemon name
See merge request Librem5/feedbackd!89
2022-12-03 12:35:30 +00:00
Guido Günther
b0dc0c64cc
run: Fix daemon name
...
Fixes: 99fc8c2 ("run: Make it easy to run under gdb and document usage")
2022-12-03 12:29:55 +00:00
Guido Gunther
d19e7b4f7d
Merge branch 'update_README' into 'main'
...
Update README.md
See merge request Librem5/feedbackd!88
2022-11-28 10:16:28 +00:00
Chris Vogel
f5391af6b9
README: Mention python example
2022-11-28 10:10:27 +00:00
Chris Vogel
16fc583ff8
README: Mention that DBus disconnect ends feedback
2022-11-28 10:10:27 +00:00
Guido Gunther
482eb05d1c
Merge branch 'ChriChri-main-patch-39100' into 'main'
...
Updated references to documentation
See merge request Librem5/feedbackd!86
2022-11-28 09:30:00 +00:00
Chris Vogel
64956ea4df
docs: Update references to documentation from branch master to branch main.
2022-11-28 10:22:26 +01:00
Guido Gunther
99c12e77d8
Merge branch 'rel' into 'main'
...
Document changes and release 0.0.1
See merge request Librem5/feedbackd!83
2022-11-11 10:02:17 +00:00
Guido Günther
193c0f8e57
Document changes and release 0.0.1
2022-11-11 10:54:55 +01:00
Guido Gunther
1b8d705802
Merge branch 'cleanups' into 'main'
...
More cleanups
See merge request Librem5/feedbackd!80
2022-11-11 09:50:28 +00:00
Guido Günther
2e29f5baf1
fbd: Fix indentation
2022-11-11 09:50:19 +00:00
Guido Günther
db13fc031d
manager: Use FEEDBACKD_UDEV_ATTR
...
It was introduced in
a5b4f99 ("feedbackd: Support visual feedback via LEDs")
2022-11-11 09:50:19 +00:00
Guido Gunther
68189de793
Merge branch 'misc_cleanups' into 'main'
...
tests/integration: Test that "feedback-ended" is propagated through LfbEvent
Closes #62
See merge request Librem5/feedbackd!82
2022-11-10 12:52:07 +00:00
Evangelos Ribeiro Tzaras
d739a33a5f
feedback-manager: Complete DBus call before emitting "feedback-ended"
...
See previous commit adding the test (that now passes) for the reasoning.
Fixes : #62
2022-11-09 11:54:46 +01:00
Evangelos Ribeiro Tzaras
72c7d3ba25
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.
2022-11-09 11:54:44 +01:00
Evangelos Ribeiro Tzaras
efca781f7f
tests/integration: Fix whitespace
...
Remove all tabs in favour of spaces and align function arguments.
2022-11-09 11:54:06 +01:00
Evangelos Ribeiro Tzaras
15d33f4f85
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.
2022-11-09 11:50:10 +01:00
Guido Gunther
4d95249bdd
Merge branch 'misc_cleanups' into 'main'
...
Misc cleanup and ease running feedbackd under gdb
See merge request Librem5/feedbackd!81
2022-11-04 08:05:16 +00:00
Evangelos Ribeiro Tzaras
99fc8c2165
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.
2022-11-03 19:44:07 +01:00
Evangelos Ribeiro Tzaras
94001bba78
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.
2022-11-03 19:31:57 +01:00
Guido Gunther
1dc58eb99f
Merge branch 'cleanups' into 'main'
...
Some cleanups I noticed while looking at the code
See merge request Librem5/feedbackd!79
2022-10-12 08:25:29 +00:00
Guido Günther
437d8290bf
tests/integration: Check the state of the ended event
2022-10-12 10:19:03 +02:00
Guido Günther
e782032efd
tests: Drop unused variable
2022-10-12 10:19:03 +02:00
Guido Günther
14f99d6e67
lfb-event: Untabify
2022-10-12 10:19:03 +02:00
Guido Günther
dafb18678b
Use g_error() when library is not initalized
...
This makes sure it still works when asserts are disabled.
2022-10-12 10:19:03 +02:00
Guido Günther
8df5d1606e
lfb-event: Use consistent prefix
...
Make async data use the same prefix.
2022-10-12 10:18:59 +02:00
Guido Günther
c659f0adb5
lfb-event: Fix typo
...
It's LfbEvent
2022-10-12 10:13:08 +02:00
Evangelos Ribeiro Tzaras
7391062b87
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 suprising behaviour in code
like this:
static void
on_event_triggered (LfbEvent *event,
GAsyncResult *res,
CallsRinger *self)
{
g_autoptr (GError) err = NULL;
gboolean ok;
g_return_if_fail (LFB_IS_EVENT (event));
ok = lfb_event_trigger_feedback_finish (event, res, &err);
if (ok) {
LfbEventState state = lfb_event_get_state (event);
/* do something with state */
}
}
In this case `state` would return a stale value that's about to get
changed. Instead it would be better to *first* change the state and only
afterwards complete the GTask.
This also makes the sync and async variants consistent in terms of when
they change the event state.
Closes : #59
2022-10-11 12:32:43 +02:00
Evangelos Ribeiro Tzaras
21399aec6e
test-lfb-integration: Test event state in async callback
2022-10-11 12:32:26 +02:00
Evangelos Ribeiro Tzaras
ad7aa5d1b0
lfb-event: Fix SPDX identifier
...
The library is LGPL-2.1+, not GPL-3.0+
2022-09-24 12:08:19 +02:00