Add a done argument to result signals

For verify and enroll, add a done argument so that front-end
know easily when they should be closing the device.
This commit is contained in:
Bastien Nocera
2008-11-21 10:26:06 +00:00
committed by Daniel Drake
parent 0636c77962
commit 26aab5dc28
8 changed files with 39 additions and 22 deletions

View File

@ -254,15 +254,13 @@ typedef struct {
char *driver;
} verify_data;
static void verify_result(GObject *object, const char *result, gpointer user_data)
static void verify_result(GObject *object, const char *result, gboolean done, gpointer user_data)
{
verify_data *data = user_data;
const char *msg;
D(g_message("Verify result: %s\n", result));
if (g_str_equal (result, "verify-no-match") ||
g_str_equal (result, "verify-match") ||
g_str_equal (result, "verify-unknown-error")) {
if (done != FALSE) {
data->result = g_strdup (result);
g_main_loop_quit (data->loop);
return;