Mac OS 9
CommResources.h
Go to the documentation of this file.
1 
19 #ifndef __COMMRESOURCES__
20 #define __COMMRESOURCES__
21 
22 #ifndef __OSUTILS__
23 #include <OSUtils.h>
24 #endif
25 
26 #ifndef __CONDITIONALMACROS__
27 #include <ConditionalMacros.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 
51 #if CALL_NOT_IN_CARBON
52  enum
53  {
55  classCM = FOUR_CHAR_CODE('cbnd'),
56  classFT = FOUR_CHAR_CODE('fbnd'),
57  classTM = FOUR_CHAR_CODE('tbnd')
58  };
59 
60  enum
61  {
65  crmType = 9,
69  crmNoErr = 0
70  };
71 
73  typedef OSErr CRMErr;
74  struct CRMRec
75  {
76  QElemPtr qLink;
77  short qType;
78  short crmVersion;
79  long crmPrivate;
80  short crmReserved;
82  long crmDeviceID;
84  long crmStatus;
85  long crmRefCon;
86  };
87  typedef struct CRMRec CRMRec;
88  typedef CRMRec *CRMRecPtr;
89 #endif
91 #if CALL_NOT_IN_CARBON
100  CRMErr
101  InitCRM(void);
102 
111  QHdrPtr
113 
122  void
123  CRMInstall(CRMRecPtr crmReqPtr);
124 
133  OSErr
134  CRMRemove(CRMRecPtr crmReqPtr);
135 
144  CRMRecPtr
145  CRMSearch(CRMRecPtr crmReqPtr);
146 
155  short
157 
166  Handle
167  CRMGetResource(ResType theType, short theID);
168 
177  Handle
178  CRMGet1Resource(ResType theType, short theID);
179 
188  Handle
189  CRMGetIndResource(ResType theType, short index);
190 
199  Handle
200  CRMGet1IndResource(ResType theType, short index);
201 
210  Handle
211  CRMGetNamedResource(ResType theType, ConstStr255Param name);
212 
221  Handle
222  CRMGet1NamedResource(ResType theType, ConstStr255Param name);
223 
232  void
233  CRMReleaseResource(Handle theHandle);
234 
243  Handle
244  CRMGetToolResource(short procID, ResType theType, short theID);
245 
254  Handle
255  CRMGetToolNamedResource(short procID, ResType theType, ConstStr255Param name);
256 
265  void
266  CRMReleaseToolResource(short procID, Handle theHandle);
267 
276  long
277  CRMGetIndex(Handle theHandle);
278 
287  short
288  CRMLocalToRealID(ResType bundleType, short toolID, ResType theType,
289  short localID);
290 
299  short
300  CRMRealToLocalID(ResType bundleType, short toolID, ResType theType,
301  short realID);
302 
311  OSErr
312  CRMGetIndToolName(OSType bundleType, short index, Str255 toolName);
313 
322  OSErr
323  CRMFindCommunications(short *vRefNum, long *dirID);
324 
333  Boolean
334  CRMIsDriverOpen(ConstStr255Param driverName);
335 
344  CRMErr
345  CRMParseCAPSResource(Handle theHandle, ResType selector, unsigned long *value);
346 
355  OSErr
356  CRMReserveRF(short refNum);
357 
366  OSErr
367  CRMReleaseRF(short refNum);
368 
369 #endif
371 #if PRAGMA_STRUCT_ALIGN
372 #pragma options align = reset
373 #elif PRAGMA_STRUCT_PACKPUSH
374 #pragma pack(pop)
375 #elif PRAGMA_STRUCT_PACK
376 #pragma pack()
377 #endif
378 
379 #ifdef PRAGMA_IMPORT_OFF
380 #pragma import off
381 #elif PRAGMA_IMPORT
382 #pragma import reset
383 #endif
384 
385 #ifdef __cplusplus
386 }
387 #endif
388 
389 #endif
short CRMRealToLocalID(ResType bundleType, short toolID, ResType theType, short realID)
Handle CRMGetResource(ResType theType, short theID)
short CRMLocalToRealID(ResType bundleType, short toolID, ResType theType, short localID)
CRMErr InitCRM(void)
Handle CRMGet1Resource(ResType theType, short theID)
CRMErr CRMParseCAPSResource(Handle theHandle, ResType selector, unsigned long *value)
OSErr CRMGetIndToolName(OSType bundleType, short index, Str255 toolName)
OSErr CRMReserveRF(short refNum)
OSErr CRMReleaseRF(short refNum)
Handle CRMGetIndResource(ResType theType, short index)
short CRMGetCRMVersion(void)
void CRMReleaseResource(Handle theHandle)
Handle CRMGetToolNamedResource(short procID, ResType theType, ConstStr255Param name)
void CRMInstall(CRMRecPtr crmReqPtr)
CRMRecPtr CRMSearch(CRMRecPtr crmReqPtr)
OSErr CRMRemove(CRMRecPtr crmReqPtr)
OSErr CRMFindCommunications(short *vRefNum, long *dirID)
long CRMGetIndex(Handle theHandle)
Boolean CRMIsDriverOpen(ConstStr255Param driverName)
Handle CRMGet1IndResource(ResType theType, short index)
Handle CRMGet1NamedResource(ResType theType, ConstStr255Param name)
Handle CRMGetToolResource(short procID, ResType theType, short theID)
OSErr CRMErr
Definition: CommResources.h:73
void CRMReleaseToolResource(short procID, Handle theHandle)
@ classCM
Definition: CommResources.h:55
@ curCRMVersion
Definition: CommResources.h:63
@ crmRecVersion
Definition: CommResources.h:66
@ crmType
Definition: CommResources.h:65
@ crmGenericError
Definition: CommResources.h:68
Handle CRMGetNamedResource(ResType theType, ConstStr255Param name)
QHdrPtr CRMGetHeader(void)
Set up for compiler independent conditionals.
unsigned char Boolean
Definition: MacTypes.h:318
OS Utilities Interfaces.
Definition: CommResources.h:75
long crmStatus
Definition: CommResources.h:84
short crmReserved
Definition: CommResources.h:80
long crmDeviceID
Definition: CommResources.h:82
long crmPrivate
Definition: CommResources.h:79
long crmDeviceType
Definition: CommResources.h:81
long crmRefCon
Definition: CommResources.h:85
short qType
Definition: CommResources.h:77
short crmVersion
Definition: CommResources.h:78
long crmAttributes
Definition: CommResources.h:83
Definition: OSUtils.h:131
Definition: OSUtils.h:154