Important: The information in this document is obsolete and should not be used for new development.
LAPAddATQ
TheLAPAddATQ
function adds an entry to the AppleTalk Transition Queue.
FUNCTION LAPAddATQ (theATQEntry: ATQEntryPtr): OSErr;
theATQEntry
- A pointer to a record of type
ATQEntry
to be added to the AppleTalk Transition Queue.DESCRIPTION
You use theLAPAddATQ
function to add an entry for your application to the AppleTalk Transition Queue. Before you call theLAPAddATQ
function, you must create an AppleTalk Transition Queue entry record of typeATQEntry
that defines your entry. "The AppleTalk Transition Queue Entry" on page 10-25 describes theATQEntry
record. You provide a pointer to this record as the value of thetheATQEntry
parameter when you call theLAPAddATQ
function.In the
CallAddr
field of the AppleTalk Transition Queue entry record, you provide a pointer to a routine that the LAP Manager is to call when an AppleTalk transition event occurs. The LAP Manager calls your routine to notify you when any of the following events occurs:
- A process opens the .MPP driver.
- A process requests permission to close AppleTalk.
- A process closes the .MPP driver.
- A request to close AppleTalk is canceled. One of the routines pointed to by an entry in the AppleTalk Transition Queue denies permission to close AppleTalk, and so the request to do so is canceled.
- A process calls the
ATEvent
procedure or theATPreFlightEvent
function to send its own AppleTalk transition event to the entries in the AppleTalk Transition Queue.- A process reports that it is changing the flagship name.
- A process makes a request to change the flagship name.
- A request to change the flagship name is canceled. One process denies another's request to change the flagship name, and so the request is canceled.
- The network connectivity has changed. This transition event is sent if a node is connected to an AppleTalk network and, for some reason, a particular interconnected AppleTalk network is longer be reachable.
- The cable range for the current network has been changed.
- The speed of the CPU has been changed.
SPECIAL CONSIDERATIONS
You must allocate nonrelocatable memory for theATQEntry
record and not alter or manipulate this memory until you remove the AppleTalk Transition Queue entry from the transition queue using theLAPRmvATQ
function.When LAP Manager calls your transition event handler routine, the LAP Manager passes parameters to your routine using the C stack calling conventions, and expects your routine to return a result in register D0. If you write your transition event handler routine in Pascal, you must use an assembly glue code routine. For a sample glue code routine, see "Writing a Transition Event Handler Routine Using Pascal" beginning on page 10-10.
ASSEMBLY-LANGUAGE INFORMATION
From assembly language, you add an AppleTalk Transition Queue entry by placing a routine selector in the D0 register, placing a pointer to your AppleTalk Transition Queue entry in the A0 register, and executing a JSR instruction to an offset past the start of the LAP Manager. The start of the LAP Manager is contained in the global variableLAPMgrPtr
($B18). The offset to the LAP Manager routines is given by the constantLAPMgrCall
(2).
Registers on entry D0 23 A0 Pointer to AppleTalk Transition Queue entry
Registers on exit D0 Result code RESULT CODES
noErr 0 No error SEE ALSO
"Adding an Entry to the AppleTalk Transition Queue" on page 10-7 describes the process of creating an AppleTalk Transition Queue entry and adding it to the queue.For the details of each transition, see "How the LAP Manager Calls Your Transition Event Handler Routine" beginning on page 10-8.