ResKnife/External/MoreFilesX/MoreFilesX.h

1 line
55 KiB
C
Raw Normal View History

2009-11-08 14:07:22 +00:00
/* File: MoreFilesX.h Contains: A collection of useful high-level File Manager routines which use the HFS Plus APIs wherever possible. Version: MoreFilesX 1.0 Copyright: <09> 1992-2002 by Apple Computer, Inc., all rights reserved. You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as "DSC Sample Code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes. File Ownership: DRI: Apple Macintosh Developer Technical Support Other Contact: For bug reports, consult the following page on the World Wide Web: http://developer.apple.com/bugreporter/ Technology: DTS Sample Code Writers: (JL) Jim Luther Change History (most recent first): <1> 1/25/02 JL MoreFilesX 1.0 Notes: What do those arrows in the documentation for each routine mean? --> The parameter is an input <-- The parameter is an output. The pointer to the variable where the output will be returned (must not be NULL). <** The parameter is an optional output. If it is not a NULL pointer, it points to the variable where the output will be returned. If it is a NULL pointer, the output will not be returned and will possibly let the routine and the File Manager do less work. If you don't need an optional output, don't ask for it. **> The parameter is an optional input. If it is not a NULL pointer, it points to the variable containing the input data. If it is a NULL pointer, the input is not used and will possibly let the routine and the File Manager do less work. */ #ifndef __MOREFILESX__ #define __MOREFILESX__ #ifndef __MACTYPES__ #include <MacTypes.h> #endif #ifndef __FINDER__ #include <Finder.h> #endif #ifndef __FILES__ #include <Files.h> #endif #ifndef __TEXTCOMMON__ #include <TextCommon.h> #endif #if PRAGMA_ONCE #pragma once #endif #ifdef __cplusplus extern "C" { #endif #if PRAGMA_IMPORT #pragma import on #endif #if PRAGMA_STRUCT_ALIGN #pragma options align=mac68k #elif PRAGMA_STRUCT_PACKPUSH #pragma pack(push, 2) #elif PRAGMA_STRUCT_PACK #pragma pack(2) #endif /*****************************************************************************/ #pragma mark ----- FinderInfo and ExtendedFinderInfo ----- /* * FSGetFinderInfo and FSSetFinderInfo use these unions for Finder information. */ union FinderInfo { FileInfo file; FolderInfo folder; }; typedef union FinderInfo FinderInfo; union ExtendedFinderInfo { ExtendedFileInfo file; ExtendedFolderInfo folder; }; typedef union ExtendedFinderInfo ExtendedFinderInfo; /*****************************************************************************/ #pragma mark ----- GetVolParmsInfoBuffer Macros ----- /* * Macros to get information out of GetVolParmsInfoBuffer. */ /* version 1 field getters */ #define GetVolParmsInfoVersion(volParms) \ ((volParms)->vMVersion) #define GetVolParmsInfoAttrib(volParms) \ ((volParms)->vMAttrib) #define GetVolParmsInfoLocalHand(volParms) \ ((volParms)->vMLocalHand) #define GetVolParmsInfoServerAdr(volParms) \ ((volParms)->vMServerAdr) /* version 2 field getters (assume zero result if version < 2) */ #define GetVolParmsInfoVolumeGrade(volParms) \ (((volParms)->vMVersion >= 2) ? (volParms)->vMVolumeGrade : 0) #define GetVolParmsInfoForeignPrivID(volParms) \ (((volParms)->vMVersion >= 2) ? (volParms)->vMForeignPrivID : 0) /* version 3 field getters (assume zero result if version < 3) */ #define GetVolParmsInfoExtendedAttributes(volParms) \ (((volParms)->vMVersion >= 3) ? (volParms)->vMExtendedAttributes : 0) /* attribute bits supported by all versions of GetVolParmsInfoBuffer */ #define VolIsNetworkVolume(volParms) \ ((volParms)->vMServerAdr != 0) #define VolHasLimitFCBs(volParms)