mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
Add device name property
Add GetProperties method, with a single "Name" properties into the hashtable. Use the device name property in the PAM module, and in the list test.
This commit is contained in:
committed by
Daniel Drake
parent
69c131f723
commit
924e08d2e8
22
src/device.c
22
src/device.c
@ -54,6 +54,9 @@ static void fprint_device_list_enrolled_fingers(FprintDevice *rdev,
|
||||
static void fprint_device_delete_enrolled_fingers(FprintDevice *rdev,
|
||||
const char *username,
|
||||
DBusGMethodInvocation *context);
|
||||
static void fprint_device_get_properties (FprintDevice *rdev,
|
||||
GHashTable **props,
|
||||
DBusGMethodInvocation *context);
|
||||
|
||||
#include "device-dbus-glue.h"
|
||||
|
||||
@ -1034,3 +1037,22 @@ static void fprint_device_delete_enrolled_fingers(FprintDevice *rdev,
|
||||
dbus_g_method_return(context);
|
||||
}
|
||||
|
||||
static void
|
||||
fprint_device_get_properties (FprintDevice *rdev,
|
||||
GHashTable **props,
|
||||
DBusGMethodInvocation *context)
|
||||
{
|
||||
FprintDevicePrivate *priv = DEVICE_GET_PRIVATE(rdev);
|
||||
GHashTable *table;
|
||||
struct fp_driver *driver;
|
||||
const char *driver_name;
|
||||
|
||||
table = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
|
||||
|
||||
driver = fp_dscv_dev_get_driver (priv->ddev);
|
||||
driver_name = fp_driver_get_full_name (driver);
|
||||
g_hash_table_insert (table, "Name", g_strdup (driver_name));
|
||||
|
||||
*props = table;
|
||||
}
|
||||
|
||||
|
||||
@ -54,6 +54,10 @@
|
||||
<arg type="i" name="result" />
|
||||
</signal>
|
||||
|
||||
<method name="GetProperties">
|
||||
<arg type="a{ss}" name="properties" direction="out" />
|
||||
</method>
|
||||
|
||||
</interface>
|
||||
</node>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user