From 68b5c5d98f07312ca5b417e8b1872ad7be3c05fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 16 Dec 2019 19:44:17 +0100 Subject: [PATCH] fpi-ssm, fpi-usb-transfer: Use fwd-declarations to avoid headers dependencies Don't make headers inclusions dependent on each others, given that FpiSsm depends on FpiUsbTransfer and vice-versa, so fix the dependency cycle by using forwarded declarations. --- libfprint/fpi-ssm.h | 3 ++- libfprint/fpi-usb-transfer.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libfprint/fpi-ssm.h b/libfprint/fpi-ssm.h index fe64946..0e18ab6 100644 --- a/libfprint/fpi-ssm.h +++ b/libfprint/fpi-ssm.h @@ -22,7 +22,6 @@ #pragma once #include "fp-device.h" -#include "fpi-usb-transfer.h" /* async drv <--> lib comms */ @@ -101,6 +100,8 @@ int fpi_ssm_get_cur_state (FpiSsm *machine); /* Callbacks to be used by the driver instead of implementing their own * logic. */ +typedef struct _FpiUsbTransfer FpiUsbTransfer; + void fpi_ssm_usb_transfer_cb (FpiUsbTransfer *transfer, FpDevice *device, gpointer unused_data, diff --git a/libfprint/fpi-usb-transfer.h b/libfprint/fpi-usb-transfer.h index 5b8fe9c..09d22e8 100644 --- a/libfprint/fpi-usb-transfer.h +++ b/libfprint/fpi-usb-transfer.h @@ -30,8 +30,7 @@ G_BEGIN_DECLS #define FPI_USB_ENDPOINT_OUT 0x00 typedef struct _FpiUsbTransfer FpiUsbTransfer; - -#include "fpi-ssm.h" +typedef struct _FpiSsm FpiSsm; typedef void (*FpiUsbTransferCallback)(FpiUsbTransfer *transfer, FpDevice *dev,