Blob Blame History Raw
From 106cfd6615bedebdfab573bea6f0a8df5e02c499 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Mon, 16 Dec 2019 20:37:15 +0100
Subject: [PATCH 145/181] cleanup: Remove fp_internal.h and update
 drivers_api.h

Remove the uneeded internal API, as we can now include each header directly
if needed, while move the assembling stuff to the drivers API.
---
 doc/meson.build            |  1 -
 libfprint/drivers/aeslib.c |  4 +---
 libfprint/drivers_api.h    | 12 ++++++------
 libfprint/fp_internal.h    | 25 -------------------------
 libfprint/fpi-assembling.c |  3 ++-
 5 files changed, 9 insertions(+), 36 deletions(-)
 delete mode 100644 libfprint/fp_internal.h

diff --git a/doc/meson.build b/doc/meson.build
index 2c7a384..e138ea2 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -4,7 +4,6 @@ private_headers = [
     'config.h',
     'nbis-helpers.h',
     'fprint.h',
-    'fp_internal.h',
 
     # Subdirectories to ignore
     'drivers',
diff --git a/libfprint/drivers/aeslib.c b/libfprint/drivers/aeslib.c
index 4839c62..de56c6b 100644
--- a/libfprint/drivers/aeslib.c
+++ b/libfprint/drivers/aeslib.c
@@ -19,13 +19,11 @@
 
 #define FP_COMPONENT "aeslib"
 
-#include "fp_internal.h"
+#include "drivers_api.h"
 
 #include <errno.h>
 #include <string.h>
 
-#include "fpi-usb-transfer.h"
-#include "fpi-assembling.h"
 #include "aeslib.h"
 
 #define MAX_REGWRITES_PER_REQUEST 16
diff --git a/libfprint/drivers_api.h b/libfprint/drivers_api.h
index bb401cd..e8ed900 100644
--- a/libfprint/drivers_api.h
+++ b/libfprint/drivers_api.h
@@ -2,6 +2,7 @@
  * Driver API definitions
  * Copyright (C) 2007-2008 Daniel Drake <dsd@gentoo.org>
  * Copyright (C) 2018 Bastien Nocera <hadess@hadess.net>
+ * Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -21,14 +22,13 @@
 #ifndef __DRIVERS_API_H__
 #define __DRIVERS_API_H__
 
-#include <config.h>
-
-#include "fp_internal.h"
-
+#include "fpi-assembling.h"
+#include "fpi-device.h"
+#include "fpi-image-device.h"
+#include "fpi-image.h"
 #include "fpi-log.h"
+#include "fpi-print.h"
 #include "fpi-usb-transfer.h"
 #include "fpi-ssm.h"
-#include "fpi-assembling.h"
-#include "fpi-image-device.h"
 
 #endif
diff --git a/libfprint/fp_internal.h b/libfprint/fp_internal.h
deleted file mode 100644
index 56ada18..0000000
--- a/libfprint/fp_internal.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Internal/private definitions for libfprint
- * Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#pragma once
-
-#include "fpi-log.h"
-#include "fpi-image.h"
-#include "fpi-image-device.h"
-#include "fpi-minutiae.h"
diff --git a/libfprint/fpi-assembling.c b/libfprint/fpi-assembling.c
index fef08f0..2b55ee3 100644
--- a/libfprint/fpi-assembling.c
+++ b/libfprint/fpi-assembling.c
@@ -21,7 +21,8 @@
 
 #define FP_COMPONENT "assembling"
 
-#include "fp_internal.h"
+#include "fpi-log.h"
+#include "fpi-image.h"
 
 #include <string.h>
 
-- 
2.24.1