Commit af42db88 authored by Bastien Nocera's avatar Bastien Nocera Committed by Daniel Drake
Browse files

Add DeleteEnrolledFingers

To delete all the enrolled finger prints for a particular user.
We can already overwrite existing enrolled fingerprints, and there's
not really any point in dismissing just one fingerprint.
parent 45dc821b
......@@ -53,6 +53,8 @@ static gboolean fprint_device_set_storage_type(FprintDevice *rdev,
gint type);
static void fprint_device_list_enrolled_fingers(FprintDevice *rdev,
DBusGMethodInvocation *context);
static void fprint_device_delete_enrolled_fingers(FprintDevice *rdev,
DBusGMethodInvocation *context);
#include "device-dbus-glue.h"
......@@ -700,3 +702,27 @@ static void fprint_device_list_enrolled_fingers(FprintDevice *rdev,
dbus_g_method_return(context, ret);
}
static void fprint_device_delete_enrolled_fingers(FprintDevice *rdev,
DBusGMethodInvocation *context)
{
FprintDevicePrivate *priv = DEVICE_GET_PRIVATE(rdev);
GError *error = NULL;
guint i;
if (_fprint_device_check_claimed(rdev, context, &error) == FALSE) {
dbus_g_method_return_error (context, error);
return;
}
if (_fprint_device_check_polkit_for_action (rdev, context, "net.reactivated.fprint.device.verify", &error) == FALSE) {
dbus_g_method_return_error (context, error);
return;
}
for (i = LEFT_THUMB; i <= RIGHT_LITTLE; i++) {
storages[priv->storage_type].print_data_delete(priv->dev, i, priv->username);
}
dbus_g_method_return(context);
}
......@@ -17,6 +17,10 @@
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
</method>
<method name="DeleteEnrolledFingers">
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
</method>
<method name="VerifyStart">
<arg type="u" name="print_id" direction="in" />
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment