<> <> <> <> DIRECTORY Basics USING [ LongNumber, BITAND ], Lark, Thrush USING [ AlertKind, CallUrgency, ConversationHandle, ConvEventBody, Credentials, EncryptionKey, IntervalSpec, IntervalSpecs, NB, nullHandle, PartyHandle, PartyType, ProseSpecs, Reason, RingEnable, Rname, ROPE, SHHH, SmartsHandle, StateID, StateInConv, ThHandle, unencrypted, VoiceTime ], ThSmarts USING [ SmartsInterface, SmartsProperties ] ; ThParty: CEDAR DEFINITIONS IMPORTS Basics = { <> PartyHandle: TYPE = Thrush.PartyHandle; ConversationHandle: TYPE = Thrush.ConversationHandle; SmartsHandle: TYPE = Thrush.SmartsHandle; nullHandle: Thrush.ThHandle = Thrush.nullHandle; AlertKind: TYPE = Thrush.AlertKind; CallUrgency: TYPE = Thrush.CallUrgency; ConvEventBody: TYPE = Thrush.ConvEventBody; Credentials: TYPE = Thrush.Credentials; NB: TYPE = Thrush.NB; Reason: TYPE = Thrush.Reason; Rname: TYPE = Thrush.Rname; ROPE: TYPE = Thrush.ROPE; SHHH: TYPE = Thrush.SHHH; none: SHHH = Thrush.unencrypted; SmartsInterface: TYPE = ThSmarts.SmartsInterface; StateID: TYPE = Thrush.StateID; StateInConv: TYPE = Thrush.StateInConv; convClassMask: CARDINAL = 377B; <> <> <> <> <> Alert: PROC[ shhh: SHHH _ none, credentials: Credentials, state: StateInConv_initiating, -- IF reserved, reason specifies reason for cancelling prev. reason: Reason_wontSay, calledPartyID: PartyHandle_nullHandle, urgency: CallUrgency_normal, alertKind: AlertKind_standard, newConv: BOOL_FALSE, comment: ROPE_NIL ] RETURNS [nb: NB, convID: ConversationHandle ]; <> Advance: PROC[ shhh: SHHH _ none, credentials: Credentials, state: StateInConv, reason: Reason_wontSay, comment: ROPE_NIL ] RETURNS [nb: NB]; <> <> CreateConversation: PROC[ shhh: SHHH _ none, credentials: Credentials, urgency: CallUrgency_normal, alertKind: AlertKind_standard ] RETURNS [ nb: NB, convID: ConversationHandle ]; SameConvClass: PROC[convID1: ConversationHandle, convID2: ConversationHandle] RETURNS [sameClass: BOOL] = INLINE { ln1: Basics.LongNumber=LOOPHOLE[convID1]; ln2: Basics.LongNumber=LOOPHOLE[convID2]; IF ln1.lowbits#ln2.lowbits THEN RETURN[FALSE]; RETURN[ Basics.BITAND[ln1.highbits,convClassMask]=Basics.BITAND[ln2.highbits,convClassMask]]; }; MergeConversations: PROC[ shhh: SHHH _ none, credentials: Credentials, -- of surviving conversation otherStateID: StateID, -- of dissolving conversation otherConvID: ConversationHandle ] RETURNS [ nb: NB ]; OtherParty: PROC[ shhh: SHHH_none, credentials: Credentials ] RETURNS[ nb: NB, partyID: PartyHandle, description: Thrush.ROPE, conference: BOOL ]; < 2, description is best efforts description of who's in it with credentials.partyID, conference is TRUE.>> <<>> DescribeParty: PROC[ shh: SHHH_none, partyID: PartyHandle] RETURNS[ description: Thrush.ROPE ]; <> <<>> <> ConversationsForParty: PROC [ shh: SHHH_none, partyID: PartyHandle ]; <>>> <<>> <> <<>> SetIntervals: PROC[ shhh: SHHH _ none, credentials: Credentials, intervalSpecs: Thrush.IntervalSpecs -- a list allows some queueing at request site. ] RETURNS [ nb: NB ]; <> <<>> DescribeInterval: PROC[ shhh: SHHH _ none, credentials: Credentials, targetInterval: Thrush.IntervalSpec, minSilence: Thrush.VoiceTime _ 1 -- Smallest silent interval that will be considered silence. ] RETURNS [ nb: NB, exists: BOOL, intervals: Thrush.IntervalSpecs ]; RegisterKey: PROC[ shh: SHHH _ none, credentials: Credentials, key: Thrush.EncryptionKey ] RETURNS [ nb: NB, keyIndex: [0..17B] ]; <<>> <> <<>> SetProse: PROC[ shhh: SHHH _ none, credentials: Credentials, proseSpecs: Thrush.ProseSpecs -- a list allows some queueing at request site. ] RETURNS [ nb: NB ]; <<>> <> <> <> <> <> <> CreateParty: PROC[ shh: SHHH_none, rName: Rname_NIL, type: Thrush.PartyType ] RETURNS [partyID: PartyHandle]; GetParty: PROC[ shh: SHHH_none, partyID: PartyHandle, rName: Rname_NIL, type: Thrush.PartyType_individual ] RETURNS [newPartyID: PartyHandle]; <> <> <> Typical service names are "Recording", "Text-to-Speech", etc.>> <> <> GetPartyFromNumber: PROC[ shh: SHHH_none, partyID: PartyHandle, phoneNumber: Thrush.ROPE_NIL, description: ROPE_NIL, trunkOK: BOOL_TRUE ] RETURNS [newPartyID: PartyHandle]; <> GetPartyFromFeepNum: PROC[ shh: SHHH_none, partyID: PartyHandle, feepNum: Thrush.ROPE_NIL ] RETURNS [newPartyID: PartyHandle]; <> GetRname: PROC[shh: SHHH_none, partyID: PartyHandle] RETURNS [Rname: Thrush.Rname]; <> <> <> <> Register: PROC[shh: SHHH_none, partyID: PartyHandle, interface: SmartsInterface, properties: ThSmarts.SmartsProperties, oldSmartsID: SmartsHandle_nullHandle] RETURNS [smartsID: SmartsHandle]; RegisterClone: PROC[shh: SHHH_none, partyID: PartyHandle, clonePartyID: PartyHandle, oldSmartsID: SmartsHandle_nullHandle] RETURNS [smartsID: SmartsHandle]; Deregister: PROC[shh: SHHH_none, smartsID: SmartsHandle]; Enable: PROC[shh: SHHH_none, smartsID: SmartsHandle] RETURNS [nb: Thrush.NB]; <> Disable: PROC[shh: SHHH_none, smartsID: SmartsHandle] RETURNS [nb: Thrush.NB]; <> GetNumbersForRName: PROC[shh: SHHH_none, rName: ROPE] RETURNS [fullRName: ROPE, number: ROPE, homeNumber: ROPE]; <> SetRingEnable: PROC[shh: SHHH_none, partyID: PartyHandle, ringEnable: Thrush.RingEnable_noChange, ringInterval: INT_0, update: BOOL_FALSE]; }. <> <> <> <<>>