fprintd: Use GDBus codegen based implementation

Fprintd is dependent on the deprecated dbus-glib, also this doesn't provide
various features we can take advantage of, like the ones for async
authentication mechanism.

So, remove all the dbus-glib dependencies and simplify the code, but without
any further refactor, and keeping everything as it used to work, while this
will give room for further improvements in subsequent commits.

Internally, we just use dbus-codegen to generate the skeletons, and we
use the generated FprintdDBusManager with composition, while we
implement the device skeleton interface in FprintDevice, so that we
don't have to use it as a proxy, and keep being closer to what it used
to be with dbus-glib.

Fixes: #61
This commit is contained in:
Marco Trevisan (Treviño)
2020-02-03 20:29:56 +01:00
committed by Benjamin Berg
parent e224913b80
commit 93bad82540
15 changed files with 750 additions and 588 deletions

View File

@ -12,9 +12,6 @@
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<interface name="net.reactivated.Fprint.Device">
<annotation name="org.freedesktop.DBus.GLib.CSymbol"
value="fprint_device" />
<doc:doc>
<doc:title id="polkit-integration">
PolicyKit integration
@ -282,8 +279,6 @@
<arg type="as" name="enrolled_fingers" direction="out">
<doc:doc><doc:summary>An array of strings representing the enrolled fingerprints. See <doc:ref type="description" to="fingerprint-names">Fingerprint names</doc:ref>.</doc:summary></doc:doc>
</arg>
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -304,8 +299,6 @@
<arg type="s" name="username" direction="in">
<doc:doc><doc:summary>The username for whom to delete the enrolled fingerprints. See <doc:ref type="description" to="usernames">Usernames</doc:ref>.</doc:summary></doc:doc>
</arg>
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -327,8 +320,6 @@
<!-- ************************************************************ -->
<method name="DeleteEnrolledFingers2">
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -348,8 +339,6 @@
<arg type="s" name="username" direction="in">
<doc:doc><doc:summary>The username for whom to claim the device. See <doc:ref type="description" to="usernames">Usernames</doc:ref>.</doc:summary></doc:doc>
</arg>
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -368,8 +357,6 @@
<!-- ************************************************************ -->
<method name="Release">
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -390,8 +377,6 @@
<arg type="s" name="finger_name" direction="in">
<doc:doc><doc:summary>A string representing the finger to verify. See <doc:ref type="description" to="fingerprint-names">Fingerprint names</doc:ref>.</doc:summary></doc:doc>
</arg>
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -415,8 +400,6 @@
<!-- ************************************************************ -->
<method name="VerifyStop">
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -486,8 +469,6 @@
<doc:ref type="description" to="fingerprint-names">Fingerprint names</doc:ref>.
Note that "any" is not a valid finger name for this method.</doc:summary></doc:doc>
</arg>
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>
@ -511,8 +492,6 @@
<!-- ************************************************************ -->
<method name="EnrollStop">
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
<doc:doc>
<doc:description>
<doc:para>