DIRECTORY Buttons, Containers, FinchSmarts USING [ ConvDesc ], IO, Labels, MBQueue USING [ Queue ], Menus, Rope USING [ ROPE ], TiogaButtons USING [ TiogaButton ], VFonts, ViewerClasses USING [ Viewer ], ViewerEvents USING [ EventRegistration ] ; FinchTool: CEDAR DEFINITIONS IMPORTS VFonts = { ROPE: TYPE = Rope.ROPE; Viewer: TYPE = ViewerClasses.Viewer; BuildDirectories: PROC []; DestroyDirectories: PROC []; BuildDirectory: PROC[directoryFile: Rope.ROPE, newOK: BOOL_TRUE]; FirstButton: PROC[ q: MBQueue.Queue, name: ROPE, proc: Buttons.ButtonProc, parent: Viewer, data: REF ANY_ NIL, border: BOOL_ FALSE, width: INTEGER_ 0, guarded: BOOL_ FALSE, font: VFonts.Font _ VFonts.defaultFont] RETURNS [nV: Viewer]; AnotherButton: PROC[ q: MBQueue.Queue, name: ROPE, proc: Buttons.ButtonProc, sib: Viewer, data: REF ANY_ NIL, border: BOOL_ FALSE, width: INTEGER_ 0, guarded: BOOL_ FALSE, font: VFonts.Font _ VFonts.defaultFont, newLine: BOOL_ FALSE] RETURNS [nV: Viewer]; Report: PROC[msg: ROPE, a1, a2, a3: IO.Value _ [null[]]]; ReportRope: PROC[msg1: ROPE]; Status: PROC[msg1, msg2, msg3, msg4: ROPE_NIL]; CheckAborted: PROC[sib: Viewer] RETURNS[ok: BOOL]; CheckActive: PROC[handle: Handle, mustAlreadyBeActive: BOOL_FALSE, complain: BOOL_TRUE] RETURNS [ active: BOOL_FALSE ]; GetSelectedDesc: PROC[chosenButton: TiogaButtons.TiogaButton_NIL, checkActive: BOOL_TRUE] RETURNS [cDesc: FinchSmarts.ConvDesc]; Stop: Menus.MenuProc; Hangup: Menus.MenuProc; StartFinch: PROC; StopFinch: PROC[disable: BOOL_TRUE]; CallByDescription: PROC[description: ROPE, residence: BOOL_FALSE]; FeepValue: PROC[text: ROPE] RETURNS [feepText: ROPE]; finchQueue: MBQueue.Queue; finchToolHandle: Handle; Handle: TYPE = REF FinchToolRec; -- a REF to the data for a particular instance of the sample tool; multiple instances can be created. FinchToolRec: TYPE = RECORD [ -- the data for a particular tool instance debug: BOOL_FALSE, -- currently controls intermediate speech reports outer: Containers.Container _ NIL, -- handle for the enclosing container calledPartyText: Viewer_NIL, callingPartyText: Viewer_NIL, typescript: Viewer _ NIL, -- typescript for Finch activities tsIn: IO.STREAM _ NIL, tsOut: IO.STREAM _ NIL, conversations: Viewer, -- Log of active and completed conversations logServiceCalls: LogServiceCalls _ $all, -- user can limit logging of service calls directories: LIST OF Viewer, -- White pages directories finchEnabledAtCheckpoint: BOOL_FALSE, -- retains state of enabling over Checkpoint/Rollback. finchEnabledAtLastReport: BOOL_FALSE, -- for avoiding multiple reports of same finchConnectedAtLastReport: BOOL_FALSE, -- condition inExecCmd: BOOL_FALSE, keepTwiddling: BOOL _ FALSE, -- TRUE while state = ringing, twiddleWait: CONDITION, finchToolHeight: NAT _ 64, pauseTimeTilted: INT_80, -- all times in milliseconds, all relate to Finch icon when pauseTimeMiddle: INT_0, -- phone is ringing pauseTimeOn: INT _ 4000, -- defaults to on all the time pauseTimeDrawFactor: INT _ 40, -- time to draw icons pauseTimeOff: INT _ 2000, scrollEvent: ViewerEvents.EventRegistration _ NIL, backgrounding: BOOL_FALSE ]; LogServiceCalls: TYPE = {none, one, all}; }. 4FinchTool.mesa Last Edited by: Swinehart, February 22, 1988 9:20:24 am PST Last Edited by: Lia, August 4, 1983 11:40 am Last Edited by: Pier, March 21, 1984 10:11:19 pm PST Polle Zellweger (PTZ) June 26, 1989 10:45:55 am PDT If check, make sure connection to Finch is active before returning result. description is a name or number; look for it everywhere that makes any sense. Residence is a hint, when description is a name, to use a home rather than office number. Place a call to resulting party. Polle Zellweger (PTZ) September 3, 1985 2:41:00 pm PDT Add debug field to control intermediate speech reports. changes to: FinchToolRec Swinehart, September 6, 1985 7:32:53 am PDT Eliminate status line in Finch Tool changes to: FinchToolRec Polle Zellweger (PTZ) October 16, 1985 4:41:39 pm PDT changes to: FinchToolRec Polle Zellweger (PTZ) July 29, 1987 8:05:18 pm PDT changes to: GetSelectedDesc, DIRECTORY Polle Zellweger (PTZ) August 13, 1987 2:30:14 pm PDT Add logServiceCalls to allow user to limit logging of service calls. changes to: FinchToolRec, FinchTool, LogServiceCalls Polle Zellweger (PTZ) August 14, 1987 5:32:41 pm PDT changes to: FinchToolRec Polle Zellweger (PTZ) June 26, 1989 10:45:10 am PDT Add scrollEvent to allow unregistering when the conv viewer disappears. changes to: DIRECTORY, FinchToolRec Κ˜J™Jšœ;™;JšΟk,™,™4Icodešœ3™3K™—š ˜ J˜J˜ Jšœ œ˜J˜J˜J˜J˜Jšœœœ˜Jšœ œ˜#Jšœ˜Jšœœ ˜Jšœ œ˜(J˜—J˜JšΠln œœ œœ ˜/J˜Jšœœœ˜Jšœœ˜$J˜J˜šΟnœœ˜J˜—JšŸœœ˜J˜Jš Ÿœœœ œœ˜AJ˜šŸ œœ˜Jšœœ+˜GJš œœœœ œœ œ˜;Jšœ œœ)˜=Jšœ˜—J˜šŸ œœ˜Jšœœ(˜DJš œœœœ œœ œ˜;Jš œ œœ3œœ˜SJšœ˜—J˜JšŸœœœ œ˜9JšŸ œœœ˜JšŸœœœœ˜/J˜JšŸ œœœœ˜2J˜JšŸ œœ&œœ œœœ œœ˜wJ˜š Ÿœœ(œœœœ˜€J™J—J˜JšŸœ˜JšŸœ˜J˜JšŸ œœ˜JšŸ œœ œœ˜$˜J™MJ™YJ™ —Jš Ÿœœœ œœ˜BJ˜Jš Ÿ œœœœ œ˜5J˜J˜J˜J˜IunitšœœœΟcΠck ]˜†procšœœœ +˜HJšœœœ 1˜EJšœœ %˜HJšœœ˜Jšœœ˜Jšœœ "˜