<> <> <> <> <> <> <<>> DIRECTORY RefID USING [ID], Rope USING [ROPE], Thrush USING [Credentials, EncryptionKey, NB, none, nullID, nullKey, PartyID, SHHH] ; VoiceRopeServer: CEDAR DEFINITIONS = { <> <<>> VoiceRope: TYPE = REF VoiceRopeInterval; VoiceRopeInterval: TYPE = RECORD [ ropeID: Rope.ROPE, start: INT, length: INT ]; InterestClass: TYPE = Rope.ROPE; Users: TYPE = LIST OF Rope.ROPE; <<>> <> maxEnergy: INTEGER = (LAST[NAT])/2; EnergyRange: TYPE = [0..maxEnergy]; EnergySequence: TYPE = REF EnergySequenceRec; EnergySequenceRec: TYPE = RECORD [ s: SEQUENCE length: NAT OF EnergyRange ]; <<>> VoiceSample: TYPE = [0..256); VoiceBlock: TYPE = REF VoiceBlockRec; VoiceBlockRec: TYPE = RECORD [ s: PACKED SEQUENCE length: NAT OF VoiceSample ]; <<>> Interval: TYPE = RECORD[start, length: INT]; IntervalSpecs: TYPE = LIST OF Interval; <> <> <<>> Record: PROC[shhh: Thrush.SHHH _ Thrush.none, credentials: Thrush.Credentials, serviceID: RefID.ID, recordedParty: Thrush.PartyID _ Thrush.nullID, intID: CARD _ 0, queueIt: BOOL _ TRUE] RETURNS [nb: Thrush.NB, voiceRope: VoiceRope]; <> <<{ $recording, $started, intID } when recording begins.>> <<{ $recording, $finished, intID } when the recording of this interval has finished.>> <<{ $recording, $abandoned, intID } when all recording and playback actions ending with this interval has been flushed.>> <<>> Play: PROC[shhh: Thrush.SHHH _ Thrush.none, voiceRope: VoiceRope, credentials: Thrush.Credentials, serviceID: RefID.ID, intID: CARD _ 0, queueIt: BOOL _ TRUE] RETURNS [nb: Thrush.NB]; <> <<{ $recording/$playback, $started, intID } as the interval begins playing/recording.>> <<{ $recording/$playback, $scheduled, intID } as the interval is accepted for recording/playback, if there is already a list of pieces in the queue ahead of this request.>> <<{ $recording/$playback, $finished, intID } when the interval has finished.>> <<{ $recording/$playback, $abandoned, intID } when all recording and playback actions ending with this interval has been flushed.>> <<>> Stop: PROC[shhh: Thrush.SHHH _ Thrush.none, credentials: Thrush.Credentials, serviceID: RefID.ID] RETURNS [nb: Thrush.NB]; <> <> <<{ $recording, $abandoned, intID } as indicated above.>> <<>> <> <<>> Pause: PROC[shhh: Thrush.SHHH _ Thrush.none, credentials: Thrush.Credentials, serviceID: RefID.ID] RETURNS [nb: Thrush.NB]; <> <<>> Resume: PROC[shhh: Thrush.SHHH _ Thrush.none, credentials: Thrush.Credentials, serviceID: RefID.ID] RETURNS [nb: Thrush.NB]; <> <> <<>> <<>> <> <> <<>> <> <<>> Retain: PROC [shhh: Thrush.SHHH _ Thrush.none, callerRName: Rope.ROPE, vr: VoiceRope, class: InterestClass, refID: Rope.ROPE, other: Rope.ROPE _ NIL] RETURNS [nb: Thrush.NB]; <> Forget: PROC [shhh: Thrush.SHHH _ Thrush.none, vr: VoiceRope, class: InterestClass, refID: Rope.ROPE] RETURNS [nb: Thrush.NB]; <> GetByInterest: PROC [shhh: Thrush.SHHH _ Thrush.none, class: InterestClass, refID: Rope.ROPE] RETURNS [nb: Thrush.NB, voiceRope: VoiceRope]; <> <> <> <> Cat: PROC [shhh: Thrush.SHHH _ Thrush.none, callerRName: Rope.ROPE, vr1, vr2, vr3, vr4, vr5: VoiceRope _ NIL] RETURNS [nb: Thrush.NB, new: VoiceRope]; <> Substr: PROC [shhh: Thrush.SHHH _ Thrush.none, callerRName: Rope.ROPE, vr: VoiceRope, start: INT _ 0, len: INT _ LAST[INT]] RETURNS [nb: Thrush.NB, new: VoiceRope]; <> Replace: PROC [shhh: Thrush.SHHH _ Thrush.none, callerRName: Rope.ROPE, vr: VoiceRope, start: INT _ 0, len: INT _ LAST[INT], with: VoiceRope _ NIL] RETURNS [nb: Thrush.NB, new: VoiceRope]; <> <> Length: PROC [shhh: Thrush.SHHH _ Thrush.none, vr: VoiceRope] RETURNS [nb: Thrush.NB, len: INT]; <> <<>> DescribeRope: PROC [shhh: Thrush.SHHH _ Thrush.none, vr: VoiceRope, minSilence: INT _ -1] RETURNS [nb: Thrush.NB, length: INT, noise: IntervalSpecs]; <> GetEnergies: PROC [shhh: Thrush.SHHH _ Thrush.none, vr: VoiceRope, samplesPerSegment: [1..8000] _ 160] RETURNS [nb: Thrush.NB, energies: EnergySequence]; <> <> FetchBlock: PROC [shhh: Thrush.SHHH _ Thrush.none, vr: VoiceRope, start: INT, len: INT _ 8000, decrypt: BOOLEAN _ TRUE] RETURNS [nb: Thrush.NB, block: VoiceBlock]; <> <<>> StoreBlock: PROC [shhh: Thrush.SHHH _ Thrush.none, block: VoiceBlock, key: Thrush.EncryptionKey _ Thrush.nullKey] RETURNS [nb: Thrush.NB, voiceRope: VoiceRope]; <> <> <> <> SetPermissions: PROC [shhh: Thrush.SHHH _ Thrush.none, callerRName: Rope.ROPE, vr: VoiceRope, playAccess: Users, editAccess: Users] RETURNS [nb: Thrush.NB]; <> <<>> GetPermissions: PROC [shhh: Thrush.SHHH _ Thrush.none, vr: VoiceRope] RETURNS [nb: Thrush.NB, playAccess: Users, editAccess: Users]; <> <<>> }. <> <> <> <> <> <> <> <> <> <> <>