home *** CD-ROM | disk | FTP | other *** search
Wrap
/* File: EPPC.h Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved. WARNING This file was auto generated by the interfacer tool. Modifications must be made to the master file. */ #ifndef __EPPC__ #define __EPPC__ #ifndef __PPCTOOLBOX__ #include <PPCToolBox.h> /* #include <AppleTalk.h> */ /* #include <Types.h> */ /* #include <ConditionalMacros.h> */ /* #include <MixedMode.h> */ /* #include <Traps.h> */ /* #include <OSUtils.h> */ /* #include <Memory.h> */ #endif #ifndef __PROCESSES__ #include <Processes.h> /* #include <Events.h> */ /* #include <Quickdraw.h> */ /* #include <QuickdrawText.h> */ /* #include <IntlResources.h> */ /* #include <Files.h> */ /* #include <SegLoad.h> */ #endif #ifndef __EVENTS__ #endif #define HighLevelEventMsgClass 'jaym' #define rtrnReceiptMsgID 'rtrn' enum { kHighLevelEvent = 23, /* postOptions currently supported */ receiverIDMask = 0x0000F000, receiverIDisPSN = 0x00008000, receiverIDisSignature = 0x00007000, receiverIDisSessionID = 0x00006000, receiverIDisTargetID = 0x00005000, systemOptionsMask = 0x00000F00, nReturnReceipt = 0x00000200, priorityMask = 0x000000FF, nAttnMsg = 0x00000001, /* error returns from Post and Accept */ bufferIsSmall = -607, noOutstandingHLE = -608, connectionInvalid = -609, noUserInteractionAllowed = -610, /* no user interaction allowed */ /* constant for return receipts */ msgWasPartiallyAccepted = 2, msgWasFullyAccepted = 1, msgWasNotAccepted = 0 }; #if defined(powerc) || defined (__powerc) #pragma options align=mac68k #endif struct TargetID { long sessionID; PPCPortRec name; LocationNameRec location; PPCPortRec recvrName; }; #if defined(powerc) || defined(__powerc) #pragma options align=reset #endif typedef struct TargetID TargetID; typedef TargetID *TargetIDPtr, **TargetIDHdl; typedef TargetID SenderID; typedef SenderID *SenderIDPtr; #if defined(powerc) || defined (__powerc) #pragma options align=mac68k #endif struct HighLevelEventMsg { unsigned short HighLevelEventMsgHeaderLength; unsigned short version; unsigned long reserved1; EventRecord theMsgEvent; unsigned long userRefcon; unsigned long postingOptions; unsigned long msgLength; }; #if defined(powerc) || defined(__powerc) #pragma options align=reset #endif typedef struct HighLevelEventMsg HighLevelEventMsg; typedef HighLevelEventMsg *HighLevelEventMsgPtr, **HighLevelEventMsgHdl; #ifdef __cplusplus extern "C" { #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 PPCPortPtr portName, ProcessSerialNumberPtr pPSN) THREEWORDINLINE(0x3F3C, 0x0035, 0xA88F); extern pascal OSErr GetPortNameFromProcessSerialNumber(PPCPortPtr portName, const ProcessSerialNumberPtr pPSN) THREEWORDINLINE(0x3F3C, 0x0046, 0xA88F); #ifdef __cplusplus } #endif typedef pascal Boolean (*GetSpecificFilterProcPtr)(void *yourDataPtr, HighLevelEventMsgPtr msgBuff, const TargetID *sender); 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 USESROUTINEDESCRIPTORS typedef UniversalProcPtr GetSpecificFilterUPP; #define CallGetSpecificFilterProc(userRoutine, yourDataPtr, msgBuff, sender) \ CallUniversalProc((UniversalProcPtr)(userRoutine), uppGetSpecificFilterProcInfo, (yourDataPtr), (msgBuff), (sender)) #define NewGetSpecificFilterProc(userRoutine) \ (GetSpecificFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetSpecificFilterProcInfo, GetCurrentISA()) #else typedef GetSpecificFilterProcPtr GetSpecificFilterUPP; #define CallGetSpecificFilterProc(userRoutine, yourDataPtr, msgBuff, sender) \ (*(userRoutine))((yourDataPtr), (msgBuff), (sender)) #define NewGetSpecificFilterProc(userRoutine) \ (GetSpecificFilterUPP)(userRoutine) #endif #ifdef __cplusplus extern "C" { #endif extern pascal Boolean GetSpecificHighLevelEvent(GetSpecificFilterUPP aFilter, void *yourDataPtr, OSErr *err) THREEWORDINLINE(0x3F3C, 0x0045, 0xA88F); #ifdef __cplusplus } #endif #endif