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.
This commit is contained in:
Marco Trevisan (Treviño) 2019-12-16 19:44:17 +01:00
parent 2af0531994
commit 68b5c5d98f
2 changed files with 3 additions and 3 deletions

View file

@ -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,

View file

@ -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,