DIRECTORY GVBasics USING [RName], IO USING [STREAM], Rope USING [ROPE], BasicTime USING [GMT, nullGMT], Thrush USING [EncryptionKey, nullKey, Tune, VoiceInterval]; VoiceRope: CEDAR DEFINITIONS = BEGIN ID: TYPE = Rope.ROPE; EncryptionKey: TYPE = Thrush.EncryptionKey; Handle: TYPE = Thrush.ThHandle; -- Means for communicating with voice rope manager. InitializeNuthatch: PROC[ userName: GVBasics.RName_NIL, logFileName: Rope.ROPE_NIL, RefIDType: Rope.ROPE_NIL, close: BOOL_TRUE] RETURNS [success: BOOL_TRUE, nuthatchUserHandle: NuthatchUserHandle]; CatalogVoiceFile: PROC[ nuthatchUserHandle: NuthatchUserHandle, voiceFileID: VoiceFileID, tuneNumber: INT, recordedTime: BasicTime.GMT, referenceCount: INT_ 0, samples: INT_ 0, startingSample: INT_ 0, encryptionKey: EncryptionKey_ NULL, time: BasicTime.GMT, type: Rope.ROPE ]; MakeInterestEntry: PROC[ nuthatchUserHandle: NuthatchUserHandle, voiceFileID: VoiceFileID_ NIL, refID: Rope.ROPE_ NIL, time: BasicTime.GMT_BasicTime.nullGMT] ; AddInterest: PROC[ nuthatchUserHandle: NuthatchUserHandle, voiceFileID: VoiceFileID _ NIL, --optional -- refID: Rope.ROPE_ NIL, time: BasicTime.GMT_BasicTime.nullGMT] ; -- Writes a log entry to increment the reference count for this voice file. If the voice message does not have an entry in the database, ignore it (can't tell till DB update time if that's so.) Either voiceFileID or RefID must be non-NIL. LoseInterest: PROC[ nuthatchUserHandle: NuthatchUserHandle, voiceFileID: VoiceFileID _ NIL, --optional -- refID: Rope.ROPE_ NIL, time: BasicTime.GMT_BasicTime.nullGMT] ; RemoveInterestEntry: PROC[ nuthatchUserHandle: NuthatchUserHandle, voiceFileID: VoiceFileID _ NIL, --optional -- refID: Rope.ROPE_ NIL, time: BasicTime.GMT_BasicTime.nullGMT] ; GetFileID: PROC[ ID: Rope.ROPE, nuthatchUserHandle: Nuthatch.NuthatchUserHandle] RETURNS [voiceFileID: VoiceFileID] ; GetTune: PROC[ voiceFileID: VoiceFileID] RETURNS [tune: Tune] ; GetDirectoryEntry: PROC [voiceFileID: VoiceFileID] RETURNS [ tuneNumber: Nuthatch.Tune_ -1, recordTime: BasicTime.GMT_BasicTime.nullGMT, creator: GVBasics.RName_ NIL, samples: INT_ -1, startSample: INT_ -1, expirationDate: BasicTime.GMT_BasicTime.nullGMT, encryptionKey: Nuthatch.EncryptionKey_Thrush.nullKey, type: Rope.ROPE_NIL , referenceCount: INT_ 0, found: BOOL_FALSE]; NHTime: PROC[time: BasicTime.GMT] RETURNS [nhTime: BasicTime.GMT]; currentNUH: NuthatchUserHandle; -- right now, there's just one of them. END. |File: VoiceRope.mesa Contents: Procedures for creating, recording, and playing voice ropes Procedures for managing the permanent storage and multi-user access to voice ropes. Last Edited by: Swinehart, November 2, 1984 4:40:45 pm PST InitializeNuthatch verifies that the nuthatch database is around and usable, and then looks for the user's log file. In nuthatchUserHandle, InitializeNuthatch initializes the logstream as the current log stream, userName as the current user, RefIDType as the current ID type for voice messages, and updateProcess as the identifier of the process that updates the database from the user's log. creator: GVBasics.RName, get this from current user name -- Sets up a new directory entry for a voice file if none exists, or updates the information about an old entry. -- refIDType: Rope.ROPE_ NIL, find this out from the user handle -- Writes a log entry to create an entry in the InterestList relation for this voice file, associating the RefID with the voiceFileID. refIDType: Rope.ROPE_ NIL, find this out from the user handle -- refIDType: Rope.ROPE_ NIL, find this out from the user handle -- Writes a log entry to decrement the reference count for this voice file. If the database has no record of this message containing voice, that's OK; it will be ignored. (Happens after doing an expunge in Walnut, for example.) refIDType: Rope.ROPE_ NIL, find this out from the user handle -- Writes a log entry to remove the entry in the InterestList relation for this voice file. Given the user's ID for a voice message, return its voiceFileID. -- Given the voiceFileID for a voice message, return its tune number. -- ÊߘJšœ™šœ ™ Jšœ;™;JšœT™TJ˜—Jšœ:™:J˜šÏk ˜ Jšœ œ ˜Jšœœœ˜Jšœœœ˜Jšœ œœ ˜!Jšœœ/˜;J˜—Jšœ œ œ˜J˜Jš˜J˜J˜Jšœœœ˜Jšœœ˜-J˜JšœœÏc3˜SJ˜J˜JšÏnœœ˜Jšœœ˜Jšœœœ˜Jšœœœ œœœ œœ*˜qJšœ‰™‰J˜šŸœœ˜J˜'—šœ<™<˜Jšœ œ˜Jšœœ˜Jšœœ˜Jšœ œ˜Jšœœ˜Jšœœ˜%J˜Jšœ œ˜J˜Jšœq™qJ˜——šŸœœ˜J˜'Jšœœ˜—šœ@™@Jšœ œœ˜šœœ˜)Jšœƒ™ƒJ˜——šŸ œœ˜J˜'Jšœœž ˜-—šœ@™@Jšœ œœ˜Jšœœžò˜œJ˜—šŸ œœ˜J˜'Jšœœž ˜-—šœ@™@Jšœ œœ˜šœœ˜)Jšœã™ãJ˜——šŸœœ˜J˜'Jšœœž ˜-šœ@™@Jšœ œœ˜šœœ˜)JšœX™XJ˜———šŸ œœ˜šœœ3œ˜eJšœE™EJ˜——šŸœœ˜šœœ˜1JšœE™EJ˜——šŸœœœ˜