mac-rom/Libs/CommToolboxSrcs/ConnectionMgrGlue.a
Elliot Nunn 4325cdcc78 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 09:52:23 +08:00

537 lines
12 KiB
Plaintext

;
; File: ConnectionMgrGlue.a
;
; Contains: xxx put contents here xxx
;
; Written by: xxx put writers here xxx
;
; Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <1> 3/14/90 BBH first checked in
;
; To Do:
;
; File : CMGRGlue.a
;--------------------------------
;
; Glue for Connection Manager
;
; Written by Dean Wong May 1988
;
; Modified Oct 1988 Byron Han
; Added CMChoose routine
;
; (c) 1988 by Apple Computer, Inc. All rights reserved.
;
;
; MODIFICATION HISTORY :
;
; 4/7/89 JNG Changed CMGetConnName to CMGetTermName
; 4/11/89 JNG Changed CMGetRefCon, CMSetRefCon, CMGetUserData, CMSetUserData, CMGetVersion
; to trap into the CTBCore version of the call.
; 4/12/89 JNG Changed CMGetToolName to trap into CTBCore
; 4/17/89 JNG Removed CMValidate CMDefault to CTBCore
; 4/18/89 JNG Moved CMGetProcID to CTBCore
; 4/20/89 BBH Added MgrSel to CTBVersion
; Converted glue to direct setup, config, local, choose routines into core
; Accidentally left out commtooltrap from getconfig
; 4/24/89 JNG Moved CMResume CMMenu CMEvent CMActivate CMReset CMIdle
; CMAbort to CTBCore
; BBH Added support for CMGetConnEnvirons
; 5/24/89 JNG Change in Glue/Entry. Glue no longer mucks with all of the parameters.
; It now just removes the return address, pushes the selector, and pushes the
; return address back onto the stack. On return from the trap,
; 5/25/89 JNG Moved macros into CTBCore.a
; 6/2/89 JNG Finished glue changes.
; 6/26/89 BBH Added CMPChoose
;
; 1/26/90 BBH Fixed CMGetErrorString
INCLUDE 'Traps.a'
INCLUDE 'CommToolboxPriv.a'
; FUNCTION InitCM: CMErr;
; Major Selector -> 1;
; Minor Selector -> 1;
;
InitCM FUNC EXPORT
_CTBTrap #$101
EndCTBTrap #$2,W
ENDFUNC
; Procedure CMSetRefCon( hConn : ConnHandle; rC : Longint );
; Major Selector -> 1;
; Minor Selector -> 2;
;
CMSetRefCon PROC EXPORT
_CTBTrap #$102
EndCTBTrap #$A
ENDPROC
; Function CMGetRefCon( hConn : ConnHandle ) : Longint;
; Major Selector -> 1;
; Minor Selector -> 3;
;
CMGetRefCon FUNC EXPORT
_CTBTrap #$103
EndCTBTrap #$6,L
ENDFUNC
; Procedure CMSetUserData( hConn : ConnHandle; uD : Longint );
; Major Selector -> 1;
; Minor Selector -> 4;
;
CMSetUserData PROC EXPORT
_CTBTrap #$104
EndCTBTrap #$A
ENDPROC
; Function CMGetUserData( hConn : ConnHandle ) : Longint;
; Major Selector -> 1;
; Minor Selector -> 5;
;
CMGetUserData FUNC EXPORT
_CTBTrap #$105
EndCTBTrap #$6,L
ENDFUNC
; Procedure CMGetToolName( procID : Integer; VAR name : Str255 );
; Major Selector -> 1;
; Minor Selector -> 6;
;
CMGetToolName PROC EXPORT
_CTBTrap #$106
EndCTBTrap #$8
ENDPROC
; Function CMGetProcID( name : Str255 ) : Integer;
; Major Selector -> 1;
; Minor Selector -> 7;
;
CMGetProcID FUNC EXPORT
_CTBTrap #$107
EndCTBTrap #$6,W
ENDFUNC
; Function CMNew( theProcID : integer; theFlags : LONGINT; desiredSizes : BufferSizes;
; theRefcon : longint; theUserData : longint ) : ConnHandle;
; Major Selector -> 1;
; Minor Selector -> 8;
;
CMNew FUNC EXPORT
_CTBTrap #$108 ; Set up and call the trap
EndCTBTrap #$14,L ; Stuff result and return to caller
ENDFUNC
; Procedure CMDispose( hConn : ConnHandle );
; Major Selector -> 1;
; Minor Selector -> 9;
CMDispose PROC EXPORT
_CTBTrap #$109
EndCTBTrap #$6
ENDPROC
; Procedure CMIdle( hConn : ConnHandle );
; Major Selector -> 1;
; Minor Selector -> 10;
;
CMIdle PROC EXPORT
_CTBTrap #$10A
EndCTBTrap #$6
ENDPROC
; Function CMOpen( hConn : ConnHandle; theAsync : Boolean; completor : ProcPtr;
; timeout : longint ) : CMErr;
; Major Selector -> 1;
; Minor Selector -> B;
;
;
CMOpen FUNC EXPORT
_CTBTrap #$10B
EndCTBTrap #$10,W
ENDFUNC
; Function CMListen( hConn : ConnHandle; theAsync : Boolean; completor : ProcPtr;
; timeout : longint ) : CMErr;
; Major Selector -> 1;
; Minor Selector -> C;
;
CMListen FUNC EXPORT
_CTBTrap #$10C
EndCTBTrap #$10,W
ENDFUNC
; Function CMAccept( hConn : ConnHandle; accept : Boolean) : CMErr;
; Major Selector -> 1;
; Minor Selector -> D;
;
CMAccept FUNC EXPORT
_CTBTrap #$10D
EndCTBTrap #$8,W
ENDFUNC
; Function CMClose( hConn : ConnHandle; theAsync : Boolean; timeout:LONGINT;
; completor : ProcPtr;
; now : Boolean ) : CMErr;
; Major Selector -> 1;
; Minor Selector -> E;
;
CMClose FUNC EXPORT
_CTBTrap #$10E
EndCTBTrap #$12,W
ENDFUNC
; Function CMAbort( hConn : ConnHandle) : CMErr;
; Major Selector -> 1;
; Minor Selector -> F;
;
CMAbort FUNC EXPORT
_CTBTrap #$10F
EndCTBTrap #$6,W
ENDFUNC
; Function CMStatus( hConn : ConnHandle; var sizes : BufferSizes;
; Var flags : longint) : CMErr;
; Major Selector -> 1;
; Minor Selector -> 10;
;
CMStatus FUNC EXPORT
_CTBTrap #$110
EndCTBTrap #$E,W
ENDFUNC
; Function CMRead( hConn : ConnHandle; theBuffer : Ptr; Var toRead : longint;
; theChannel : integer; theAsync : Boolean;
; completor : ProcPtr; timeout : longint; VAR flags : INTEGER ) : CMErr;
; Major Selector -> 1;
; Minor Selector -> 11;
;
CMRead FUNC EXPORT
_CTBTrap #$111
EndCTBTrap #$1E,W
ENDFUNC
; Function CMWrite( hConn : ConnHandle; theBuffer : Ptr; Var toWrite : longint;
; theChannel : integer; theAsync : Boolean; timeout : longint;
; completor : ProcPtr; timeout : longint; flags : integer ) : CMErr;
; Major Selector -> 1;
; Minor Selector -> 12;
;
CMWrite FUNC EXPORT
_CTBTrap #$112
EndCTBTrap #$1C,W
ENDFUNC
; Procedure CMActivate( hConn : ConnHandle; act : Boolean );
; Major Selector -> 1;
; Minor Selector -> 13;
;
CMActivate PROC EXPORT
_CTBTrap #$113
EndCTBTrap #$8
ENDPROC
; Procedure CMResume( hConn : ConnHandle; res : Boolean );
; Major Selector -> 1;
; Minor Selector -> 14;
;
CMResume PROC EXPORT
_CTBTrap #$114
EndCTBTrap #$8
ENDPROC
; Function CMMenu( hConn : ConnHandle; menuID : integer; item : integer ) : Boolean;
; Major Selector -> 1;
; Minor Selector -> 15;
;
CMMenu PROC EXPORT
_CTBTrap #$115
EndCTBTrap #$A,B
ENDPROC
; Procedure CMReset( hConn : ConnHandle );
; Major Selector -> 1;
; Minor Selector -> 16;
;
CMReset PROC EXPORT
_CTBTrap #$116
EndCTBTrap #$6
ENDPROC
; Function CMValidate( hConn : ConnHandle ) : Boolean;
; Major Selector -> 1;
; Minor Selector -> 17;
;
CMValidate FUNC EXPORT
_CTBTrap #$117
EndCTBTrap #$6,B
ENDFUNC
; Procedure CMDefault( Var theConfig : Ptr; procID : integer; allocate : Boolean );
; Major Selector -> 1;
; Minor Selector -> 18;
CMDefault PROC EXPORT
_CTBTrap #$118
EndCTBTrap #$A
ENDPROC
; PROCEDURE CMSetupSetup( theProcID : integer; theConfig : Ptr; count : INTEGER;
; theDialog : DialogPtr; VAR magicCookie:LONGINT);
; Major Selector -> 1;
; Minor Selector -> 19;
;
CMSetupSetup FUNC EXPORT
_CTBTrap #$119
EndCTBTrap #$12
ENDFUNC
; Procedure CMSetupItem( procID : integer; theConfig : Ptr; count : INTEGER;
; theDialog : DialogPtr; Var theItem : integer;
; VAR magicCookie:LONGINT);
; Major Selector -> 1;
; Minor Selector -> 1A;
;
CMSetupItem PROC EXPORT
_CTBTrap #$11A
EndCTBTrap #$16
ENDPROC
; Procedure CMSetupCleanup( procID : integer; theConfig : Ptr; count : integer
; theDialog : DialogPtr; VAR magicCookie:LONGINT);
; Major Selector -> 1;
; Minor Selector -> 1B;
;
CMSetupCleanup PROC EXPORT
_CTBTrap #$11B
EndCTBTrap #$12
ENDPROC
; Procedure CMSetupXCleanup( procID : integer; theConfig : Ptr; count : integer
; theDialog : DialogPtr; OKed: BOOLEAN; VAR magicCookie:LONGINT);
; Major Selector -> 1;
; Minor Selector -> 2E;
;
CMSetupXCleanup PROC EXPORT
_CTBTrap #$12E
EndCTBTrap #$14
ENDPROC
; Function CMGetConfig( hConn : ConnHandle ) : Ptr;
; Major Selector -> 1;
; Minor Selector -> 1C;
CMGetConfig FUNC EXPORT
_CTBTrap #$11C
EndCTBTrap #$6,L
ENDFUNC
; Function CMSetConfig( hConn : ConnHandle; thePtr : Ptr ) : INTEGER;
; Major Selector -> 1;
; Minor Selector -> 1D;
;
CMSetConfig FUNC EXPORT
_CTBTrap #$11D
EndCTBTrap #$A,W
ENDFUNC
; Function CMIntlToEnglish( hConn : ConnHandle; inputPtr : Ptr; VAR outputPtr : Ptr;
; language : integer ) : integer;
; Major Selector -> 1;
; Minor Selector -> 30;
;
CMIntlToEnglish FUNC EXPORT
_CTBTrap #$11E
EndCTBTrap #$10,W
ENDFUNC
; Function CMEnglishToIntl( hConn : ConnHandle; inputPtr : Ptr; VAR outputPtr : Ptr;
; language : integer ) : integer;
; Major Selector -> 1;
; Minor Selector -> 1F;
;
CMEnglishToIntl FUNC EXPORT
_CTBTrap #$11F
EndCTBTrap #$A,W
ENDFUNC
; Function CMGetVersion( hConn : ConnHandle ) : Handle;
; Major Selector -> 1;
; Minor Selector -> 20;
;
CMGetVersion FUNC EXPORT
_CTBTrap #$120
EndCTBTrap #$6,L
ENDFUNC
; FUNCTION CMGetCMVersion : INTEGER;
; Major Selector -> 1;
; Minor Selector -> 21;
;
CMGetCMVersion FUNC EXPORT
_CTBTrap #$121
EndCTBTrap #$2,W
ENDFUNC
; Function CMSetupFilter(procID : INTEGER; theConfig : Ptr; count : INTEGER;
; theDialog : DialogPtr; VAR theEvent : EventRecord
; VAR theItem : INTEGER; VAR magicCookie:LONGINT) : Boolean;
; Major Selector -> 1;
; Minor Selector -> 22;
CMSetupFilter FUNC EXPORT
_CTBTrap #$122
EndCTBTrap #$1A,B
ENDFUNC
; FUNCTION CMSetupPreflight(procID : INTEGER; VAR magicCookie:LONGINT) : Handle;
; Major Selector -> 1;
; Minor Selector -> 23;
;
CMSetupPreflight FUNC EXPORT
_CTBTrap #$123
EndCTBTrap #$8,L
ENDFUNC
; Function CMChoose( VAR hConn : ConnHandle; where: Point; idleProc:ProcPtr) : INTEGER;
; Major Selector -> 1;
; Minor Selector -> 124 ;
;
CMChoose FUNC EXPORT
_CTBTrap #$124
EndCTBTrap #$E,W
ENDFUNC
; Function CMPChoose( VAR hConn : ConnHandle; where: Point; VAR cRec: ChooseRec) : INTEGER;
; Major Selector -> 1;
; Minor Selector -> 12D ;
;
CMPChoose FUNC EXPORT
_CTBTrap #$12D
EndCTBTrap #$E,W
ENDFUNC
;
; PROCEDURE CMBreak(hConn:ConnHandle; duration:LONGINT; async:BOOLEAN;
; completor:ProcPtr);
; Major Selector -> 1;
; Minor Selector -> 25;
;
CMBreak PROC EXPORT
_CTBTrap #$125
EndCTBTrap #$10
ENDPROC
; Function CMAddSearch( hConn : ConnHandle; theString: Str255;
; flags: INTEGER; callBack :ProcPtr) : LONGINT;
; Major Selector -> 1;
; Minor Selector -> 26;
;
CMAddSearch FUNC EXPORT
_CTBTrap #$126
EndCTBTrap #$10,L
ENDFUNC
;
; PROCEDURE CMRemoveSearch(hConn:ConnHandle; refnum: LONGINT);
; Major Selector -> 1;
; Minor Selector -> 27 dec;
CMRemoveSearch PROC EXPORT
_CTBTrap #$127
EndCTBTrap #$A
ENDPROC
;
; PROCEDURE CMClearSearch(hConn:ConnHandle);
; Major Selector -> 1;
; Minor Selector -> 28;
;
; RECORD
; Selector : INTEGER;
; hConn : ConnHandle;
; END
CMClearSearch PROC EXPORT
_CTBTrap #$128
EndCTBTrap #$6
ENDPROC
;
; FUNCTION CMIOKill(hConn : ConnHandle; which : INTEGER) : CMErr;
; Major Selector -> 1;
; Minor Selector -> 29;
CMIOKill FUNC EXPORT
_CTBTrap #$129
EndCTBTrap #$8,W
ENDFUNC
; Procedure CMEvent( hConn : ConnHandle; uD : Longint );
; Major Selector -> 1;
; Minor Selector -> 2A;
;
CMEvent PROC EXPORT
_CTBTrap #$12A
EndCTBTrap #$A
ENDPROC
; Procedure CMSetupPostflight( procID: INTEGER );
; Major Selector -> 1;
; Minor Selector -> 2B;
;
CMSetupPostflight PROC EXPORT
_CTBTrap #$12B
EndCTBTrap #$4
ENDPROC
; Function CMGetConnEnvirons( hConn : ConnHandle; VAR theEnvirons: ConnEnvironRec) : CMErr;
; Major Selector -> 1;
; Minor Selector -> 2C;
;
CMGetConnEnvirons FUNC EXPORT
_CTBTrap #$12C
EndCTBTrap #$A,W
ENDFUNC
END