DIRECTORY MBQueue USING[Queue], Rope USING [ROPE]; WalnutRegistry: CEDAR DEFINITIONS = BEGIN WalnutState: TYPE = {unknown, active, stopped}; Event: TYPE = {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 c 1985 by Xerox Corporation. All rights reserved. Donahue, July 9, 1985 12:51:15 pm PDT Willie-Sue, July 12, 1985 9:55:25 am PDT 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 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 Κφ˜šΟb™Jšœ Οmœ1™