mirror of
https://github.com/nickshanks/ResKnife.git
synced 2025-01-03 04:31:27 +00:00
1 line
136 KiB
C
1 line
136 KiB
C
|
/*
File: MoreFilesExtras.h
Contains: A collection of useful high-level File Manager routines.
Version: Technology: MoreFiles
Release: 1.5.2
Copyright: <20> 1992-2001 by Apple Computer, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
/*
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.
*/
#ifndef __MOREFILESEXTRAS__
#define __MOREFILESEXTRAS__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#include "Optimization.h"
#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
/*****************************************************************************/
/*
** Bit masks and macros to get common information out of ioACUser returned
** by PBGetCatInfo (remember to clear ioACUser before calling PBGetCatInfo
** since some file systems don't bother to set this field).
**
** Use the GetDirAccessRestrictions or FSpGetDirAccessRestrictions
** functions to retrieve the ioACUser access restrictions byte for
** a folder.
**
** Note: The access restriction byte returned by PBGetCatInfo is the
** 2's complement of the user's privileges byte returned in
** ioACAccess by PBHGetDirAccess.
*/
enum {
/* mask for just the access restriction bits */
acUserAccessMask = (kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask + kioACUserNoMakeChangesMask), /* common access privilege settings */
acUserFull = 0x00, /* no access restiction bits on */
acUserNone = acUserAccessMask, /* all access restiction bits on */
acUserDropBox = kioACUserNoSeeFolderMask + kioACUserNoSeeFilesMask, /* make changes, but not see files or folders */
acUserBulletinBoard = kioACUserNoMakeChangesMask /* see files and folders, but not make changes */
};
/*****************************************************************************/
/*
** Deny mode permissions for use with the HOpenAware, HOpenRFAware,
** FSpOpenAware, and FSpOpenRFAware functions.
** Note: Common settings are the ones with comments.
*/
enum {
dmNone = 0x0000,
dmNoneDenyRd = fsRdDenyPerm,
dmNoneDenyWr = fsWrDenyPerm,
dmNoneDenyRdWr = (fsRdDenyPerm + fsWrDenyPerm),
dmRd = fsRdPerm, /* Single writer, multiple readers; the readers */
dmRdDenyRd = (fsRdPerm + fsRdDenyPerm),
dmRdDenyWr = (fsRdPerm + fsWrDenyPerm), /* Browsing - equivalent to fsRdPerm */
dmRdDenyRdWr = (fsRdPerm + fsRdDenyPerm + fsWrDenyPerm),
dmWr = fsWrPerm,
dmWrDenyRd = (fsWrPerm + fsRdDenyPerm),
dmWrDenyWr = (fsWrPerm + fsWrDenyPerm),
dmWrDenyRdWr = (fsWrPerm + fsRdDenyPerm + fsWrDenyPerm),
dmRdWr = fsRdWrPerm, /* Shared access - equivalent to fsRdWrShPerm */
dmRdWrDenyRd = (fsRdWrPerm + fsRdDenyPerm),
dmRdWrDenyWr = (fsRdWrPerm + fsWrDenyPerm), /* Single writer, multiple readers; the writer */
dmRdWrDenyRdWr = (fsRdWrPerm + fsR
|