<> <> <> DIRECTORY LoganBerry USING [ Entry ], Rope USING [ROPE], Thrush USING [EncryptionKey, Tune, VoiceInterval]; VoiceDB: CEDAR DEFINITIONS = { <> <<>> <> <> <> << >> <> <<>> VoiceDBHandle: TYPE = REF VoiceDBHandleRec; VoiceDBHandleRec: TYPE; <> Open: PROC[ dbName, instance, localName: Rope.ROPE_NIL ] RETURNS [ handle: VoiceDBHandle, openEc: ErrorCode_NIL, expl: Rope.ROPE ]; <> <> < ///Strowger/Tunes.df and ///Strowger.TunesRefs.df.>> <> <> <> <> <> Create: PROC[ handle: VoiceDBHandle, tune: INT, creator: Rope.ROPE_NIL, -- default is credentials of this machine. interval: Thrush.VoiceInterval_[], key: Thrush.EncryptionKey_NULL, otherAttributes: LoganBerry.Entry_NIL ] RETURNS [voiceFileID: Rope.ROPE, entry: LoganBerry.Entry]; <> <> Retain: PROC[ handle: VoiceDBHandle, voiceFileID: Rope.ROPE, refID: Rope.ROPE, refIDType: Rope.ROPE, -- provides interpretation for meaning of refID creator: Rope.ROPE_NIL, -- Default is this machine's credentials otherAttributes: LoganBerry.Entry _ NIL -- other things to store with this value ] RETURNS [entry: LoganBerry.Entry]; -- entire entry as entered in TuneRefDB <> Forget: PROC[ handle: VoiceDBHandle, refID: Rope.ROPE, refIDType: Rope.ROPE ]; <> Query: PROC [ handle: VoiceDBHandle, voiceFileID: Rope.ROPE_NIL, refID: Rope.ROPE_NIL, refIDType: Rope.ROPE_NIL ] RETURNS [ tune: Thrush.Tune, interval: Thrush.VoiceInterval, key: Thrush.EncryptionKey, voiceEntry: LoganBerry.Entry, refEntry: LoganBerry.Entry ]; <> <> <> Error: ERROR[ec: ErrorCode, explanation: Rope.ROPE_NIL]; <> ErrorCode: TYPE = ATOM; -- { <<$dbNotFound, -- A problem requiring administrative assistance.>> <<$invalid, -- A problem requiring administrative assistance.>> <> <<>> <<$notAvailable, -- Can occur at any time. Explanation may say why and how long.>> <<$communications, -- Can occur at any time. Attempt to reach data base failed due to communications problems. Should not occur when a local backup is specified.>> <<>> <<$voiceIDNotUnique, -- Each should be created but once>> <<$refIDNotFound, -- in a Forget operation.>> <<$clientError, -- Caller supplied a meaningless value or is executing an invalid or disallowed operation (writing a read-only Database, for instance).>> <<};>> }.