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.
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
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
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.
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.