mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 18:38:07 +00:00
tod: Add support for device features, keeping ABI compatibility
This commit is contained in:
@@ -139,7 +139,6 @@ struct _FpDeviceClass
|
|||||||
const gchar *full_name;
|
const gchar *full_name;
|
||||||
FpDeviceType type;
|
FpDeviceType type;
|
||||||
const FpIdEntry *id_table;
|
const FpIdEntry *id_table;
|
||||||
FpDeviceFeature features;
|
|
||||||
|
|
||||||
/* Defaults for device properties */
|
/* Defaults for device properties */
|
||||||
gint nr_enroll_stages;
|
gint nr_enroll_stages;
|
||||||
@@ -159,9 +158,12 @@ struct _FpDeviceClass
|
|||||||
|
|
||||||
void (*cancel) (FpDevice *device);
|
void (*cancel) (FpDevice *device);
|
||||||
|
|
||||||
|
/* Class elements added after tod-v1 */
|
||||||
|
FpDeviceFeature features;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
/* padding for future expansion */
|
/* padding for future expansion */
|
||||||
gpointer _padding_dummy[32];
|
gpointer _padding_dummy[31];
|
||||||
};
|
};
|
||||||
|
|
||||||
void fpi_device_class_auto_initialize_features (FpDeviceClass *device_class);
|
void fpi_device_class_auto_initialize_features (FpDeviceClass *device_class);
|
||||||
|
|||||||
@@ -127,6 +127,12 @@ fpi_tod_shared_drivers_register (void)
|
|||||||
fp_dbg ("Loading driver %s (%s)", cls->id, cls->full_name);
|
fp_dbg ("Loading driver %s (%s)", cls->id, cls->full_name);
|
||||||
g_array_append_val (shared_drivers, driver);
|
g_array_append_val (shared_drivers, driver);
|
||||||
|
|
||||||
|
if (cls->features == FP_DEVICE_FEATURE_NONE)
|
||||||
|
{
|
||||||
|
g_debug ("Initializing features for driver %s", cls->id);
|
||||||
|
fpi_device_class_auto_initialize_features (cls);
|
||||||
|
}
|
||||||
|
|
||||||
shared_modules = g_list_prepend (shared_modules,
|
shared_modules = g_list_prepend (shared_modules,
|
||||||
g_steal_pointer (&module));
|
g_steal_pointer (&module));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user