CodeFragmentInfoPriv.h [plain text]
#ifndef __CODEFRAGMENTINFOPRIV__
#define __CODEFRAGMENTINFOPRIV__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __CODEFRAGMENTS__
#include <CodeFragments.h>
#endif
#ifndef __CODEFRAGMENTCONTAINERPRIV__
#include <CodeFragmentContainerPriv.h>
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#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
typedef UInt8 CFragNotifyKind;
enum {
kCFragProcessStartNotify = 0x00,
kCFragProcessFinishNotify = 0x01,
kCFragPrepareClosureNotify = 0x10,
kCFragReleaseClosureNotify = 0x11,
kCFragInitRoutineNotify = 0x20,
kCFragTermRoutineNotify = 0x21,
kCFragInitFinishNotify = 0x22,
kCFragTermStartNotify = 0x23,
kCFragForgetAccRsrcNotify = 0x30,
kCFragRelocateAccRsrcNotify = 0x31
};
enum {
kCFragProcessNotifyMask = 0x00000001,
kCFragClosureNotifyMask = 0x00000002,
kCFragRoutineNotifyMask = 0x00000004,
kCFragAccRsrcNotifyMask = 0x00000008,
kCFragAllNotifyGroups = 0x0000FFFF,
kCFragBroadcastNotifyMask = 0x00010000
};
struct CFragClosureNotifyInfo {
CFragClosureID closureID;
};
typedef struct CFragClosureNotifyInfo CFragClosureNotifyInfo;
struct CFragRoutineNotifyInfo {
CFragClosureID closureID;
CFragConnectionID connectionID;
};
typedef struct CFragRoutineNotifyInfo CFragRoutineNotifyInfo;
struct CFragAccRsrcNotifyInfo {
CFragClosureID closureID;
LogicalAddress oldAddress;
LogicalAddress newAddress;
};
typedef struct CFragAccRsrcNotifyInfo CFragAccRsrcNotifyInfo;
struct CFragNotifyInfo {
CFragNotifyKind notifyKind;
UInt8 reservedA;
UInt16 reservedB;
MPProcessID processID;
MPTaskID taskID;
UInt32 sequence;
UInt32 extraInfo;
UInt32 reservedC;
void * extension;
union {
CFragClosureNotifyInfo closureInfo;
CFragRoutineNotifyInfo routineInfo;
CFragAccRsrcNotifyInfo accRsrcInfo;
} u;
};
typedef struct CFragNotifyInfo CFragNotifyInfo;
enum {
kCFragNotifyInfoVersion = 0x00010001
};
typedef UInt8 CFragNotifyMethod;
enum {
kCFragNotifyByMessage = 0,
kCFragNotifyByCallback = 1
};
typedef CALLBACK_API_C( OSStatus , CFragNotifyProc )(const CFragNotifyInfo *notifyInfo, void *refCon);
struct CFragRequestByMessageInfo {
MPQueueID notifyQueue;
void * refCon;
};
typedef struct CFragRequestByMessageInfo CFragRequestByMessageInfo;
struct CFragRequestByCallbackInfo {
CFragNotifyProc notifyProc;
void * refCon;
};
typedef struct CFragRequestByCallbackInfo CFragRequestByCallbackInfo;
struct CFragNotifyRequestInfo {
CFragNotifyMethod notifyMethod;
UInt8 reservedA;
UInt16 reservedB;
OptionBits options;
PBVersion infoVersion;
union {
CFragRequestByMessageInfo messageNotify;
CFragRequestByCallbackInfo callbackNotify;
} u;
};
typedef struct CFragNotifyRequestInfo CFragNotifyRequestInfo;
enum {
kCFragNotifyRequestInfoVersion = 0x00010001
};
extern OSStatus
CFragRequestNotifyByMessage(
MPProcessID processID,
MPQueueID queueID,
void * refCon,
OptionBits options,
PBVersion infoVersion);
extern OSStatus
CFragCancelNotifyByMessage(
MPProcessID processID,
MPQueueID queueID,
void * refCon);
extern OSStatus
CFragRequestNotifyByCallback(
MPProcessID processID,
CFragNotifyProc notifyProc,
void * refCon,
OptionBits options,
PBVersion infoVersion);
extern OSStatus
CFragCancelNotifyByCallback(
MPProcessID processID,
CFragNotifyProc notifyProc,
void * refCon);
extern OSStatus
CFragGetNotifyRequestInfo(
MPProcessID processID,
ItemCount requestedCount,
ItemCount skipCount,
ItemCount * totalCount_o,
PBVersion infoVersion,
CFragNotifyRequestInfo * notifyRequests_o);
struct CFragMemoryLocator {
MPAddressSpaceID spaceID;
LogicalAddress address;
ByteCount length;
};
typedef struct CFragMemoryLocator CFragMemoryLocator;
struct CFragFileBasedLocator {
FSRef * fileRef;
};
typedef struct CFragFileBasedLocator CFragFileBasedLocator;
struct CFragDataForkLocator {
FSRef * fileRef;
ByteCount offset;
ByteCount length;
};
typedef struct CFragDataForkLocator CFragDataForkLocator;
struct CFragResourceLocator {
FSRef * fileRef;
OSType rsrcType;
UInt16 reservedA;
SInt16 rsrcID;
};
typedef struct CFragResourceLocator CFragResourceLocator;
struct CFragNamedFragmentLocator {
CFragUsage usage;
UInt8 reservedA;
UInt16 reservedB;
CFragArchitecture architecture;
CFragVersionNumber preferredVersion;
CFragVersionNumber oldestVersion;
StringPtr libraryName;
};
typedef struct CFragNamedFragmentLocator CFragNamedFragmentLocator;
enum {
kCFragLocatorVersion = 0x00010001
};
struct CFragLocator {
UInt16 reservedA;
UInt8 reservedB;
CFragLocatorKind where;
UInt32 reservedC;
union {
CFragMemoryLocator inMemory;
CFragFileBasedLocator inFile;
CFragDataForkLocator inDataFork;
CFragResourceLocator inResource;
CFragNamedFragmentLocator asNamed;
} u;
};
typedef struct CFragLocator CFragLocator;
enum {
kCFragContainerInfoVersion = 0x00010001
};
struct CFragContainerInfo {
CFragContainerID containerID;
MPAddressSpaceID spaceID;
LogicalAddress address;
ByteCount length;
CFContHandlerProcs * handlerProcs;
CFContHandlerRef handlerRef;
ItemCount connectionRefCount;
ItemCount sectionCount;
ItemCount exportCount;
UInt8 updateLevel;
UInt8 reservedA;
UInt16 reservedB;
CFContLogicalLocation mainSymbol;
CFContLogicalLocation initRoutine;
CFContLogicalLocation termRoutine;
UInt32 reservedC;
UInt32 reservedD;
Str63 name;
CFragLocator locator;
FSRef fileRef;
};
typedef struct CFragContainerInfo CFragContainerInfo;
enum {
kCFragProcessInfoVersion = 0x00010001
};
struct CFragProcessInfo {
MPProcessID processID;
ItemCount closureCount;
ItemCount connectionCount;
CFragClosureID mainClosure;
};
typedef struct CFragProcessInfo CFragProcessInfo;
typedef SInt8 CFragConnectionState;
enum {
kInitializedCFragState = 3,
kInInitFuncCFragState = 2,
kResolvedCFragState = 1,
kNewbornCFragState = 0,
kTermPendingCFragState = -1,
kInTermFuncCFragState = -2,
kTerminatedCFragState = -3
};
enum {
kCFragClosureInfoVersion = 0x00010001
};
struct CFragClosureInfo {
MPProcessID processID;
CFragClosureID closureID;
CFragConnectionID rootConnectionID;
CFragLoadOptions options;
ItemCount connectionCount;
CFragConnectionState state;
UInt8 reservedA[3];
};
typedef struct CFragClosureInfo CFragClosureInfo;
enum {
kCFragHasUnresolvedImportsMask = 0x01,
kCFragConnectionInfoVersion = 0x00010001
};
struct CFragConnectionInfo {
MPProcessID processID;
CFragConnectionID connectionID;
CFragContainerID containerID;
CFContHandlerProcs * handlerProcs;
CFContHandlerRef handlerRef;
ItemCount closureRefCount;
ItemCount rootedClosureCount;
CFragConnectionID updateID;
CFragConnectionState state;
UInt8 flags;
UInt16 reservedA;
};
typedef struct CFragConnectionInfo CFragConnectionInfo;
enum {
kCFragSectionInfoVersion = 0x00010001
};
struct CFragSectionInfo {
LogicalAddress address;
ByteCount length;
CFContMemoryAccess access;
CFContSectionSharing sharing;
CFragConnectionState state;
UInt8 reservedA;
ItemCount connectionRefCount;
};
typedef struct CFragSectionInfo CFragSectionInfo;
extern OSStatus
CFragGetContainersInSystem(
ItemCount requestedCount,
ItemCount skipCount,
ItemCount * totalCount_o,
CFragContainerID * containerIDs_o);
extern OSStatus
CFragGetClosuresInProcess(
MPProcessID processID,
ItemCount requestedCount,
ItemCount skipCount,
ItemCount * totalCount_o,
CFragClosureID * closureIDs_o);
extern OSStatus
CFragGetConnectionsInProcess(
MPProcessID processID,
ItemCount requestedCount,
ItemCount skipCount,
ItemCount * totalCount_o,
CFragConnectionID * connectionIDs_o);
extern OSStatus
CFragGetConnectionsInClosure(
CFragClosureID closureID,
ItemCount requestedCount,
ItemCount skipCount,
ItemCount * totalCount_o,
CFragConnectionID * connectionIDs_o);
extern OSStatus
CFragGetConnectionsToContainer(
CFragContainerID containerID,
MPProcessID processID,
ItemCount requestedCount,
ItemCount skipCount,
ItemCount * totalCount_o,
CFragConnectionID * connectionIDs_o);
extern OSStatus
CFragGetContainerInfo(
CFragContainerID containerID,
PBVersion version,
CFragContainerInfo * info_o);
extern OSStatus
CFragGetProcessInfo(
MPProcessID processID,
PBVersion version,
CFragProcessInfo * info_o);
extern OSStatus
CFragGetClosureInfo(
CFragClosureID closureID,
PBVersion version,
CFragClosureInfo * info_o);
extern OSStatus
CFragGetConnectionInfo(
CFragConnectionID connectionID,
PBVersion version,
CFragConnectionInfo * info_o);
extern OSStatus
CFragGetSectionInfo(
CFragConnectionID connectionID,
ItemCount sectionIndex,
PBVersion version,
CFragSectionInfo * info_o);
extern OSStatus
CFragFindOwnerOfAddress(
MPAddressSpaceID spaceID,
LogicalAddress address,
MPProcessID processHint,
CFragContainerID * containerID_o,
MPProcessID * processID_o,
CFragConnectionID * connectionID_o,
CFContSignedIndex * sectionIndex_o);
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif