<> <> <> <<>> <> <<>> DIRECTORY BasicTime USING [GMT, nullGMT], LoganBerry USING [Entry, OpenDB], RefID USING [nullID], Rope USING [ROPE], Thrush USING [EncryptionKey]; VoiceRopeDB: CEDAR DEFINITIONS = { <<>> Handle: TYPE = REF HandleRec; HandleRec: TYPE = RECORD [ voiceRopeDB: LoganBerry.OpenDB _ RefID.nullID, voiceInterestDB: LoganBerry.OpenDB _ RefID.nullID, voiceRopeDBName: Rope.ROPE, voiceInterestDBName: Rope.ROPE ]; TuneID: TYPE = INT; TuneList: TYPE = LoganBerry.Entry; Header: TYPE = LoganBerry.Entry; Interest: TYPE = LoganBerry.Entry; ID: TYPE = Rope.ROPE; VoiceRopeInfo: TYPE ~ RECORD[ vrID: ID _ NIL, -- unique ID of the voice rope length: INT _ -1, -- length of the voice rope (-1 denotes the whole thing) creator: Rope.ROPE _ NIL, -- an RName, e.g. "Terry.pa" timestamp: BasicTime.GMT _ BasicTime.nullGMT, -- time of creation struct: TuneList _ NIL -- the actual voice rope components ]; InterestInfo: TYPE ~ RECORD[ interestID: ID _ NIL, -- unique ID of the interest vrID: ID, -- unique ID of a voice rope class: Rope.ROPE, -- e.g. "TiogaVoice" refID: Rope.ROPE, -- e.g. "[Ivy]<>User>FileWithVoice.tioga" creator: Rope.ROPE _ NIL, -- actually an RName, e.g. "Terry.pa" timestamp: BasicTime.GMT _ BasicTime.nullGMT, -- time interest was registered data: Rope.ROPE _ NIL -- class-specific data ]; <> Error: ERROR [ec: ATOM, explanation: Rope.ROPE _ NIL]; <> Open: PROC [dbName: Rope.ROPE] RETURNS [handle: Handle _ NIL]; <> ReadVoiceRope: PROC [handle: Handle, ropeID: ID] RETURNS [header: Header, struct: TuneList]; <> WriteVoiceRope: PROC [handle: Handle, vr: VoiceRopeInfo] RETURNS [info: VoiceRopeInfo]; <> DeleteVoiceRope: PROC [handle: Handle, ropeID: ID]; <> AddInterest: PROC [handle: Handle, interest: InterestInfo] RETURNS [info: InterestInfo]; <> DropInterest: PROC [handle: Handle, interest: InterestInfo]; <> <> VoiceRopeContainingTune: PROC [handle: Handle, tune: INT] RETURNS [header: Header]; <> InterestInVoiceRope: PROC [handle: Handle, ropeID: ID] RETURNS [interest: Interest]; <> <<>> InterestForRef: PROC [handle: Handle, class: Rope.ROPE, refID: Rope.ROPE] RETURNS [interest: Interest]; <> EnumProc: TYPE = PROC [info: VoiceRopeInfo] RETURNS [continue: BOOLEAN _ TRUE]; EnumerateVoiceRopes: PROC [handle: Handle, start: ID _ NIL, proc: EnumProc]; <> InterestProc: TYPE = PROC [info: InterestInfo] RETURNS [continue: BOOLEAN _ TRUE]; EnumerateInterestClass: PROC [handle: Handle, class: Rope.ROPE, proc: InterestProc]; <> <> <> UnpackHeader: PROC [header: Header] RETURNS [info: VoiceRopeInfo]; <> <<>> UnpackInterest: PROC [interest: Interest] RETURNS [info: InterestInfo]; <> <> <> <<>> SimpleTuneList: PROC [tune: TuneID, start: INT, length: INT, key: Thrush.EncryptionKey] RETURNS [list: TuneList]; <> NextTuneOnList: PROC [list: TuneList] RETURNS [tune: TuneID, start: INT, length: INT, key: Thrush.EncryptionKey, rest: TuneList]; <> TuneListInterval: PROC [list: TuneList, start: INT _ 0, length: INT _ -1] RETURNS [new: TuneList]; <> }. <<>> <> <> <> <> <> <> <> <> <> <> <> <> <<>> <<>>