xref: /qemu/include/qemu/typedefs.h (revision 7c1f51bf)
1 #ifndef QEMU_TYPEDEFS_H
2 #define QEMU_TYPEDEFS_H
3 
4 /*
5  * This header is for selectively avoiding #include just to get a
6  * typedef name.
7  *
8  * Declaring a typedef name in its "obvious" place can result in
9  * inclusion cycles, in particular for complete struct and union
10  * types that need more types for their members.  It can also result
11  * in headers pulling in many more headers, slowing down builds.
12  *
13  * You can break such cycles and unwanted dependencies by declaring
14  * the typedef name here.
15  *
16  * For struct types used in only a few headers, judicious use of the
17  * struct tag instead of the typedef name is commonly preferable.
18  */
19 
20 /*
21  * Incomplete struct types
22  * Please keep this list in case-insensitive alphabetical order.
23  */
24 typedef struct AccelState AccelState;
25 typedef struct AdapterInfo AdapterInfo;
26 typedef struct AddressSpace AddressSpace;
27 typedef struct AioContext AioContext;
28 typedef struct Aml Aml;
29 typedef struct AnnounceTimer AnnounceTimer;
30 typedef struct ArchCPU ArchCPU;
31 typedef struct BdrvDirtyBitmap BdrvDirtyBitmap;
32 typedef struct BdrvDirtyBitmapIter BdrvDirtyBitmapIter;
33 typedef struct BlockBackend BlockBackend;
34 typedef struct BlockBackendRootState BlockBackendRootState;
35 typedef struct BlockDriverState BlockDriverState;
36 typedef struct BusClass BusClass;
37 typedef struct BusState BusState;
38 typedef struct Chardev Chardev;
39 typedef struct Clock Clock;
40 typedef struct CompatProperty CompatProperty;
41 typedef struct ConfidentialGuestSupport ConfidentialGuestSupport;
42 typedef struct CPUAddressSpace CPUAddressSpace;
43 typedef struct CPUArchState CPUArchState;
44 typedef struct CpuInfoFast CpuInfoFast;
45 typedef struct CPUJumpCache CPUJumpCache;
46 typedef struct CPUState CPUState;
47 typedef struct CPUTLBEntryFull CPUTLBEntryFull;
48 typedef struct DeviceListener DeviceListener;
49 typedef struct DeviceState DeviceState;
50 typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot;
51 typedef struct DisplayChangeListener DisplayChangeListener;
52 typedef struct DriveInfo DriveInfo;
53 typedef struct DumpState DumpState;
54 typedef struct Error Error;
55 typedef struct EventNotifier EventNotifier;
56 typedef struct FlatView FlatView;
57 typedef struct FWCfgEntry FWCfgEntry;
58 typedef struct FWCfgIoState FWCfgIoState;
59 typedef struct FWCfgMemState FWCfgMemState;
60 typedef struct FWCfgState FWCfgState;
61 typedef struct GraphicHwOps GraphicHwOps;
62 typedef struct HostMemoryBackend HostMemoryBackend;
63 typedef struct I2CBus I2CBus;
64 typedef struct I2SCodec I2SCodec;
65 typedef struct IOMMUMemoryRegion IOMMUMemoryRegion;
66 typedef struct ISABus ISABus;
67 typedef struct ISADevice ISADevice;
68 typedef struct IsaDma IsaDma;
69 typedef struct JSONWriter JSONWriter;
70 typedef struct MACAddr MACAddr;
71 typedef struct MachineClass MachineClass;
72 typedef struct MachineState MachineState;
73 typedef struct MemoryListener MemoryListener;
74 typedef struct MemoryMappingList MemoryMappingList;
75 typedef struct MemoryRegion MemoryRegion;
76 typedef struct MemoryRegionCache MemoryRegionCache;
77 typedef struct MemoryRegionSection MemoryRegionSection;
78 typedef struct MigrationIncomingState MigrationIncomingState;
79 typedef struct MigrationState MigrationState;
80 typedef struct Monitor Monitor;
81 typedef struct MonitorDef MonitorDef;
82 typedef struct MSIMessage MSIMessage;
83 typedef struct NetClientState NetClientState;
84 typedef struct NetFilterState NetFilterState;
85 typedef struct NICInfo NICInfo;
86 typedef struct NodeInfo NodeInfo;
87 typedef struct NumaNodeMem NumaNodeMem;
88 typedef struct Object Object;
89 typedef struct ObjectClass ObjectClass;
90 typedef struct PCIBridge PCIBridge;
91 typedef struct PCIBus PCIBus;
92 typedef struct PCIDevice PCIDevice;
93 typedef struct PCIEAERErr PCIEAERErr;
94 typedef struct PCIEAERLog PCIEAERLog;
95 typedef struct PCIEAERMsg PCIEAERMsg;
96 typedef struct PCIEPort PCIEPort;
97 typedef struct PCIESlot PCIESlot;
98 typedef struct PCIESriovPF PCIESriovPF;
99 typedef struct PCIESriovVF PCIESriovVF;
100 typedef struct PCIExpressDevice PCIExpressDevice;
101 typedef struct PCIExpressHost PCIExpressHost;
102 typedef struct PCIHostDeviceAddress PCIHostDeviceAddress;
103 typedef struct PCIHostState PCIHostState;
104 typedef struct PICCommonState PICCommonState;
105 typedef struct PostcopyDiscardState PostcopyDiscardState;
106 typedef struct Property Property;
107 typedef struct PropertyInfo PropertyInfo;
108 typedef struct QBool QBool;
109 typedef struct QDict QDict;
110 typedef struct QEMUBH QEMUBH;
111 typedef struct QemuConsole QemuConsole;
112 typedef struct QEMUCursor QEMUCursor;
113 typedef struct QEMUFile QEMUFile;
114 typedef struct QemuLockable QemuLockable;
115 typedef struct QemuMutex QemuMutex;
116 typedef struct QemuOpt QemuOpt;
117 typedef struct QemuOpts QemuOpts;
118 typedef struct QemuOptsList QemuOptsList;
119 typedef struct QEMUSGList QEMUSGList;
120 typedef struct QemuSpin QemuSpin;
121 typedef struct QEMUTimer QEMUTimer;
122 typedef struct QEMUTimerListGroup QEMUTimerListGroup;
123 typedef struct QList QList;
124 typedef struct QNull QNull;
125 typedef struct QNum QNum;
126 typedef struct QObject QObject;
127 typedef struct QString QString;
128 typedef struct RAMBlock RAMBlock;
129 typedef struct Range Range;
130 typedef struct ReservedRegion ReservedRegion;
131 typedef struct SavedIOTLB SavedIOTLB;
132 typedef struct SHPCDevice SHPCDevice;
133 typedef struct SSIBus SSIBus;
134 typedef struct TranslationBlock TranslationBlock;
135 typedef struct VirtIODevice VirtIODevice;
136 typedef struct Visitor Visitor;
137 typedef struct VMChangeStateEntry VMChangeStateEntry;
138 typedef struct VMStateDescription VMStateDescription;
139 
140 /*
141  * Pointer types
142  * Such typedefs should be limited to cases where the typedef's users
143  * are oblivious of its "pointer-ness".
144  * Please keep this list in case-insensitive alphabetical order.
145  */
146 typedef struct IRQState *qemu_irq;
147 
148 /*
149  * Function types
150  */
151 typedef void SaveStateHandler(QEMUFile *f, void *opaque);
152 typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
153 typedef void (*qemu_irq_handler)(void *opaque, int n, int level);
154 
155 #endif /* QEMU_TYPEDEFS_H */
156