Mac OS 9
Start.h
Go to the documentation of this file.
1 
19 #ifndef __START__
20 #define __START__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __FILES__
27 #include <Files.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39 #if PRAGMA_IMPORT
40 #pragma import on
41 #endif
42 
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
46 #pragma pack(push, 2)
47 #elif PRAGMA_STRUCT_PACK
48 #pragma pack(2)
49 #endif
50 
63  enum
64  {
65  kExtensionTableVersion =
66  0x00000100
67  };
68 
70  enum
71  {
72  extNotificationBeforeFirst = 0,
75  2,
77  3
78  };
79 
81  {
82  Str31 fileName;
83  long parentDirID;
85  short ioVRefNum;
87  short ioFRefNum;
88  SInt8 ioFVersNum;
89  SInt8 filler1;
90  short ioFDirIndex;
91  SInt8 ioFlAttrib;
92  SInt8 ioFlVersNum;
93  FInfo ioFlFndrInfo;
94  long ioDirID;
95  unsigned short ioFlStBlk;
96  long ioFlLgLen;
97  long ioFlPyLen;
98  unsigned short ioFlRStBlk;
99  long ioFlRLgLen;
100  long ioFlRPyLen;
101  unsigned long ioFlCrDat;
102  unsigned long ioFlMdDat;
103  };
104  typedef struct ExtensionElement ExtensionElement;
107  {
108  UInt32 extTableHeaderSize;
114  UInt32 extElementSize;
117  };
120  {
121  ExtensionTableHeader extTableHeader;
123  };
124  typedef struct ExtensionTable ExtensionTable;
127  typedef CALLBACK_API(void, ExtensionNotificationProcPtr)(
128  UInt32 message, void *param, ExtensionElementPtr extElement);
129  typedef CALLBACK_API(void, ExtensionTableHandlerProcPtr)(
130  UInt32 message, void *param, ExtensionTableHandle extTableHandle);
131  typedef STACK_UPP_TYPE(ExtensionNotificationProcPtr) ExtensionNotificationUPP;
132  typedef STACK_UPP_TYPE(ExtensionTableHandlerProcPtr) ExtensionTableHandlerUPP;
133 #if CALL_NOT_IN_CARBON
142  ExtensionNotificationUPP
143  NewExtensionNotificationUPP(ExtensionNotificationProcPtr userRoutine);
144 #if !OPAQUE_UPP_TYPES
145  enum
146  {
147  uppExtensionNotificationProcInfo = 0x00000FC0
148  };
149 #ifdef __cplusplus
150  inline ExtensionNotificationUPP
151  NewExtensionNotificationUPP(ExtensionNotificationProcPtr userRoutine)
152  {
153  return (ExtensionNotificationUPP)NewRoutineDescriptor(
154  (ProcPtr)(userRoutine), uppExtensionNotificationProcInfo,
155  GetCurrentArchitecture());
156  }
157 #else
158 #define NewExtensionNotificationUPP(userRoutine) \
159  (ExtensionNotificationUPP) NewRoutineDescriptor( \
160  (ProcPtr)(userRoutine), uppExtensionNotificationProcInfo, \
161  GetCurrentArchitecture())
162 #endif
163 #endif
164 
173  ExtensionTableHandlerUPP
174  NewExtensionTableHandlerUPP(ExtensionTableHandlerProcPtr userRoutine);
175 #if !OPAQUE_UPP_TYPES
176  enum
177  {
178  uppExtensionTableHandlerProcInfo = 0x00000FC0
179  };
180 #ifdef __cplusplus
181  inline ExtensionTableHandlerUPP
182  NewExtensionTableHandlerUPP(ExtensionTableHandlerProcPtr userRoutine)
183  {
184  return (ExtensionTableHandlerUPP)NewRoutineDescriptor(
185  (ProcPtr)(userRoutine), uppExtensionTableHandlerProcInfo,
186  GetCurrentArchitecture());
187  }
188 #else
189 #define NewExtensionTableHandlerUPP(userRoutine) \
190  (ExtensionTableHandlerUPP) NewRoutineDescriptor( \
191  (ProcPtr)(userRoutine), uppExtensionTableHandlerProcInfo, \
192  GetCurrentArchitecture())
193 #endif
194 #endif
195 
204  void
205  DisposeExtensionNotificationUPP(ExtensionNotificationUPP userUPP);
206 #if !OPAQUE_UPP_TYPES
207 #ifdef __cplusplus
208  inline void DisposeExtensionNotificationUPP(ExtensionNotificationUPP userUPP)
209  {
210  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
211  }
212 #else
213 #define DisposeExtensionNotificationUPP(userUPP) \
214  DisposeRoutineDescriptor(userUPP)
215 #endif
216 #endif
217 
226  void
227  DisposeExtensionTableHandlerUPP(ExtensionTableHandlerUPP userUPP);
228 #if !OPAQUE_UPP_TYPES
229 #ifdef __cplusplus
230  inline void DisposeExtensionTableHandlerUPP(ExtensionTableHandlerUPP userUPP)
231  {
232  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
233  }
234 #else
235 #define DisposeExtensionTableHandlerUPP(userUPP) \
236  DisposeRoutineDescriptor(userUPP)
237 #endif
238 #endif
239 
248  void
249  InvokeExtensionNotificationUPP(UInt32 message, void *param,
250  ExtensionElementPtr extElement,
251  ExtensionNotificationUPP userUPP);
252 #if !OPAQUE_UPP_TYPES
253 #ifdef __cplusplus
254  inline void InvokeExtensionNotificationUPP(UInt32 message, void *param,
255  ExtensionElementPtr extElement,
256  ExtensionNotificationUPP userUPP)
257  {
258  CALL_THREE_PARAMETER_UPP(userUPP, uppExtensionNotificationProcInfo, message,
259  param, extElement);
260  }
261 #else
262 #define InvokeExtensionNotificationUPP(message, param, extElement, userUPP) \
263  CALL_THREE_PARAMETER_UPP((userUPP), uppExtensionNotificationProcInfo, \
264  (message), (param), (extElement))
265 #endif
266 #endif
267 
276  void
277  InvokeExtensionTableHandlerUPP(UInt32 message, void *param,
278  ExtensionTableHandle extTableHandle,
279  ExtensionTableHandlerUPP userUPP);
280 #if !OPAQUE_UPP_TYPES
281 #ifdef __cplusplus
282  inline void InvokeExtensionTableHandlerUPP(UInt32 message, void *param,
283  ExtensionTableHandle extTableHandle,
284  ExtensionTableHandlerUPP userUPP)
285  {
286  CALL_THREE_PARAMETER_UPP(userUPP, uppExtensionTableHandlerProcInfo, message,
287  param, extTableHandle);
288  }
289 #else
290 #define InvokeExtensionTableHandlerUPP(message, param, extTableHandle, \
291  userUPP) \
292  CALL_THREE_PARAMETER_UPP((userUPP), uppExtensionTableHandlerProcInfo, \
293  (message), (param), (extTableHandle))
294 #endif
295 #endif
296 
297 #endif
299 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
301 #define NewExtensionNotificationProc(userRoutine) \
302  NewExtensionNotificationUPP(userRoutine)
303 #define NewExtensionTableHandlerProc(userRoutine) \
304  NewExtensionTableHandlerUPP(userRoutine)
305 #define CallExtensionNotificationProc(userRoutine, message, param, extElement) \
306  InvokeExtensionNotificationUPP(message, param, extElement, userRoutine)
307 #define CallExtensionTableHandlerProc(userRoutine, message, param, \
308  extTableHandle) \
309  InvokeExtensionTableHandlerUPP(message, param, extTableHandle, userRoutine)
310 #endif
313  {
314  struct
315  {
316  SignedByte sdExtDevID;
317  SignedByte sdPartition;
318  SignedByte sdSlotNum;
319  SignedByte sdSRsrcID;
320  } slotDev;
321  struct
322  {
323  SignedByte sdReserved1;
324  SignedByte sdReserved2;
325  short sdRefNum;
326  } scsiDev;
327  };
328  typedef union DefStartRec DefStartRec;
329  typedef DefStartRec *DefStartPtr;
330  struct DefVideoRec
331  {
332  SignedByte sdSlot;
333  SignedByte sdsResource;
334  };
335  typedef struct DefVideoRec DefVideoRec;
336  typedef DefVideoRec *DefVideoPtr;
337  struct DefOSRec
338  {
339  SignedByte sdReserved;
340  SignedByte sdOSType;
341  };
342  typedef struct DefOSRec DefOSRec;
343  typedef DefOSRec *DefOSPtr;
344 #if CALL_NOT_IN_CARBON
345 
378 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
379 #pragma parameter GetDefaultStartup(__A0)
380 #endif
381  void
383 
416 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
417 #pragma parameter SetDefaultStartup(__A0)
418 #endif
419  void
421 
443 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
444 #pragma parameter GetVideoDefault(__A0)
445 #endif
446  void
448 
467 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
468 #pragma parameter SetVideoDefault(__A0)
469 #endif
470  void
472 
494 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
495 #pragma parameter GetOSDefault(__A0)
496 #endif
497  void
498  GetOSDefault(DefOSPtr paramBlock);
499 
520 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
521 #pragma parameter SetOSDefault(__A0)
522 #endif
523  void
524  SetOSDefault(DefOSPtr paramBlock);
525 
526 #endif
528 #if CALL_NOT_IN_CARBON
529 
546  void
547  SetTimeout(short count);
548 
564  void
565  GetTimeout(short *count);
566 
567 #endif
583 #if CALL_NOT_IN_CARBON
592  OSErr
593  InstallExtensionNotificationProc(ExtensionNotificationUPP extNotificationProc);
594 
621  OSErr
622  RemoveExtensionNotificationProc(ExtensionNotificationUPP extNotificationProc);
623 
672  OSErr
673  InstallExtensionTableHandlerProc(ExtensionTableHandlerUPP extMgrProc,
674  ExtensionTableHandle *extTable);
675 
698  OSErr
699  RemoveExtensionTableHandlerProc(ExtensionTableHandlerUPP extMgrProc);
700 
701 #endif
718  enum
719  {
720  kNetworkStartupDevice = 32767,
721  kLocalStartupDevice = 32766
722  };
723 
728  enum
729  {
730  kSMProtocolStringSize = 16,
731  kSMAddressStringSize = 16,
732  kSMBootFilenameSize = 128
733  };
734 
740 #if CALL_NOT_IN_CARBON
749  OSErr
750  GetSelectedStartupDevice(UInt16 *driveNum);
751 
767  OSErr
768  GetSelectedStartupDeviceType(OSType *interfaceType);
769 
790  OSErr
792  UInt32 *lun);
793 
829  OSErr
830  GetSelectedNetworkStartupDeviceInfo(char *protocol, char *siaddr,
831  char *filename, char *ciaddr, char *giaddr,
832  UInt32 *bootpRetries, UInt32 *tftpRetries,
833  UInt32 reserved);
834 
850  Boolean
851  IsDriveSelectable(UInt16 driveNum);
852 
867  OSErr
868  SetSelectedStartupDevice(UInt16 driveNum);
869 
907  OSErr
908  SetSelectedNetworkStartupDevice(char *protocol, char *siaddr, char *filename,
909  char *ciaddr, char *giaddr, UInt32 bootpRetries,
910  UInt32 tftpRetries, UInt32 reserved);
911 
912 #endif
914 #if PRAGMA_STRUCT_ALIGN
915 #pragma options align = reset
916 #elif PRAGMA_STRUCT_PACKPUSH
917 #pragma pack(pop)
918 #elif PRAGMA_STRUCT_PACK
919 #pragma pack()
920 #endif
921 
922 #ifdef PRAGMA_IMPORT_OFF
923 #pragma import off
924 #elif PRAGMA_IMPORT
925 #pragma import reset
926 #endif
927 
928 #ifdef __cplusplus
929 }
930 #endif
931 
932 #endif
933 * / AGMA_STRUCT_PACKPUSH
934 #pragma pack(pop)
935 #elif PRAGMA_STRUCT_PACK
936 #pragma pack()
937 #endif
938 
939 #ifdef PRAGMA_IMPORT_OFF
940 #pragma import off
941 #elif PRAGMA_IMPORT
942 #pragma import reset
943 #endif
944 
945 #ifdef __cplusplus
946 }
947 #endif
948 
949 #endif
950 * /*/*/ * /*/*/ * /
File Manager (MFS, HFS, and HFS+) Interfaces.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Boolean IsDriveSelectable(UInt16 driveNum)
OSErr RemoveExtensionTableHandlerProc(ExtensionTableHandlerUPP extMgrProc)
OSErr InstallExtensionNotificationProc(ExtensionNotificationUPP extNotificationProc)
void GetOSDefault(DefOSPtr paramBlock)
Get default video device location and resource number.
OSErr SetSelectedNetworkStartupDevice(char *protocol, char *siaddr, char *filename, char *ciaddr, char *giaddr, UInt32 bootpRetries, UInt32 tftpRetries, UInt32 reserved)
void SetTimeout(short count)
How long you want the system to wait for a hard disk response.
OSErr GetSelectedFirewireStartupDeviceInfo(UnsignedWide *GUID, UInt32 *mao, UInt32 *lun)
OSErr GetSelectedNetworkStartupDeviceInfo(char *protocol, char *siaddr, char *filename, char *ciaddr, char *giaddr, UInt32 *bootpRetries, UInt32 *tftpRetries, UInt32 reserved)
void SetVideoDefault(DefVideoPtr paramBlock)
Set default video device location and resource number.
@ extNotificationAfterCurrent
Definition: Start.h:76
@ extNotificationAfterLast
Definition: Start.h:73
@ extNotificationBeforeCurrent
Definition: Start.h:74
void SetOSDefault(DefOSPtr paramBlock)
Set default operating system.
OSErr GetSelectedStartupDevice(UInt16 *driveNum)
#define NewExtensionTableHandlerUPP(userRoutine)
Definition: Start.h:189
void InvokeExtensionNotificationUPP(UInt32 message, void *param, ExtensionElementPtr extElement, ExtensionNotificationUPP userUPP)
void GetTimeout(short *count)
Number of seconds the system wait for a hard disk.
void DisposeExtensionNotificationUPP(ExtensionNotificationUPP userUPP)
OSErr RemoveExtensionNotificationProc(ExtensionNotificationUPP extNotificationProc)
void DisposeExtensionTableHandlerUPP(ExtensionTableHandlerUPP userUPP)
void InvokeExtensionTableHandlerUPP(UInt32 message, void *param, ExtensionTableHandle extTableHandle, ExtensionTableHandlerUPP userUPP)
OSErr InstallExtensionTableHandlerProc(ExtensionTableHandlerUPP extMgrProc, ExtensionTableHandle *extTable)
void SetDefaultStartup(DefStartPtr paramBlock)
SetDefaultStartup Specify default startup device.
OSErr GetSelectedStartupDeviceType(OSType *interfaceType)
OSErr SetSelectedStartupDevice(UInt16 driveNum)
#define NewExtensionNotificationUPP(userRoutine)
Definition: Start.h:158
void GetDefaultStartup(DefStartPtr paramBlock)
GetDefaultStartup Get default startup device name and reference.
void GetVideoDefault(DefVideoPtr paramBlock)
Get default video device location and resource number.
Definition: Start.h:338
Definition: Start.h:331
Definition: Start.h:81
long parentDirID
Definition: Start.h:83
short ioFRefNum
Definition: Start.h:87
short ioVRefNum
Definition: Start.h:85
SInt8 ioFlAttrib
Definition: Start.h:91
Definition: Start.h:107
UInt32 extElementIndex
Definition: Start.h:112
UInt32 extTableVersion
Definition: Start.h:110
UInt32 extElementCount
Definition: Start.h:115
UInt32 extElementSize
Definition: Start.h:114
Definition: Start.h:120
ExtensionElement extElements[1]
Definition: Start.h:122
Definition: Finder.h:303
Definition: MacTypes.h:110
Definition: Start.h:313