DIRECTORY MBQueue USING [Queue], Rope USING [ROPE]; WalnutRegistry: CEDAR DEFINITIONS = BEGIN WalnutState: TYPE = {unknown, initializing, active, stopped}; Event: TYPE = {unknown, initializing, started, stopped, mailRead, expungeComplete}; EventProc: TYPE = PROC[event: Event, clientData: REF ANY]; MsgEvent: TYPE = {firstRead, deleted, unDeleted}; MsgProc: TYPE = PROC[msgName: Rope.ROPE, event: MsgEvent, clientData: REF ANY]; MsgGroup: TYPE = ARRAY[0..MsgGroupSize) OF Rope.ROPE; MsgGroupSize: CARDINAL = 20; MsgGroupEvent: TYPE = {added, destroyed}; MsgGroupProc: TYPE = PROC[ msgGroup: REF MsgGroup, event: MsgGroupEvent, clientData: REF ANY]; MsgSetEvent: TYPE = {created, destroyed}; MsgSetProc: TYPE = PROC[msgSetName: Rope.ROPE, event: MsgSetEvent, clientData: REF ANY]; MoveProc: TYPE = PROC[ msgName: Rope.ROPE, fromMsgSet, toMsgSet: Rope.ROPE, clientData: REF ANY]; ProcSet: TYPE = RECORD[eventProc: EventProc ¬ NIL, eventProcData: REF ANY ¬ NIL, msgProc: MsgProc ¬ NIL, msgProcData: REF ANY ¬ NIL, msgGroupProc: MsgGroupProc ¬ NIL, msgGroupData: REF ANY ¬ NIL, msgSetProc: MsgSetProc ¬ NIL, msgSetData: REF ANY ¬ NIL, moveProc: MoveProc ¬ NIL, moveProcData: REF ANY ¬ NIL]; Registration: TYPE = REF; Register: PROC [procSet: ProcSet, queue: MBQueue.Queue] RETURNS[registration: Registration]; InvalidRegistration: ERROR; UnRegister: PROC [registration: Registration]; GetProcs: PROC[registration: Registration] RETURNS[procSet: ProcSet, queue: MBQueue.Queue]; CurrentWalnutState: PROC RETURNS[walnutState: WalnutState]; END.  WalnutRegistry.mesa Copyright Σ 1985, 1992 by Xerox Corporation. All rights reserved. Donahue, July 9, 1985 12:51:15 pm PDT Willie-Sue, December 29, 1986 5:51:20 pm PST Walnut Registry provides notification to outside clients of changes in Walnut databases. Walnut RegistryImpl can be run without running Walnut -- WalnutKernel imports it, rather than the other way around. Procedures registered with Walnut Registry are placed on the queue, using MBQueue.QueueClientAction, given in the registration when the database changes; clients are guaranteed that the procedures will be queued in the order in which the database changes that caused their invocation occurred. unknown means that Walnut has not notified the registry yet, initializing that Walnut is the process of getting itself started. Register a set of procedures to be invoked when the appropriate database changes occur. Return a registration that can be used to name the set Each of the procedures below will raise this error if given a registration that does not currently exist in the table of registered procedures Remove the procedures named by the registration Return the procedures named by the registration a quick and safe way to find out if Walnut has been loaded and if it is active or not Κ$•NewlineDelimiter –(cedarcode) style™šΟb™Jšœ Οeœ6™BJ™%Icode™,J™J™ΝJ™J™₯J™—šΟk ˜ KšœŸœ˜KšœŸœŸœ˜—K˜šœŸœŸ œ˜#KšŸ˜K˜šœ Ÿœ,˜=Jšœ€™€—K˜KšœŸœH˜SK˜Kš Οn œŸœŸœŸœŸœ˜:K˜Kšœ Ÿœ#˜1K˜Kš  œŸœŸœŸœŸœŸœ˜OK˜Kš œ ŸœŸœŸœŸœ˜5K˜KšœŸœ˜K˜KšœŸœ˜)K˜š  œŸœŸœ˜Kšœ Ÿœ-ŸœŸœ˜C—K˜Kšœ Ÿœ˜)K˜Kš   œŸœŸœŸœ"ŸœŸœ˜XK˜š œŸœŸœ˜Kš œŸœŸœŸœŸœ˜J—K˜šœ Ÿœ˜KšŸœŸœ˜"KšœŸœŸœŸœ˜KšœŸœ˜Kšœ ŸœŸœŸœ˜KšœŸœ˜!KšœŸœŸœŸœ˜KšœŸœ˜Kšœ ŸœŸœŸœ˜KšœŸœ˜KšœŸœŸœŸœ˜—K˜KšœŸœŸœ˜K˜š œŸœ*Ÿœ˜\Jšœ™—K˜šœŸœ˜JšœŽ™Ž—K˜š  œŸœ˜.Jšœ/™/—K˜š œŸœŸœ)˜[Jšœ/™/—J™š œŸœŸœ˜;J™U—K˜KšŸœ˜—K˜—…—<