xref: /qemu/include/qemu/typedefs.h (revision 98c7362b1efe651327385a25874a73e008c6549e)
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 AccelCPUState AccelCPUState;
25 typedef struct AccelOpsClass AccelOpsClass;
26 typedef struct AccelState AccelState;
27 typedef struct AddressSpace AddressSpace;
28 typedef struct AioContext AioContext;
29 typedef struct Aml Aml;
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 ConfidentialGuestSupport ConfidentialGuestSupport;
41 typedef struct CPUArchState CPUArchState;
42 typedef struct CPUPluginState CPUPluginState;
43 typedef struct CPUState CPUState;
44 typedef struct CPUTLBEntryFull CPUTLBEntryFull;
45 typedef struct DeviceState DeviceState;
46 typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot;
47 typedef struct DisasContextBase DisasContextBase;
48 typedef struct DisplayChangeListener DisplayChangeListener;
49 typedef struct DriveInfo DriveInfo;
50 typedef struct DumpState DumpState;
51 typedef struct Error Error;
52 typedef struct EventNotifier EventNotifier;
53 typedef struct FlatView FlatView;
54 typedef struct FWCfgState FWCfgState;
55 typedef struct HostMemoryBackend HostMemoryBackend;
56 typedef struct I2CBus I2CBus;
57 typedef struct I2SCodec I2SCodec;
58 typedef struct IOMMUMemoryRegion IOMMUMemoryRegion;
59 typedef struct ISABus ISABus;
60 typedef struct ISADevice ISADevice;
61 typedef struct IsaDma IsaDma;
62 typedef struct JSONWriter JSONWriter;
63 typedef struct MACAddr MACAddr;
64 typedef struct MachineClass MachineClass;
65 typedef struct MachineState MachineState;
66 typedef struct MemoryListener MemoryListener;
67 typedef struct MemoryMappingList MemoryMappingList;
68 typedef struct MemoryRegion MemoryRegion;
69 typedef struct MemoryRegionCache MemoryRegionCache;
70 typedef struct MemoryRegionSection MemoryRegionSection;
71 typedef struct MigrationIncomingState MigrationIncomingState;
72 typedef struct MigrationState MigrationState;
73 typedef struct Monitor Monitor;
74 typedef struct MSIMessage MSIMessage;
75 typedef struct NetClientState NetClientState;
76 typedef struct NetFilterState NetFilterState;
77 typedef struct NICInfo NICInfo;
78 typedef struct Object Object;
79 typedef struct ObjectClass ObjectClass;
80 typedef struct PCIBridge PCIBridge;
81 typedef struct PCIBus PCIBus;
82 typedef struct PCIDevice PCIDevice;
83 typedef struct PCIEPort PCIEPort;
84 typedef struct PCIESlot PCIESlot;
85 typedef struct PCIExpressDevice PCIExpressDevice;
86 typedef struct PCIExpressHost PCIExpressHost;
87 typedef struct PCIHostDeviceAddress PCIHostDeviceAddress;
88 typedef struct PCIHostState PCIHostState;
89 typedef struct Property Property;
90 typedef struct PropertyInfo PropertyInfo;
91 typedef struct QBool QBool;
92 typedef struct QDict QDict;
93 typedef struct QEMUBH QEMUBH;
94 typedef struct QemuConsole QemuConsole;
95 typedef struct QEMUCursor QEMUCursor;
96 typedef struct QEMUFile QEMUFile;
97 typedef struct QemuMutex QemuMutex;
98 typedef struct QemuOpts QemuOpts;
99 typedef struct QemuOptsList QemuOptsList;
100 typedef struct QEMUSGList QEMUSGList;
101 typedef struct QemuSpin QemuSpin;
102 typedef struct QEMUTimer QEMUTimer;
103 typedef struct QEMUTimerListGroup QEMUTimerListGroup;
104 typedef struct QList QList;
105 typedef struct QNull QNull;
106 typedef struct QNum QNum;
107 typedef struct QObject QObject;
108 typedef struct QString QString;
109 typedef struct RAMBlock RAMBlock;
110 typedef struct Range Range;
111 typedef struct ReservedRegion ReservedRegion;
112 typedef struct SaveLiveCompletePrecopyThreadData SaveLiveCompletePrecopyThreadData;
113 typedef struct SHPCDevice SHPCDevice;
114 typedef struct SSIBus SSIBus;
115 typedef struct TCGCPUOps TCGCPUOps;
116 typedef struct TCGHelperInfo TCGHelperInfo;
117 typedef struct TaskState TaskState;
118 typedef struct TranslationBlock TranslationBlock;
119 typedef struct VirtIODevice VirtIODevice;
120 typedef struct Visitor Visitor;
121 typedef struct VMChangeStateEntry VMChangeStateEntry;
122 typedef struct VMStateDescription VMStateDescription;
123 
124 /*
125  * Pointer types
126  * Such typedefs should be limited to cases where the typedef's users
127  * are oblivious of its "pointer-ness".
128  * Please keep this list in case-insensitive alphabetical order.
129  */
130 typedef struct IRQState *qemu_irq;
131 
132 /*
133  * Function types
134  */
135 typedef void (*qemu_irq_handler)(void *opaque, int n, int level);
136 typedef bool (*MigrationLoadThread)(void *opaque, bool *should_quit,
137                                     Error **errp);
138 typedef bool (*SaveLiveCompletePrecopyThreadHandler)(SaveLiveCompletePrecopyThreadData *d,
139                                                      Error **errp);
140 
141 #endif /* QEMU_TYPEDEFS_H */
142