mac-rom/Interfaces/AIncludes/Connections.a

491 lines
7.6 KiB
Plaintext
Raw Normal View History

;_____________________________________________
; File: Connections.a
;
; Contains: Assember Interface to the Connection Manager
;
; Written by: Byron Han
;
; Copyright: <09> 1988-1991 by Apple Computer, Inc.
; All rights reserved.
;
; This file is used in these builds: BigBang
;
; Change History (most recent first):
;
; <12> 8/27/91 CH Made interface header consistent.
; <11> 8/20/91 BH remove CMSetupCleanup from public interfaces
; <10> 6/24/91 JNG Add cmConfigChanged; rename KillIO to IOKill; also <BBH> changed
; the conditional wrappers to conform to standards
; <9> 6/18/91 BH fix equate for cmIORecVersion
; <8> 6/18/91 BH move 1.1 stuff here
; <7> 1/30/91 gbm sab, #38: Change the <20>already including this file<6C> variable to
; all uppercase (for security reasons)
; <6> 1/14/91 CP Added cmStatusReserved0 bit to the flags field <BBH>
; <5> 6/4/90 BBH moved stuff to ConnectionsExtensions.a
; <2> 4/12/90 BBH added cmUserCancel
; <1> 3/14/90 BBH first checked in
;
; To Do:
;_____________________________________________
IF (&TYPE('__INCLUDINGCONNECTIONS__') = 'UNDEFINED') THEN
__INCLUDINGCONNECTIONS__ EQU 1
IF (&TYPE('__INCLUDINGCTBUTILITIES__') = 'UNDEFINED') THEN
INCLUDE 'CTBUtilities.a'
ENDIF
; current Connection Manager version
curCMVersion EQU 2
; current Connection Manager Environment Record version
curConnEnvRecVers EQU 0
; error codes
cmGenericError EQU -1
cmNoErr EQU 0
cmRejected EQU 1
cmFailed EQU 2
cmTimeOut EQU 3
cmNotOpen EQU 4
cmNotClosed EQU 5
cmNoRequestPending EQU 6
cmNotSupported EQU 7
cmNoTools EQU 8
cmUserCancel EQU 9
cmUnknownError EQU 11
; CMRecFlags / CMChannel
cmData EQU $00000001
cmCntl EQU $00000002
cmAttn EQU $00000004
cmDataNoTimeout EQU $00000010
cmCntlNoTimeout EQU $00000020
cmAttnNoTimeout EQU $00000040
cmDataClean EQU $00000100
cmCntlClean EQU $00000200
cmAttnClean EQU $00000400
cmNoMenus EQU $00010000 ; High word of CMRecFlags
cmQuiet EQU $00020000
cmConfigChanged EQU $00040000
; connection status
cmStatusOpening EQU $00000001
cmStatusOpen EQU $00000002
cmStatusClosing EQU $00000004
cmStatusDataAvail EQU $00000008
cmStatusCntlAvail EQU $00000010
cmStatusAttnAvail EQU $00000020
cmStatusDRPend EQU $00000040 ;data read pending
cmStatusDWPend EQU $00000080 ;data write pending
cmStatusCRPend EQU $00000100 ;cntl read pending
cmStatusCWPend EQU $00000200 ;cntl write pending
cmStatusARPend EQU $00000400 ;attn read pending
cmStatusAWPend EQU $00000800 ;attn write pending
cmStatusBreakPend EQU $00001000
cmStatusListenPend EQU $00002000
cmStatusIncomingCallPresent EQU $00004000
cmStatusReserved0 EQU $00008000
; CMSearchFlags
cmSearchSevenBit EQU $0001
; CMBuffers
cmDataIn EQU 0
cmDataOut EQU 1
cmCntlIn EQU 2
cmCntlOut EQU 3
cmAttnIn EQU 4
cmAttnOut EQU 5
cmRsrvIn EQU 6
cmRsrvOut EQU 7
cmFlagsEOM EQU $0001
ConnEnvironRec Record 0
version ds.w 1
baudRate ds.l 1
dataBits ds.w 1
channels ds.w 1
swFlowControl ds.b 1
hwFlowControl ds.b 1
flags ds.w 1
ConnEnvironRecSize EQU *
EndR
cmIOPBQType EQU 10
cmIOPBversion EQU 0
CMIOPB RECORD 0
qLink ds.l 1
qType ds.w 1 ; cmIOPBQType
hConn ds.l 1
theBuffer ds.l 1
count ds.l 1
flags ds.w 1
userCompletion ds.l 1
timeout ds.l 1
errCode ds.w 1
channel ds.w 1
asyncEOM ds.l 1
reserved1 ds.l 1
reserved2 ds.w 1
version ds.w 1 ; cmIOPBversion
refCon ds.l 1 ; for Application
toolData1 ds.l 1 ; for Tool
toolData2 ds.l 1 ; for Tool
CMIOPBSize EQU *
EndR
ConnRecord RECORD 0
procID ds.w 1
flags ds.l 1
errCode ds.w 1
refCon ds.l 1
userData ds.l 1
defProc ds.l 1
config ds.l 1
oldConfig ds.l 1
asyncEOM ds.l 1
reserved1 ds.l 1
reserved2 ds.l 1
cmPrivate ds.l 1
bufferArray ds.l 8
bufSizes ds.l 8
mluField ds.l 1
asyncCount ds.l 8
ConnRecordSize EQU *
EndR
InitCM EQU $101
CMSetRefCon EQU $102
CMGetRefCon EQU $103
CMSetUserData EQU $104
CMGetUserData EQU $105
CMGetToolName EQU $106
CMGetProcID EQU $107
CMNew EQU $108
CMDispose EQU $109
CMIdle EQU $10A
CMOpen EQU $10B
CMListen EQU $10C
CMAccept EQU $10D
CMClose EQU $10E
CMAbort EQU $10F
CMStatus EQU $110
CMRead EQU $111
CMWrite EQU $112
CMActivate EQU $113
CMResume EQU $114
CMMenu EQU $115
CMReset EQU $116
CMValidate EQU $117
CMDefault EQU $118
CMSetupSetup EQU $119
CMSetupItem EQU $11A
CMGetConfig EQU $11C
CMSetConfig EQU $11D
CMIntlToEnglish EQU $11E
CMEnglishToIntl EQU $11F
CMGetVersion EQU $120
CMGetCMVersion EQU $121
CMSetupFilter EQU $122
CMSetupPreflight EQU $123
CMChoose EQU $124
CMBreak EQU $125
CMAddSearch EQU $126
CMRemoveSearch EQU $127
CMClearSearch EQU $128
CMIOKill EQU $129
CMEvent EQU $12A
CMSetupPostflight EQU $12B
CMGetConnEnvirons EQU $12C
CMSetupXCleanup EQU $12E
CMGetErrorString EQU $12F
CMNewIOPB EQU $130
CMDisposeIOPB EQU $131
CMPBRead EQU $132
CMPBWrite EQU $133
CMPBIOKill EQU $134
MACRO
_InitCM
_CTBCall #InitCM
ENDM
MACRO
_CMNew
_CTBCall #CMNew
ENDM
MACRO
_CMDispose
_CTBCall #CMDispose
ENDM
MACRO
_CMListen
_CTBCall #CMListen
ENDM
MACRO
_CMAccept
_CTBCall #CMAccept
ENDM
MACRO
_CMIdle
_CTBCall #CMIdle
ENDM
MACRO
_CMOpen
_CTBCall #CMOpen
ENDM
MACRO
_CMClose
_CTBCall #CMClose
ENDM
MACRO
_CMAbort
_CTBCall #CMAbort
ENDM
MACRO
_CMStatus
_CTBCall #CMStatus
ENDM
MACRO
_CMRead
_CTBCall #CMRead
ENDM
MACRO
_CMWrite
_CTBCall #CMWrite
ENDM
MACRO
_CMActivate
_CTBCall #CMActivate
ENDM
MACRO
_CMResume
_CTBCall #CMResume
ENDM
MACRO
_CMMenu
_CTBCall #CMMenu
ENDM
MACRO
_CMIOKill
_CTBCall #CMIOKill
ENDM
MACRO
_CMReset
_CTBCall #CMReset
ENDM
MACRO
_CMSetRefCon
_CTBCall #CMSetRefCon
ENDM
MACRO
_CMGetRefCon
_CTBCall #CMGetRefCon
ENDM
MACRO
_CMSetUserData
_CTBCall #CMSetUserData
ENDM
MACRO
_CMGetUserData
_CTBCall #CMGetUserData
ENDM
MACRO
_CMGetToolName
_CTBCall #CMGetToolName
ENDM
MACRO
_CMGetProcID
_CTBCall #CMGetProcID
ENDM
MACRO
_CMGetConnEnvirons
_CTBCall #CMGetConnEnvirons
ENDM
MACRO
_CMGetVersion
_CTBCall #CMGetVersion
ENDM
MACRO
_CMGetCMVersion
_CTBCall #CMGetCMVersion
ENDM
MACRO
_CMValidate
_CTBCall #CMValidate
ENDM
MACRO
_CMDefault
_CTBCall #CMDefault
ENDM
MACRO
_CMSetupPreflight
_CTBCall #CMSetupPreflight
ENDM
MACRO
_CMSetupSetup
_CTBCall #CMSetupSetup
ENDM
MACRO
_CMSetupFilter
_CTBCall #CMSetupFilter
ENDM
MACRO
_CMSetupItem
_CTBCall #CMSetupItem
ENDM
MACRO
_CMSetupPostflight
_CTBCall #CMSetupPostflight
ENDM
MACRO
_CMGetConfig
_CTBCall #CMGetConfig
ENDM
MACRO
_CMSetConfig
_CTBCall #CMSetConfig
ENDM
MACRO
_CMIntlToEnglish
_CTBCall #CMIntlToEnglish
ENDM
MACRO
_CMEnglishToIntl
_CTBCall #CMEnglishToIntl
ENDM
MACRO
_CMChoose
_CTBCall #CMChoose
ENDM
MACRO
_CMBreak
_CTBCall #CMBreak
ENDM
MACRO
_CMAddSearch
_CTBCall #CMAddSearch
ENDM
MACRO
_CMRemoveSearch
_CTBCall #CMRemoveSearch
ENDM
MACRO
_CMClearSearch
_CTBCall #CMClearSearch
ENDM
MACRO
_CMEvent
_CTBCall #CMEvent
ENDM
MACRO
_CMSetupXCleanup
_CTBCall #CMSetupXCleanup
ENDM
MACRO
_CMGetErrorString
_CTBCall #CMGetErrorString
ENDM
MACRO
_CMNewIOPB
_CTBCall #CMNewIOPB
ENDM
MACRO
_CMDisposeIOPB
_CTBCall #CMDisposeIOPB
ENDM
MACRO
_CMPBRead
_CTBCall #CMPBRead
ENDM
MACRO
_CMPBWrite
_CTBCall #CMPBWrite
ENDM
MACRO
_CMPBIOKill
_CTBCall #CMPBIOKill
ENDM
ENDIF ; already included