FinchRecording.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Swinehart, September 27, 1986 1:27:37 pm PDT
DIRECTORY
RefID USING [ ID, nullID ],
Thrush USING
[ ConversationID, EncryptionKey, KeyTable, NB, nullKey ],
VoiceTemp USING [ IntervalSpec, IntervalSpecs, VoiceTime ]
;
FinchRecording: CEDAR DEFINITIONS = {
Types
NB: TYPE = Thrush.NB;
RConvDesc: TYPE = REF RConvDescBody;
RConvDescBody: TYPE = RECORD [
Per-conveersation data relating to Playing and recording; an RConvDesc is found as the $RConvDesc property of a FinchSmarts.ConvDesc.props.
stateChange: CONDITION, -- for waiting for state of conversation to change.
pendingIntervals: VoiceTemp.IntervalSpecs ← NIL, -- requested, ~ finished or abandoned
voiceTempID: RefID.ID ← RefID.nullID, -- serviceID; See FinchRecordingImpl for the RPC interface.
keyTable: Thrush.KeyTable←NIL,
keysMightBeDistributed: CONDITION, -- for waiting for keys to distribute, see FinchRecordingImpl
keysDistributed: BOOLFALSE
];
Management of services
PlaybackTuneProc: TYPE = PROC [
convID: Thrush.ConversationID,
intervalSpec: VoiceTemp.IntervalSpec,
key: Thrush.EncryptionKey,
queueIt: BOOLTRUE,
failOK: BOOLFALSE -- playing is optional; leave connection open if tune doesn't exist.
] RETURNS [ started: BOOLFALSE, newConvID: Thrush.ConversationID ];
convID if non-null is a hint of a conversation that used to work. newConvID is the one used for this recording. It may well be gone by the time you can use it for anything, but it won't hurt anything either. If the conversation is still active the next time you call for playback, you'd better use it!
PlaybackTune: PlaybackTuneProc;
RecordTuneProc: TYPE = PROC[
convID: Thrush.ConversationID,
useIntervalSpec: VoiceTemp.IntervalSpec←NIL, -- if supplied, it's a request to extend and includes key index
useKey: Thrush.EncryptionKey ← Thrush.nullKey, -- useful only if useIntervalSpec#NI
queueIt: BOOLFALSE
]
RETURNS[
nb: NB,
intervalSpec: VoiceTemp.IntervalSpec,
key: Thrush.EncryptionKey,
newConvID: Thrush.ConversationID
];
This procedure waits until the recording is complete. While it is running, calls to the registered procedures may occur to inform the user of what's happening. Client is responsible for arranging process structures so that there is a process available to call StopTune while a call to RecordTune is still pending.
convID if non-null is a hint of a conversation that used to work. newConvID is the one used for this recording. It may well be gone by the time you can use it for anything, but it won't hurt anything either. If the conversation is still active the next time you call for playback, you'd better use it!
RecordTune: RecordTuneProc;
StopTuneProc: TYPE = PROC[ convID: Thrush.ConversationID ];
Terminates recording or playback of tune, if any. Causes any pending RecordTune to terminate and return.
StopTune: StopTuneProc;
DescribeIntervalProc: TYPE = PROC[
intervalSpec: VoiceTemp.IntervalSpec, -- if supplied, it's a request to extend and includes key index
minSilence: VoiceTemp.VoiceTime𡤁
]
RETURNS[
nb: NB,
length: INT,
intervals: VoiceTemp.IntervalSpecs
];
DescribeInterval: DescribeIntervalProc;
InitializeFinchRecording: PROC;
}.
Swinehart, September 25, 1986 11:01:44 am PDT
Derived from FinchSmarts; break out the recorded-voice operations., DIRECTORY, FinchRecording, NB, PlaybackTune