From 4a8ab83a1305437845b242152315d9a95135e688 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 14 May 2020 18:59:59 +0200
Subject: [PATCH] print: Add an SDCP print type

For now it is identical to a RAW print. However, this is likely to
change in the future.
---
 libfprint/fp-print.c  | 4 ++--
 libfprint/fpi-print.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c
index c8a1b07..1cad93f 100644
--- a/libfprint/fp-print.c
+++ b/libfprint/fp-print.c
@@ -582,7 +582,7 @@ fp_print_equal (FpPrint *self, FpPrint *other)
   if (g_strcmp0 (self->device_id, other->device_id))
     return FALSE;
 
-  if (self->type == FPI_PRINT_RAW)
+  if (self->type == FPI_PRINT_RAW || self->type == FPI_PRINT_SDCP)
     {
       return g_variant_equal (self->data, other->data);
     }
@@ -847,7 +847,7 @@ fp_print_deserialize (const guchar *data,
           g_ptr_array_add (result->prints, g_steal_pointer (&xyt));
         }
     }
-  else if (type == FPI_PRINT_RAW)
+  else if (type == FPI_PRINT_RAW || type == FPI_PRINT_SDCP)
     {
       g_autoptr(GVariant) fp_data = g_variant_get_child_value (print_data, 0);
 
diff --git a/libfprint/fpi-print.h b/libfprint/fpi-print.h
index fb38809..61eef30 100644
--- a/libfprint/fpi-print.h
+++ b/libfprint/fpi-print.h
@@ -11,11 +11,13 @@ G_BEGIN_DECLS
  * @FPI_PRINT_UNDEFINED: Undefined type, this happens prior to enrollment
  * @FPI_PRINT_RAW: A raw print where the data is directly compared
  * @FPI_PRINT_NBIS: NBIS minutiae comparison
+ * @FPI_PRINT_SDCP: Print from an SDCP conforming device
  */
 typedef enum {
   FPI_PRINT_UNDEFINED = 0,
   FPI_PRINT_RAW,
   FPI_PRINT_NBIS,
+  FPI_PRINT_SDCP,
 } FpiPrintType;
 
 /**