print: Add helpers to generate a unique print ID containing metadata

It makes sense to include this functionality in the core library as more
than one driver will be using it soon.
This commit is contained in:
Benjamin Berg
2020-04-20 16:38:39 +02:00
parent 5c5a4f6907
commit 0274d0783b
3 changed files with 119 additions and 0 deletions

View File

@@ -47,4 +47,9 @@ FpiMatchResult fpi_print_bz3_match (FpPrint * template,
gint bz3_threshold,
GError **error);
/* Helpers to encode metadata into user ID strings. */
gchar * fpi_print_generate_user_id (FpPrint *print);
gboolean fpi_print_fill_from_user_id (FpPrint *print,
const char *user_id);
G_END_DECLS