home *** CD-ROM | disk | FTP | other *** search
Wrap
/* File: EPPC.h Copyright: © 1984-1994 by Apple Computer, Inc. All rights reserved. Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994. Bugs?: If you find a problem with this file, send the file and version information (from above) and the problem description to: Internet: apple.bugs@applelink.apple.com AppleLink: APPLE.BUGS */ #ifndef __EPPC__ #define __EPPC__ #ifndef __ERRORS__ #include <Errors.h> #endif /* #include <ConditionalMacros.h> */ #ifndef __PPCTOOLBOX__ #include <PPCToolbox.h> #endif /* #include <AppleTalk.h> */ /* #include <Types.h> */ /* #include <OSUtils.h> */ /* #include <MixedMode.h> */ /* #include <Memory.h> */ #ifndef __PROCESSES__ #include <Processes.h> #endif /* #include <Events.h> */ /* #include <Quickdraw.h> */ /* #include <QuickdrawText.h> */ /* #include <Files.h> */ #ifdef __cplusplus extern "C" { #endif #if GENERATINGPOWERPC #pragma options align=mac68k #endif #ifdef __CFM68K__ #pragma lib_export on #endif enum { kHighLevelEvent = 23, /* postOptions currently supported */ receiverIDMask = 0x0000F000, receiverIDisPSN = 0x00008000, receiverIDisSignature = 0x00007000, receiverIDisSessionID = 0x00006000, receiverIDisTargetID = 0x00005000, systemOptionsMask = 0x00000F00, nReturnReceipt = 0x00000200, priorityMask = 0x000000FF, nAttnMsg = 0x00000001, /* constant for return receipts */ HighLevelEventMsgClass = 'jaym', rtrnReceiptMsgID = 'rtrn', msgWasPartiallyAccepted = 2, msgWasFullyAccepted = 1, msgWasNotAccepted = 0 }; struct TargetID { long sessionID; PPCPortRec name; LocationNameRec location; PPCPortRec recvrName; }; typedef struct TargetID TargetID; typedef TargetID *TargetIDPtr, **TargetIDHandle, **TargetIDHdl; typedef TargetID SenderID; typedef SenderID *SenderIDPtr; struct HighLevelEventMsg { unsigned short HighLevelEventMsgHeaderLength; unsigned short version; unsigned long reserved1; EventRecord theMsgEvent; unsigned long userRefcon; unsigned long postingOptions; unsigned long msgLength; }; typedef struct HighLevelEventMsg HighLevelEventMsg; typedef HighLevelEventMsg *HighLevelEventMsgPtr, **HighLevelEventMsgHandle, **HighLevelEventMsgHdl; typedef pascal Boolean (*GetSpecificFilterProcPtr)(void *yourDataPtr, HighLevelEventMsgPtr msgBuff, const TargetID *sender); #if GENERATINGCFM typedef UniversalProcPtr GetSpecificFilterUPP; #else typedef GetSpecificFilterProcPtr GetSpecificFilterUPP; #endif enum { uppGetSpecificFilterProcInfo = kPascalStackBased | RESULT_SIZE(SIZE_CODE(sizeof(Boolean))) | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void*))) | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(HighLevelEventMsgPtr))) | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(TargetID*))) }; #if GENERATINGCFM #define NewGetSpecificFilterProc(userRoutine) \ (GetSpecificFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetSpecificFilterProcInfo, GetCurrentArchitecture()) #else #define NewGetSpecificFilterProc(userRoutine) \ ((GetSpecificFilterUPP) (userRoutine)) #endif #if GENERATINGCFM #define CallGetSpecificFilterProc(userRoutine, yourDataPtr, msgBuff, sender) \ CallUniversalProc((UniversalProcPtr)(userRoutine), uppGetSpecificFilterProcInfo, (yourDataPtr), (msgBuff), (sender)) #else #define CallGetSpecificFilterProc(userRoutine, yourDataPtr, msgBuff, sender) \ (*(userRoutine))((yourDataPtr), (msgBuff), (sender)) #endif extern pascal OSErr PostHighLevelEvent(const EventRecord *theEvent, unsigned long receiverID, unsigned long msgRefcon, Ptr msgBuff, unsigned long msgLen, unsigned long postingOptions) THREEWORDINLINE(0x3F3C, 0x0034, 0xA88F); extern pascal OSErr AcceptHighLevelEvent(TargetID *sender, unsigned long *msgRefcon, Ptr msgBuff, unsigned long *msgLen) THREEWORDINLINE(0x3F3C, 0x0033, 0xA88F); extern pascal OSErr GetProcessSerialNumberFromPortName(const PPCPortRec *portName, ProcessSerialNumber *pPSN) THREEWORDINLINE(0x3F3C, 0x0035, 0xA88F); extern pascal OSErr GetPortNameFromProcessSerialNumber(PPCPortRec *portName, const ProcessSerialNumber *pPSN) THREEWORDINLINE(0x3F3C, 0x0046, 0xA88F); extern pascal Boolean GetSpecificHighLevelEvent(GetSpecificFilterUPP aFilter, void *yourDataPtr, OSErr *err) THREEWORDINLINE(0x3F3C, 0x0045, 0xA88F); #ifdef __CFM68K__ #pragma lib_export off #endif #if GENERATINGPOWERPC #pragma options align=reset #endif #ifdef __cplusplus } #endif #endif /* __EPPC__ */