; ; File: FileTransferMgr.a ; ; Written by: Carol Lee June 1988 ; ; Copyright: © 1987-1991, 1993 by Apple Computer, Inc., all rights reserved. ; ; Change History (most recent first): ; ; <2> 8/12/93 kc : I deleted all of the "TheFuture" conditionals in all of ; the CommToolbox files per Mike Bell's instructions. I also had ; to delete some old code that was compiled under the "CubeE" ; conditional. ; <7> 10/4/91 JSM Change PsychoticFarmerOrLater conditionals to TheFuture. ; <6> 10/2/91 DTY Conditionalise <4> and <5> out of CubeE. ; <5> 6/26/91 BH fixed FTReceive to call correct routine ; <4> 6/26/91 BH added FTSend and FTReceive ; <3> 8/27/90 kaz Use an offset table instead of a BRA table. ; <2> 7/10/90 dba add __ to distinguish glue from routines themselves ; <1> 3/14/90 BBH first checked in ; ; Pre BBS History ; ; 4/7/89 JNG Changed FTGetName to FTGetToolName ; 4/11/89 JNG Removed FTGetRefCon, FTSetRefCon, FTSetUserData, FTGetUserData, ; and FTGetVersion these are now in the CTBCore routines. ; 4/12/89 JNG Removed FTGetToolName to CTBCore ; 4/13/89 BBH Added FTMenu ; 4/17/89 JNG Moved FTValidate and FTDefault to CTBCore ; 4/20/89 BBH Moved lots of stuff into core. Setup, Intl, Script, Choose ; 4/24/89 JNG Moved FTResume FTEvent FTMenu FTAbort to ctbcore ; 4/24/89 BBH Modified FTNew and file transfer record to add environsProc ; 4/28/89 BBH Added FTNew's new parameter theFlags ; 6/2/89 JNG New Glue/Entry interface ; 6/26/89 BBH Added FTPChoose routine ; 8/14/89 BBH Added new constant curFTversion ; INCLUDE 'FileTransfers.a' INCLUDE 'CTBUtilities.a' INCLUDE 'Traps.a' INCLUDE 'CommToolboxPriv.a' MACRO _ExternalCore &selector _RealExternalCore &selector,#FTSel ENDM ;------------------------------------------------------------------------------------ ; ; A0.L -> pointer to the routine selector record ; ; D0.L -> function result ; ; FTEntry MAIN EXPORT IMPORT __InitFT, __FTNew, __FTDispose, __FTExec, __FTStart, __FTCleanup Import __FTSend, __FTReceive BRA.S start version DC.W curFTversion ; version start MOVE.W (A0), D1 ; routine selector ANDI.W #$FF, D1 ; bump the high byte SUB.W #1, D1 ; make it 0 based ADD.W D1, D1 ; 2 bytes per offset LEA FTList, A1 ; point to offset table ADD.W 0(A1,D1.W), A1 ; add the offset JMP (A1) ; go there FTList DC.W @InitFT - FTList; 1 DC.W @FTSetRefCon - FTList; 2 DC.W @FTGetRefCon - FTList; 3 DC.W @FTSetUserData - FTList; 4 DC.W @FTGetUserData - FTList; 5 DC.W @FTGetToolName - FTList; 6 DC.W @FTGetProcID - FTList; 7 DC.W @FTNew - FTList; 8 DC.W @FTDispose - FTList; 9 DC.W @FTExec - FTList; A DC.W @FTStart - FTList; B DC.W @FTCleanup - FTList; C DC.W @FTAbort - FTList; D DC.W @FTResume - FTList; E DC.W @FTValidate - FTList; F DC.W @FTDefault - FTList;10 DC.W @FTSetupPreflight - FTList;11 DC.W @FTSetupSetup - FTList;12 DC.W @FTSetupFilter - FTList;13 DC.W @FTSetupItem - FTList;14 DC.W @FTSetupCleanup - FTList;15 DC.W @FTGetConfig - FTList;16 DC.W @FTSetConfig - FTList;17 DC.W @FTIntlToEnglish - FTList;18 DC.W @FTEnglishToIntl - FTList;19 DC.W @FTGetVersion - FTList;1A DC.W @FTGetFTVersion - FTList;1B DC.W @FTChoose - FTList;1C DC.W @FTEvent - FTList;1D DC.W @FTSetupPostflight - FTList;1E DC.W @FTMenu - FTList;1F DC.W @FTActivate - FTList;20 DC.W @FTPChoose - FTList;21 DC.W @FTSetupXCleanup - FTList;22 DC.W @FTGetErrorString - FTList;23 DC.W @FTSend - FTList;24 DC.W @FTReceive - FTList;25 @FTSetRefCon ; 258 _ExternalCore #$40A @FTGetRefCon ; 259 _ExternalCore #$40B @FTSetUserData ; 260 _ExternalCore #$40C @FTGetUserData ; 261 _ExternalCore #$40D @FTGetVersion _ExternalCore #$40E @FTGetToolName ; 262 _ExternalCore #$40F @FTValidate ; 279 _ExternalCore #$410 @FTDefault ; 280 _ExternalCore #$411 @FTSetupPreflight _ExternalCore #$412 @FTSetupSetup _ExternalCore #$413 @FTSetupFilter _ExternalCore #$415 @FTSetupItem _ExternalCore #$414 @FTSetupXCleanup _ExternalCore #$427 @FTSetupCleanup _ExternalCore #$416 @FTSetupPostflight ; 299 _ExternalCore #$417 @FTGetConfig _ExternalCore #$418 @FTSetConfig _ExternalCore #$419 @FTIntlToEnglish _ExternalCore #$41A @FTEnglishToIntl _ExternalCore #$41B @FTChoose _ExternalCore #$41C @FTPChoose _ExternalCore #$426 @FTGetProcID ; 263 _ExternalCore #$41D @FTResume _ExternalCore #$41E @FTMenu _ExternalCore #$41F @FTEvent ; 298 _ExternalCore #$420 @FTActivate _ExternalCore #$421 @FTAbort _ExternalCore #$423 @FTGetErrorString _ExternalCore #$428 @InitFT CLR.W -(SP) ; make room JSR __InitFT MOVE.W (SP)+,D0 RTS @FTNew CLR.L -(SP) ; make room MOVE.W 38(A0), -(SP) ; theProcID MOVE.L 34(A0), -(SP) ; theFlags MOVE.L 30(A0), -(SP) ; theSendProc MOVE.L 26(A0), -(SP) ; theRecvProc MOVE.L 22(A0), -(SP) ; theReadProc MOVE.L 18(A0), -(SP) ; theWriteProc MOVE.L 14(A0), -(SP) ; theEnvironsProc MOVE.L 10(A0), -(SP) ; owner MOVE.L 6(A0), -(SP) ; theRefCon MOVE.L 2(A0), -(SP) ; theUserData JSR __FTNew MOVE.L (SP)+, D0 RTS @FTDispose MOVE.L 2(A0), -(SP) ; hFT JSR __FTDispose RTS @FTExec MOVE.L 2(A0), -(SP) ; hFT JSR __FTExec RTS @FTStart CLR.W -(SP) ; make room MOVE.L 8(A0), -(SP) ; hFT MOVE.W 6(A0), -(SP) ; what MOVE.L 2(A0), -(SP) ; fileInfo JSR __FTStart MOVE.W (SP)+, D0 RTS @FTCleanup CLR.W -(SP) ; make room MOVE.L 4(A0), -(SP) ; hFT MOVE.W 2(A0), -(SP) ; now JSR __FTCleanup MOVE.W (SP)+, D0 RTS @FTGetFTVersion LEA Version, A0 MOVE.W (A0), D0 ; put version number RTS @FTSend CLR.W -(SP) MOVE.L 12(a0),-(SP) ; hFT MOVE.W 10(A0),-(SP) ; numFiles MOVE.L 6(A0),-(SP) ; pFSpec MOVE.L 2(A0), -(SP) ; notifyProc JSR __FTSend MOVE.W (SP)+,D0 RTS @FTReceive CLR.W -(SP) MOVE.L 10(a0),-(SP) ; hFT MOVE.L 6(A0),-(SP) ; pFSpec MOVE.L 2(A0), -(SP) ; notifyProc JSR __FTReceive MOVE.W (SP)+,D0 RTS END