ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/extfs_macosx.h
Revision: 1.3
Committed: 2004-01-28T07:29:38Z (20 years, 9 months ago) by nigel
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-16
Changes since 1.2: +2 -20 lines
Log Message:
John Daniel's changes; CarbonCore is hard to find (sub framework of the
CoreServices framework).  Easier to include full Carbon header instead
(and remove extra defs).

File Contents

# User Rev Content
1 nigel 1.1 /*
2 nigel 1.3 * $Id: extfs_macosx.h,v 1.2 2004/01/12 15:29:24 cebix Exp $
3 nigel 1.1 *
4     * extfs_macosx.h - Work around some symbol clashes between
5     * CarbonCore and Basilisk II header files.
6     * Based on:
7     *
8     * extfs_defs.h - MacOS types and structures for external file system
9     *
10 cebix 1.2 * Basilisk II (C) 1997-2004 Christian Bauer
11 nigel 1.1 *
12     * This program is free software; you can redistribute it and/or modify
13     * it under the terms of the GNU General Public License as published by
14     * the Free Software Foundation; either version 2 of the License, or
15     * (at your option) any later version.
16     *
17     * This program is distributed in the hope that it will be useful,
18     * but WITHOUT ANY WARRANTY; without even the implied warranty of
19     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20     * GNU General Public License for more details.
21     *
22     * You should have received a copy of the GNU General Public License
23     * along with this program; if not, write to the Free Software
24     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25     */
26    
27     #ifndef EXTFS_DEFS_H
28     #define EXTFS_DEFS_H
29    
30     #include "macos_util_macosx.h"
31    
32 nigel 1.3 #import <Carbon/Carbon.h>
33 nigel 1.1
34     // File attributes
35     enum {
36     faLocked = 0x01,
37     faRFOpen = 0x04,
38     faDFOpen = 0x08,
39     faIsDir = 0x10,
40     faOpen = 0x80
41     };
42    
43     // Volume attributes
44     enum {
45     vaBusy = 0x40,
46     vaHardLock = 0x80,
47     vaSoftLock = 0x8000
48     };
49    
50     // vMAttrib (GetVolParms) constants
51     enum {
52     kLimitFCBs = 1 << 31,
53     kLocalWList = 1 << 30,
54     kNoMiniFndr = 1 << 29,
55     kNoVNEdit = 1 << 28,
56     kNoLclSync = 1 << 27,
57     kTrshOffLine = 1 << 26,
58     kNoSwitchTo = 1 << 25,
59     kNoDeskItems = 1 << 20,
60     kNoBootBlks = 1 << 19,
61     kAccessCntl = 1 << 18,
62     kNoSysDir = 1 << 17,
63     kHasExtFSVol = 1 << 16,
64     kHasOpenDeny = 1 << 15,
65     kHasCopyFile = 1 << 14,
66     kHasMoveRename = 1 << 13,
67     kHasDesktopMgr = 1 << 12,
68     kHasShortName = 1 << 11,
69     kHasFolderLock = 1 << 10,
70     kHasPersonalAccessPrivileges = 1 << 9,
71     kHasUserGroupList = 1 << 8,
72     kHasCatSearch = 1 << 7,
73     kHasFileIDs = 1 << 6,
74     kHasBTreeMgr = 1 << 5,
75     kHasBlankAccessPrivileges = 1 << 4,
76     kSupportsAsyncRequests = 1 << 3
77     };
78    
79     enum {
80     fsUsrCNID = 16,
81     kHFSBit = 9,
82     kHFSMask = 0x0200,
83     kAsyncBit = 10,
84     kAsyncMask = 0x0400
85     };
86    
87     // HFSCIProc selectCode values
88     enum {
89     kFSMOpen = 0xA000,
90     kFSMClose = 0xA001,
91     kFSMRead = 0xA002,
92     kFSMWrite = 0xA003,
93     kFSMGetVolInfo = 0xA007,
94     kFSMCreate = 0xA008,
95     kFSMDelete = 0xA009,
96     kFSMOpenRF = 0xA00A,
97     kFSMRename = 0xA00B,
98     kFSMGetFileInfo = 0xA00C,
99     kFSMSetFileInfo = 0xA00D,
100     kFSMUnmountVol = 0xA00E,
101     kFSMMountVol = 0xA00F,
102     kFSMAllocate = 0xA010,
103     kFSMGetEOF = 0xA011,
104     kFSMSetEOF = 0xA012,
105     kFSMFlushVol = 0xA013,
106     kFSMGetVol = 0xA014,
107     kFSMSetVol = 0xA015,
108     kFSMEject = 0xA017,
109     kFSMGetFPos = 0xA018,
110     kFSMOffline = 0xA035,
111     kFSMSetFilLock = 0xA041,
112     kFSMRstFilLock = 0xA042,
113     kFSMSetFilType = 0xA043,
114     kFSMSetFPos = 0xA044,
115     kFSMFlushFile = 0xA045,
116     kFSMOpenWD = 0x0001,
117     kFSMCloseWD = 0x0002,
118     kFSMCatMove = 0x0005,
119     kFSMDirCreate = 0x0006,
120     kFSMGetWDInfo = 0x0007,
121     kFSMGetFCBInfo = 0x0008,
122     kFSMGetCatInfo = 0x0009,
123     kFSMSetCatInfo = 0x000A,
124     kFSMSetVolInfo = 0x000B,
125     kFSMLockRng = 0x0010,
126     kFSMUnlockRng = 0x0011,
127     kFSMXGetVolInfo = 0x0012,
128     kFSMCreateFileIDRef = 0x0014,
129     kFSMDeleteFileIDRef = 0x0015,
130     kFSMResolveFileIDRef = 0x0016,
131     kFSMExchangeFiles = 0x0017,
132     kFSMCatSearch = 0x0018,
133     kFSMOpenDF = 0x001A,
134     kFSMMakeFSSpec = 0x001B,
135     kFSMDTGetPath = 0x0020,
136     kFSMDTCloseDown = 0x0021,
137     kFSMDTAddIcon = 0x0022,
138     kFSMDTGetIcon = 0x0023,
139     kFSMDTGetIconInfo = 0x0024,
140     kFSMDTAddAPPL = 0x0025,
141     kFSMDTRemoveAPPL = 0x0026,
142     kFSMDTGetAPPL = 0x0027,
143     kFSMDTSetComment = 0x0028,
144     kFSMDTRemoveComment = 0x0029,
145     kFSMDTGetComment = 0x002A,
146     kFSMDTFlush = 0x002B,
147     kFSMDTReset = 0x002C,
148     kFSMDTGetInfo = 0x002D,
149     kFSMDTOpenInform = 0x002E,
150     kFSMDTDelete = 0x002F,
151     kFSMGetVolParms = 0x0030,
152     kFSMGetLogInInfo = 0x0031,
153     kFSMGetDirAccess = 0x0032,
154     kFSMSetDirAccess = 0x0033,
155     kFSMMapID = 0x0034,
156     kFSMMapName = 0x0035,
157     kFSMCopyFile = 0x0036,
158     kFSMMoveRename = 0x0037,
159     kFSMOpenDeny = 0x0038,
160     kFSMOpenRFDeny = 0x0039,
161     kFSMGetXCatInfo = 0x003A,
162     kFSMGetVolMountInfoSize = 0x003F,
163     kFSMGetVolMountInfo = 0x0040,
164     kFSMVolumeMount = 0x0041,
165     kFSMShare = 0x0042,
166     kFSMUnShare = 0x0043,
167     kFSMGetUGEntry = 0x0044,
168     kFSMGetForeignPrivs = 0x0060,
169     kFSMSetForeignPrivs = 0x0061
170     };
171    
172     // UTDetermineVol status values
173     enum {
174     dtmvError = 0,
175     dtmvFullPathname = 1,
176     dtmvVRefNum = 2,
177     dtmvWDRefNum = 3,
178     dtmvDriveNum = 4,
179     dtmvDefault = 5
180     };
181    
182     // Miscellaneous constants used by FSM
183     enum {
184     fsdVersion1 = 1,
185     fsmIgnoreFSID = 0xFFFE,
186     fsmGenericFSID = 0xFFFF
187     };
188    
189     // compInterfMask bits common to all FSM components
190     enum {
191     fsmComponentEnableBit = 31,
192     fsmComponentEnableMask = (long)0x80000000,
193     fsmComponentBusyBit = 30,
194     fsmComponentBusyMask = 0x40000000
195     };
196    
197     // compInterfMask bits specific to HFS component
198     enum {
199     hfsCIDoesHFSBit = 23,
200     hfsCIDoesHFSMask = 0x00800000,
201     hfsCIDoesAppleShareBit = 22,
202     hfsCIDoesAppleShareMask = 0x00400000,
203     hfsCIDoesDeskTopBit = 21,
204     hfsCIDoesDeskTopMask = 0x00200000,
205     hfsCIDoesDynamicLoadBit = 20,
206     hfsCIDoesDynamicLoadMask = 0x00100000,
207     hfsCIResourceLoadedBit = 19,
208     hfsCIResourceLoadedMask = 0x00080000,
209     hfsCIHasHLL2PProcBit = 18,
210     hfsCIHasHLL2PProcMask = 0x00040000,
211     hfsCIWantsDTSupportBit = 17,
212     hfsCIWantsDTSupportMask = 0x00020000
213     };
214    
215     // FCBRec.fcbFlags bits
216     enum {
217     fcbWriteBit = 0,
218     fcbWriteMask = 0x01,
219     fcbResourceBit = 1,
220     fcbResourceMask = 0x02,
221     fcbWriteLockedBit = 2,
222     fcbWriteLockedMask = 0x04,
223     fcbSharedWriteBit = 4,
224     fcbSharedWriteMask = 0x10,
225     fcbFileLockedBit = 5,
226     fcbFileLockedMask = 0x20,
227     fcbOwnClumpBit = 6,
228     fcbOwnClumpMask = 0x40,
229     fcbModifiedBit = 7,
230     fcbModifiedMask = 0x80
231     };
232    
233     // InformFSM messages
234     enum {
235     fsmNopMessage = 0,
236     fsmDrvQElChangedMessage = 1,
237     fsmGetFSIconMessage = 2
238     };
239    
240     // Messages passed to the fileSystemCommProc
241     enum {
242     ffsNopMessage = 0,
243     ffsGetIconMessage = 1,
244     ffsIDDiskMessage = 2,
245     ffsLoadMessage = 3,
246     ffsUnloadMessage = 4,
247     ffsIDVolMountMessage = 5,
248     ffsInformMessage = 6,
249     ffsGetIconInfoMessage = 7
250     };
251    
252     enum { // FSMGetIconRec struct
253     iconBufferPtr = 2,
254     requestSize = 6,
255     actualSize = 10,
256     iconType = 14,
257     isEjectable = 15,
258     driveQElemPtr = 16,
259     fileSystemSpecPtr = 20
260     };
261    
262     enum { // VolumeMountInfoHeader struct
263     vmiLength = 0,
264     vmiMedia = 2,
265     vmiFlags = 6,
266     SIZEOF_VolumeMountInfoHeader = 8
267     };
268    
269     enum { // GetVolParmsInfoBuffer struct
270     vMVersion = 0,
271     vMAttrib = 2,
272     vMLocalHand = 6,
273     vMServerAdr = 10,
274     vMVolumeGrade = 14,
275     vMForeignPrivID = 18,
276     SIZEOF_GetVolParmsInfoBuffer = 20
277     };
278    
279     // Finder Flags
280     enum { // FInfo struct
281     fdType = 0,
282     fdCreator = 4,
283     fdFlags = 8,
284     fdLocation = 10,
285     fdFldr = 14,
286     SIZEOF_FInfo = 16
287     };
288    
289     enum { // FXInfo struct
290     fdIconID = 0,
291     fdUnused = 2,
292     fdScript = 8,
293     fdXFlags = 9,
294     fdComment = 10,
295     fdPutAway = 12,
296     SIZEOF_FXInfo = 16
297     };
298    
299     enum { // HFileParam/HFileInfo struct
300     ioFRefNum = 24,
301     ioFVersNum = 26,
302     ioFDirIndex = 28,
303     ioFlAttrib = 30,
304     ioACUser = 31,
305     ioFlFndrInfo = 32,
306     ioDirID = 48,
307     ioFlStBlk = 52,
308     ioFlLgLen = 54,
309     ioFlPyLen = 58,
310     ioFlRStBlk = 62,
311     ioFlRLgLen = 64,
312     ioFlRPyLen = 68,
313     ioFlCrDat = 72,
314     ioFlMdDat = 76,
315     ioFlBkDat = 80,
316     ioFlXFndrInfo = 84,
317     ioFlParID = 100,
318     ioFlClpSiz = 104
319     };
320    
321     enum { // DInfo struct
322     frRect = 0,
323     frFlags = 8,
324     frLocation = 10,
325     frView = 14,
326     SIZEOF_DInfo = 16
327     };
328    
329     enum { // DXInfo struct
330     frScroll = 0,
331     frOpenChain = 4,
332     frScript = 8,
333     frXFlags = 9,
334     frComment = 10,
335     frPutAway = 12,
336     SIZEOF_DXInfo = 16
337     };
338    
339     enum { // HDirParam/DirInfo struct
340     ioDrUsrWds = 32,
341     ioDrDirID = 48,
342     ioDrNmFls = 52,
343     ioDrCrDat = 72,
344     ioDrMdDat = 76,
345     ioDrBkDat = 80,
346     ioDrFndrInfo = 84,
347     ioDrParID = 100
348     };
349    
350     enum { // WDParam struct
351     ioWDIndex = 26,
352     ioWDProcID = 28,
353     ioWDVRefNum = 32,
354     ioWDDirID = 48,
355     SIZEOF_WDParam = 52
356     };
357    
358     enum { // HVolumeParam struct
359     ioVolIndex = 28,
360     ioVCrDate = 30,
361     ioVLsMod = 34,
362     ioVAtrb = 38,
363     ioVNmFls = 40,
364     ioVBitMap = 42,
365     ioAllocPtr = 44,
366     ioVNmAlBlks = 46,
367     ioVAlBlkSiz = 48,
368     ioVClpSiz = 52,
369     ioAlBlSt = 56,
370     ioVNxtCNID = 58,
371     ioVFrBlk = 62,
372     ioVSigWord = 64,
373     ioVDrvInfo = 66,
374     ioVDRefNum = 68,
375     ioVFSID = 70,
376     ioVBkUp = 72,
377     ioVSeqNum = 76,
378     ioVWrCnt = 78,
379     ioVFilCnt = 82,
380     ioVDirCnt = 86,
381     ioVFndrInfo = 90
382     };
383    
384     enum { // CMovePBRec struct
385     ioNewName = 28,
386     ioNewDirID = 36
387     };
388    
389     enum { // FCBPBRec struct
390     ioFCBIndx = 28,
391     ioFCBFlNm = 32,
392     ioFCBFlags = 36,
393     ioFCBStBlk = 38,
394     ioFCBEOF = 40,
395     ioFCBPLen = 44,
396     ioFCBCrPs = 48,
397     ioFCBVRefNum = 52,
398     ioFCBClpSiz = 54,
399     ioFCBParID = 58
400     };
401    
402     // Volume control block
403     enum { // VCB struct
404     vcbFlags = 6,
405     vcbSigWord = 8,
406     vcbCrDate = 10,
407     vcbLsMod = 14,
408     vcbAtrb = 18,
409     vcbNmFls = 20,
410     vcbVBMSt = 22,
411     vcbAllocPtr = 24,
412     vcbNmAlBlks = 26,
413     vcbAlBlkSiz = 28,
414     vcbClpSiz = 32,
415     vcbAlBlSt = 36,
416     vcbNxtCNID = 38,
417     vcbFreeBks = 42,
418     vcbVN = 44,
419     vcbDrvNum = 72,
420     vcbDRefNum = 74,
421     vcbFSID = 76,
422     vcbVRefNum = 78,
423     vcbMAdr = 80,
424     vcbBufAdr = 84,
425     vcbMLen = 88,
426     vcbDirIndex = 90,
427     vcbDirBlk = 92,
428     vcbVolBkUp = 94,
429     vcbVSeqNum = 98,
430     vcbWrCnt = 100,
431     vcbXTClpSiz = 104,
432     vcbCTClpSiz = 108,
433     vcbNmRtDirs = 112,
434     vcbFilCnt = 114,
435     vcbDirCnt = 118,
436     vcbFndrInfo = 122,
437     vcbVCSize = 154,
438     vcbVBMCSiz = 156,
439     vcbCtlCSiz = 158,
440     vcbXTAlBlks = 160,
441     vcbCTAlBlks = 162,
442     vcbXTRef = 164,
443     vcbCTRef = 166,
444     vcbCtlBuf = 168,
445     vcbDirIDM = 172,
446     vcbOffsM = 176,
447     SIZEOF_VCB = 178
448     };
449    
450     // Working directory control block
451     enum { // WDCBRec struct
452     wdVCBPtr = 0,
453     wdDirID = 4,
454     wdCatHint = 8,
455     wdProcID = 12,
456     SIZEOF_WDCBRec = 16
457     };
458    
459     // File control block
460     enum { // FCBRec struct
461     fcbFlNm = 0,
462     fcbFlags = 4,
463     fcbTypByt = 5,
464     fcbSBlk = 6,
465     fcbEOF = 8,
466     fcbPLen = 12,
467     fcbCrPs = 16,
468     fcbVPtr = 20,
469     fcbBfAdr = 24,
470     fcbFlPos = 28,
471     fcbClmpSize = 30,
472     fcbBTCBPtr = 34,
473     fcbExtRec = 38,
474     fcbFType = 50,
475     fcbCatPos = 54,
476     fcbDirID = 58,
477     fcbCName = 62
478     };
479    
480     enum { // ParsePathRec struct
481     ppNamePtr = 0,
482     ppStartOffset = 4,
483     ppComponentLength = 6,
484     ppMoreName = 8,
485     ppFoundDelimiter = 9,
486     SIZEOF_ParsePathRec = 10
487     };
488    
489     enum { // HFSCIRec struct
490     compInterfMask = 0,
491     compInterfProc = 4,
492     log2PhyProc = 8,
493     stackTop = 12,
494     stackSize = 16,
495     stackPtr = 20,
496     idSector = 28,
497     SIZEOF_HFSCIRec = 40
498     };
499    
500     enum { // DICIRec struct
501     maxVolNameLength = 8,
502     blockSize = 10,
503     SIZEOF_DICIRec = 24
504     };
505    
506     enum { // FSDRec struct
507     fsdLink = 0,
508     fsdLength = 4,
509     fsdVersion = 6,
510     fileSystemFSID = 8,
511     fileSystemName = 10,
512     fileSystemSpec = 42,
513     fileSystemGlobalsPtr = 112,
514     fileSystemCommProc = 116,
515     fsdHFSCI = 132,
516     fsdDICI = 172,
517     SIZEOF_FSDRec = 196
518     };
519    
520     #endif