Mac OS 9
DriverFamilyMatching.h
Go to the documentation of this file.
1 
18 #ifndef __DRIVERFAMILYMATCHING__
19 #define __DRIVERFAMILYMATCHING__
20 
21 #ifndef __MACTYPES__
22 #include <MacTypes.h>
23 #endif
24 
25 #ifndef __NAMEREGISTRY__
26 #include <NameRegistry.h>
27 #endif
28 
29 #ifndef __CODEFRAGMENTS__
30 #include <CodeFragments.h>
31 #endif
32 
33 #if PRAGMA_ONCE
34 #pragma once
35 #endif
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #if PRAGMA_IMPORT
42 #pragma import on
43 #endif
44 
45 #if PRAGMA_STRUCT_ALIGN
46 #pragma options align = mac68k
47 #elif PRAGMA_STRUCT_PACKPUSH
48 #pragma pack(push, 2)
49 #elif PRAGMA_STRUCT_PACK
50 #pragma pack(2)
51 #endif
52 
59 #define kPropertyName "name"
60 #define kPropertyCompatible "compatible"
61 #define kPropertyDriverPtr "driver-ptr"
62 #define kPropertyDriverDesc "driver-description"
63 #define kPropertyReg "reg"
64 #define kPropertyAAPLAddress "AAPL,address"
65 #define kPropertyMatching "matching"
66 #define kPropertyAAPLDriverName "AAPL,driver-name"
67 
68 /* CPassThru */
78 /* Driver Typing Information Used to Match Drivers With Devices */
79 struct MacDriverType {
80  Str31 nameInfoStr; /* Driver Name/Info String*/
81  NumVersion version; /* Driver Version Number*/
82 };
83 typedef struct MacDriverType MacDriverType;
84 #if TARGET_OS_MAC
85 typedef MacDriverType DriverType;
86 #endif /* TARGET_OS_MAC */
87 
89 /* OS Runtime Information Used to Setup and Maintain a Driver's Runtime
90  * Environment */
91 typedef OptionBits RuntimeOptions;
92 enum {
93  kDriverIsLoadedUponDiscovery =
94  0x00000001, /* auto-load driver when discovered*/
95  kDriverIsOpenedUponLoad = 0x00000002, /* auto-open driver when loaded*/
96  kDriverIsUnderExpertControl = 0x00000004, /* I/O expert handles loads/opens*/
97  kDriverIsConcurrent = 0x00000008, /* supports concurrent requests*/
98  kDriverQueuesIOPB = 0x00000010, /* device manager doesn't queue IOPB*/
99  kDriverIsLoadedAtBoot = 0x00000020, /* Driver is loaded at the boot time */
100  kDriverIsForVirtualDevice = 0x00000040, /* Driver is for a virtual Device */
101  kDriverSupportDMSuspendAndResume =
102  0x00000080 /* Driver supports Device Manager Suspend and Resume command */
103 };
104 
106  RuntimeOptions driverRuntime; /* Options for OS Runtime*/
107  Str31 driverName; /* Driver's name to the OS*/
108  UInt32 driverDescReserved[8]; /* Reserved area*/
109 };
110 typedef struct DriverOSRuntime DriverOSRuntime;
112 /* OS Service Information Used To Declare What APIs a Driver Supports */
113 typedef UInt32 ServiceCount;
115  OSType serviceCategory; /* Service Category Name*/
116  OSType serviceType; /* Type within Category*/
117  NumVersion serviceVersion; /* Version of service*/
118 };
119 typedef struct DriverServiceInfo DriverServiceInfo;
122  ServiceCount nServices; /* Number of Services Supported*/
123  DriverServiceInfo service[1]; /* The List of Services (at least one)*/
124 };
125 typedef struct DriverOSService DriverOSService;
127 /* Categories */
128 enum {
129  kServiceCategoryDisplay = FOUR_CHAR_CODE('disp'), /* Display Manager*/
130  kServiceCategoryOpenTransport = FOUR_CHAR_CODE('otan'), /* Open Transport*/
131  kServiceCategoryBlockStorage = FOUR_CHAR_CODE('blok'), /* Block Storage*/
132  kServiceCategoryNdrvDriver =
133  FOUR_CHAR_CODE('ndrv'), /* Generic Native Driver*/
134  kServiceCategoryScsiSIM = FOUR_CHAR_CODE('scsi'), /* SCSI */
135  kServiceCategoryFileManager = FOUR_CHAR_CODE('file'), /* File Manager */
136  kServiceCategoryIDE = FOUR_CHAR_CODE('ide-'), /* ide */
137  kServiceCategoryADB = FOUR_CHAR_CODE('adb-'), /* adb */
138  kServiceCategoryPCI = FOUR_CHAR_CODE('pci-'), /* pci bus */
139  /* Nu Bus */
140  kServiceCategoryDFM = FOUR_CHAR_CODE('dfm-'), /* DFM */
141  kServiceCategoryMotherBoard = FOUR_CHAR_CODE('mrbd'), /* mother Board */
142  kServiceCategoryKeyboard = FOUR_CHAR_CODE('kybd'), /* Keyboard */
143  kServiceCategoryPointing = FOUR_CHAR_CODE('poit'), /* Pointing */
144  kServiceCategoryRTC = FOUR_CHAR_CODE('rtc-'), /* RTC */
145  kServiceCategoryNVRAM = FOUR_CHAR_CODE('nram'), /* NVRAM */
146  kServiceCategorySound = FOUR_CHAR_CODE('sond'), /* Sound (1/3/96 MCS) */
147  kServiceCategoryPowerMgt = FOUR_CHAR_CODE('pgmt'), /* Power Management */
148  kServiceCategoryGeneric = FOUR_CHAR_CODE(
149  'genr') /* Generic Service Category to receive general Events */
150 };
151 
152 /* Ndrv ServiceCategory Types */
153 enum {
154  kNdrvTypeIsGeneric = FOUR_CHAR_CODE('genr'), /* generic*/
155  kNdrvTypeIsVideo = FOUR_CHAR_CODE('vido'), /* video*/
156  kNdrvTypeIsBlockStorage = FOUR_CHAR_CODE('blok'), /* block storage*/
157  kNdrvTypeIsNetworking = FOUR_CHAR_CODE('netw'), /* networking*/
158  kNdrvTypeIsSerial = FOUR_CHAR_CODE('serl'), /* serial*/
159  kNdrvTypeIsParallel = FOUR_CHAR_CODE('parl'), /* parallel */
160  kNdrvTypeIsSound = FOUR_CHAR_CODE('sond'), /* sound*/
161  kNdrvTypeIsBusBridge = FOUR_CHAR_CODE('brdg'),
162  kNdrvTypeIsFWConference =
163  FOUR_CHAR_CODE('crsh'), /* FireWire conference camera */
164  kNdrvTypeIsAVC =
165  FOUR_CHAR_CODE('avc ') /* FireWire AVC devices (DV cameras) */
166 };
167 
168 typedef UInt32 DriverDescVersion;
169 /* The Driver Description */
170 enum {
171  kTheDescriptionSignature = FOUR_CHAR_CODE('mtej'),
172  kDriverDescriptionSignature = FOUR_CHAR_CODE('pdes')
173 };
174 
175 enum { kInitialDriverDescriptor = 0, kVersionOneDriverDescriptor = 1 };
176 
178  OSType driverDescSignature; /* Signature field of this structure*/
179  DriverDescVersion driverDescVersion; /* Version of this data structure*/
180  MacDriverType driverType; /* Type of Driver*/
181  DriverOSRuntime driverOSRuntimeInfo; /* OS Runtime Requirements of Driver*/
182  DriverOSService driverServices; /* Apple Service API Membership*/
183 };
184 typedef struct DriverDescription DriverDescription;
186 
187 #if PRAGMA_STRUCT_ALIGN
188 #pragma options align = reset
189 #elif PRAGMA_STRUCT_PACKPUSH
190 #pragma pack(pop)
191 #elif PRAGMA_STRUCT_PACK
192 #pragma pack()
193 #endif
194 
195 #ifdef PRAGMA_IMPORT_OFF
196 #pragma import off
197 #elif PRAGMA_IMPORT
198 #pragma import reset
199 #endif
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif /* __DRIVERFAMILYMATCHING__ */
Public Code Fragment Manager Interfaces.
Basic Macintosh data types.
NameRegistry Interfaces.
Definition: DriverFamilyMatching.h:177
Definition: DriverFamilyMatching.h:105
Definition: DriverFamilyMatching.h:121
Definition: DriverFamilyMatching.h:114
Definition: DriverFamilyMatching.h:79
Definition: MacTypes.h:638