DIRECTORY FS, LoganBerry USING [ Entry, OpenDB ], RefID USING [ nullID ], Rope USING [ ROPE ], VoiceUtils USING [ WhereToReport ] ; ThNet: CEDAR DEFINITIONS = { PD: TYPE = RECORD [ debug: BOOLEAN, -- Diagnostic and progress display encryptionRequested: BOOLEAN, -- Encrypt RPC encryptVoice: BOOLEAN, -- Separate decision; false for debugging only, please! defaultLarkReports: BOOLEAN_FALSE, -- If TRUE and debug, Lark events reported SOMEwhere. autoGVUpdate: BOOLEAN_FALSE, ringsInvalid: BOOL_TRUE, -- set to cause recreation of standard ring tunes tonesVolume: CARDINAL _ 2, defaultRingVolume: CARDINAL _ 2, subduedVolumeInterval: CARDINAL_1, feepVolume: CARDINAL _ 0, serviceGuaranteedReservationTime: INT_3, postIdleTimeout: NAT _ 10, -- in seconds (see ThPartyOpsImpl) nullKeyCorrectParity: BOOL _ TRUE, -- bad key indices won't kill Lark pollParties: BOOL _ TRUE, -- probe Parties at intervals pollPartiesInterval: INT _ 1, -- per-Parties Interval, in seconds. pollPartyTypes: LIST OF ATOM_NIL, -- possibly LIST[$telephone, $individual] toSmartsTimeoutOK: BOOL _ TRUE, toSmartsTimeout: CARDINAL _ 5 -- How long to give Smarts to respond to an RPC packet. ]; pd: REF PD; ROPE: TYPE=Rope.ROPE; WPListing: TYPE = LoganBerry.Entry; -- a list of keys and values. WPState: TYPE = REF WPStateBody; -- a handle for the database. WPStateBody: TYPE = RECORD [ db: LoganBerry.OpenDB_RefID.nullID, dbName: ROPE, howToComplain: VoiceUtils.WhereToReport_NIL ]; WhitePagesLookup: PROC[ wpState: WPState, name: ROPE, feep: BOOL_FALSE ] RETURNS [ listing: WPListing ]; WhitePagesEntry: PROC[ wpState: WPState, name: ROPE_NIL, key: ATOM_$officeNumber, feep: BOOL_FALSE, listing: WPListing_NIL ] RETURNS [fullRName: ROPE, entry: ROPE, newListing: WPListing]; WhitePagesEnter: PROC[wpState: WPState, listing: WPListing]; WhitePagesPrint: PUBLIC SAFE PROC[wpState: WPState, listing: WPListing]; NewListing: PROC RETURNS [WPListing] = INLINE { RETURN[NIL]; }; List: PROC[listing: WPListing, key: ATOM, value: Rope.ROPE]; InitWhitePagesDatabase: PUBLIC SAFE PROC[ fileName: ROPE_NIL, howToComplain: VoiceUtils.WhereToReport_$System] RETURNS[wpState: WPState_NIL]; CloseWhitePagesDatabase: PUBLIC SAFE PROC[ wpState: WPState, howToComplain: VoiceUtils.WhereToReport_$System] RETURNS[ok: BOOL_TRUE]; PhoneMap: TYPE = LIST OF PhoneMapEntry; PhoneMapEntry: TYPE = RECORD [ pattern: ROPE, replacement: ROPE ]; HowToDial: PROC[phoneNumber: ROPE, ownExtension: ROPE_NIL] RETURNS [whatToDial: ROPE, isLocalExtension: BOOLEAN]; FeepName: PROC[rName: ROPE] RETURNS [feepName: ROPE]; }. ThNet.mesa Last modified by D. Swinehart, July 6, 1987 2:30:46 pm PDT Ephemeral and Persistent data base services for Thrush Thrush-wide system control parameters. Otherwise, only reported if LarkControl window up for this Lark and debug=TRUE Default values for ringing -- too device-dependent, but life is hard. Types WhitePages These functions provide access to a simple "White Pages" database. This one is assumed to be keyed and sorted by RName and Name. They are at present used primarily for access by RName diddling. name must be in form rr.xxxxxxx Returns first listing for which name is a substring, case unimportant, of the listing If listing is provided, the appropriate field is extracted. Otherwise, a listing is first obtained from the database. Put in something new, or replace something old. This and the following provide a way to build database entries. Include an enumerator here, if anybody ends up wanting it outside the implementation. NIL for fileName defaults to User Profile values Telephone number interpretation Ê)˜Jšœ ™ Jšœ:™:J˜Jšœ6™6J˜šÏk ˜ J˜Jšœ œ˜#Jšœœ ˜Jšœœœ˜Jšœ œ˜"J˜J˜—Jšœœ˜J˜Jšœ&™&J˜šœœœ˜JšœœÏc"˜2Jšœœž˜,Jšœœž7˜Nšœœœž5˜XJšœJ™N—Jšœœ˜J™EJšœœœž1˜JJšœ œ˜Jšœœ˜ Jšœœ˜"Jšœ œ˜Jšœ"œ˜(Jšœœž"˜=Jšœœœž"˜EJšœ œœž˜7Jšœœž$˜BJš œœœœœž)˜KJšœœœ˜Jšœœž7˜UJ˜—šœœœ˜ J˜—™J˜Jšœœœ˜Jšœ œž˜AJšœ œž˜>šœ œœ˜Jšœ#˜#Jšœ˜ Jšœ(˜+Jšœ˜—J˜—™ J™Jšœ8™8JšœH™HJšœ@™@J˜š Ïnœœœœœœ˜hJšœ™J™U—J™šŸœœ˜Jšœœœœ˜:Jšœœœ˜(Jšœœ œ œ˜@J™v—J˜šŸœœ'˜