mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-28 22:10:33 +00:00
qom: make interface types abstract
Interfaces don't have instance, let's make the interface type really abstract to avoid confusion. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20181204142023.15982-3-marcandre.lureau@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
ef24052386
commit
aa1b35b975
@ -25,11 +25,7 @@ typedef enum {
|
|||||||
INTERFACE_CHECK(AcpiDeviceIf, (obj), \
|
INTERFACE_CHECK(AcpiDeviceIf, (obj), \
|
||||||
TYPE_ACPI_DEVICE_IF)
|
TYPE_ACPI_DEVICE_IF)
|
||||||
|
|
||||||
|
typedef struct AcpiDeviceIf AcpiDeviceIf;
|
||||||
typedef struct AcpiDeviceIf {
|
|
||||||
/* <private> */
|
|
||||||
Object Parent;
|
|
||||||
} AcpiDeviceIf;
|
|
||||||
|
|
||||||
void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
|
void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
|
||||||
|
|
||||||
|
@ -16,10 +16,7 @@
|
|||||||
#define ARM_LINUX_BOOT_IF(obj) \
|
#define ARM_LINUX_BOOT_IF(obj) \
|
||||||
INTERFACE_CHECK(ARMLinuxBootIf, (obj), TYPE_ARM_LINUX_BOOT_IF)
|
INTERFACE_CHECK(ARMLinuxBootIf, (obj), TYPE_ARM_LINUX_BOOT_IF)
|
||||||
|
|
||||||
typedef struct ARMLinuxBootIf {
|
typedef struct ARMLinuxBootIf ARMLinuxBootIf;
|
||||||
/*< private >*/
|
|
||||||
Object parent_obj;
|
|
||||||
} ARMLinuxBootIf;
|
|
||||||
|
|
||||||
typedef struct ARMLinuxBootIfClass {
|
typedef struct ARMLinuxBootIfClass {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
@ -30,9 +30,7 @@
|
|||||||
#define FW_PATH_PROVIDER(obj) \
|
#define FW_PATH_PROVIDER(obj) \
|
||||||
INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER)
|
INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER)
|
||||||
|
|
||||||
typedef struct FWPathProvider {
|
typedef struct FWPathProvider FWPathProvider;
|
||||||
Object parent_obj;
|
|
||||||
} FWPathProvider;
|
|
||||||
|
|
||||||
typedef struct FWPathProviderClass {
|
typedef struct FWPathProviderClass {
|
||||||
InterfaceClass parent_class;
|
InterfaceClass parent_class;
|
||||||
|
@ -23,11 +23,7 @@
|
|||||||
#define HOTPLUG_HANDLER(obj) \
|
#define HOTPLUG_HANDLER(obj) \
|
||||||
INTERFACE_CHECK(HotplugHandler, (obj), TYPE_HOTPLUG_HANDLER)
|
INTERFACE_CHECK(HotplugHandler, (obj), TYPE_HOTPLUG_HANDLER)
|
||||||
|
|
||||||
|
typedef struct HotplugHandler HotplugHandler;
|
||||||
typedef struct HotplugHandler {
|
|
||||||
/* <private> */
|
|
||||||
Object Parent;
|
|
||||||
} HotplugHandler;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hotplug_fn:
|
* hotplug_fn:
|
||||||
|
@ -15,9 +15,7 @@
|
|||||||
INTERFACE_CHECK(InterruptStatsProvider, (obj), \
|
INTERFACE_CHECK(InterruptStatsProvider, (obj), \
|
||||||
TYPE_INTERRUPT_STATS_PROVIDER)
|
TYPE_INTERRUPT_STATS_PROVIDER)
|
||||||
|
|
||||||
typedef struct InterruptStatsProvider {
|
typedef struct InterruptStatsProvider InterruptStatsProvider;
|
||||||
Object parent;
|
|
||||||
} InterruptStatsProvider;
|
|
||||||
|
|
||||||
typedef struct InterruptStatsProviderClass {
|
typedef struct InterruptStatsProviderClass {
|
||||||
InterfaceClass parent;
|
InterfaceClass parent;
|
||||||
|
@ -114,9 +114,7 @@ uint32_t ipmi_next_uuid(void);
|
|||||||
#define IPMI_INTERFACE_GET_CLASS(class) \
|
#define IPMI_INTERFACE_GET_CLASS(class) \
|
||||||
OBJECT_GET_CLASS(IPMIInterfaceClass, (class), TYPE_IPMI_INTERFACE)
|
OBJECT_GET_CLASS(IPMIInterfaceClass, (class), TYPE_IPMI_INTERFACE)
|
||||||
|
|
||||||
typedef struct IPMIInterface {
|
typedef struct IPMIInterface IPMIInterface;
|
||||||
Object parent;
|
|
||||||
} IPMIInterface;
|
|
||||||
|
|
||||||
typedef struct IPMIInterfaceClass {
|
typedef struct IPMIInterfaceClass {
|
||||||
InterfaceClass parent;
|
InterfaceClass parent;
|
||||||
|
@ -43,10 +43,6 @@ static inline uint16_t applesmc_port(void)
|
|||||||
#define ISADMA(obj) \
|
#define ISADMA(obj) \
|
||||||
INTERFACE_CHECK(IsaDma, (obj), TYPE_ISADMA)
|
INTERFACE_CHECK(IsaDma, (obj), TYPE_ISADMA)
|
||||||
|
|
||||||
struct IsaDma {
|
|
||||||
Object parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ISADMA_TRANSFER_VERIFY,
|
ISADMA_TRANSFER_VERIFY,
|
||||||
ISADMA_TRANSFER_READ,
|
ISADMA_TRANSFER_READ,
|
||||||
|
@ -25,9 +25,7 @@
|
|||||||
#define MEMORY_DEVICE(obj) \
|
#define MEMORY_DEVICE(obj) \
|
||||||
INTERFACE_CHECK(MemoryDeviceState, (obj), TYPE_MEMORY_DEVICE)
|
INTERFACE_CHECK(MemoryDeviceState, (obj), TYPE_MEMORY_DEVICE)
|
||||||
|
|
||||||
typedef struct MemoryDeviceState {
|
typedef struct MemoryDeviceState MemoryDeviceState;
|
||||||
Object parent_obj;
|
|
||||||
} MemoryDeviceState;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MemoryDeviceClass:
|
* MemoryDeviceClass:
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
#define NMI(obj) \
|
#define NMI(obj) \
|
||||||
INTERFACE_CHECK(NMI, (obj), TYPE_NMI)
|
INTERFACE_CHECK(NMI, (obj), TYPE_NMI)
|
||||||
|
|
||||||
typedef struct NMIState {
|
typedef struct NMIState NMIState;
|
||||||
Object parent_obj;
|
|
||||||
} NMIState;
|
|
||||||
|
|
||||||
typedef struct NMIClass {
|
typedef struct NMIClass {
|
||||||
InterfaceClass parent_class;
|
InterfaceClass parent_class;
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
#define STREAM_SLAVE(obj) \
|
#define STREAM_SLAVE(obj) \
|
||||||
INTERFACE_CHECK(StreamSlave, (obj), TYPE_STREAM_SLAVE)
|
INTERFACE_CHECK(StreamSlave, (obj), TYPE_STREAM_SLAVE)
|
||||||
|
|
||||||
typedef struct StreamSlave {
|
typedef struct StreamSlave StreamSlave;
|
||||||
Object Parent;
|
|
||||||
} StreamSlave;
|
|
||||||
|
|
||||||
typedef void (*StreamCanPushNotifyFn)(void *opaque);
|
typedef void (*StreamCanPushNotifyFn)(void *opaque);
|
||||||
|
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
#define NVRAM(obj) \
|
#define NVRAM(obj) \
|
||||||
INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
|
INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
|
||||||
|
|
||||||
typedef struct Nvram {
|
typedef struct Nvram Nvram;
|
||||||
Object parent;
|
|
||||||
} Nvram;
|
|
||||||
|
|
||||||
typedef struct NvramClass {
|
typedef struct NvramClass {
|
||||||
InterfaceClass parent;
|
InterfaceClass parent;
|
||||||
|
@ -16,11 +16,7 @@
|
|||||||
INTERFACE_CHECK(UserCreatable, (obj), \
|
INTERFACE_CHECK(UserCreatable, (obj), \
|
||||||
TYPE_USER_CREATABLE)
|
TYPE_USER_CREATABLE)
|
||||||
|
|
||||||
|
typedef struct UserCreatable UserCreatable;
|
||||||
typedef struct UserCreatable {
|
|
||||||
/* <private> */
|
|
||||||
Object Parent;
|
|
||||||
} UserCreatable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UserCreatableClass:
|
* UserCreatableClass:
|
||||||
|
@ -33,9 +33,7 @@ typedef enum TPMVersion {
|
|||||||
#define TPM_IF(obj) \
|
#define TPM_IF(obj) \
|
||||||
INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
|
INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
|
||||||
|
|
||||||
typedef struct TPMIf {
|
typedef struct TPMIf TPMIf;
|
||||||
Object parent_obj;
|
|
||||||
} TPMIf;
|
|
||||||
|
|
||||||
typedef struct TPMIfClass {
|
typedef struct TPMIfClass {
|
||||||
InterfaceClass parent_class;
|
InterfaceClass parent_class;
|
||||||
|
@ -38,9 +38,7 @@
|
|||||||
#define IDAU_INTERFACE_GET_CLASS(obj) \
|
#define IDAU_INTERFACE_GET_CLASS(obj) \
|
||||||
OBJECT_GET_CLASS(IDAUInterfaceClass, (obj), TYPE_IDAU_INTERFACE)
|
OBJECT_GET_CLASS(IDAUInterfaceClass, (obj), TYPE_IDAU_INTERFACE)
|
||||||
|
|
||||||
typedef struct IDAUInterface {
|
typedef struct IDAUInterface IDAUInterface;
|
||||||
Object parent;
|
|
||||||
} IDAUInterface;
|
|
||||||
|
|
||||||
#define IREGION_NOTVALID -1
|
#define IREGION_NOTVALID -1
|
||||||
|
|
||||||
|
@ -23,9 +23,7 @@
|
|||||||
#define TEST_IF(obj) \
|
#define TEST_IF(obj) \
|
||||||
INTERFACE_CHECK(TestIf, (obj), TYPE_TEST_IF)
|
INTERFACE_CHECK(TestIf, (obj), TYPE_TEST_IF)
|
||||||
|
|
||||||
typedef struct TestIf {
|
typedef struct TestIf TestIf;
|
||||||
Object parent_obj;
|
|
||||||
} TestIf;
|
|
||||||
|
|
||||||
typedef struct TestIfClass {
|
typedef struct TestIfClass {
|
||||||
InterfaceClass parent_class;
|
InterfaceClass parent_class;
|
||||||
|
Loading…
Reference in New Issue
Block a user