<> <> <> <> DIRECTORY BasicTime USING [ GMT ], IV, RefID USING [ ID ], RPC USING [ InterfaceName, ShortROPE ], Thrush USING [ ActionReport, AlertKind, CallUrgency, ConversationID, ConvEvent, Credentials, EncryptionKey, InterfaceSpec, KeyTable, NetAddress, NB, nullID, noAddress, PartyID, PartyType, Reason, ROPE, SHHH, SmartsID, StateInConv, unencrypted, VoiceSocket ], ThSmartsRpcControl ; ThParty: CEDAR DEFINITIONS = { <> ConversationID: TYPE = Thrush.ConversationID; PartyID: TYPE = Thrush.PartyID; SmartsID: TYPE = Thrush.SmartsID; nullID: RefID.ID = Thrush.nullID; Credentials: TYPE = Thrush.Credentials; NB: TYPE = Thrush.NB; ROPE: TYPE = Thrush.ROPE; SHHH: TYPE = Thrush.SHHH; none: SHHH = Thrush.unencrypted; SmartsInterfaceName: TYPE = RPC.InterfaceName; SmartsInterfaceRecord: TYPE = ThSmartsRpcControl.InterfaceRecord; SmartsProperties: TYPE=RECORD[ role: SmartsRole_NIL, netAddress: Thrush.NetAddress_Thrush.noAddress <> ]; <<>> SmartsRole: TYPE= ATOM; -- { $voiceTerminal, $controller, ? }; <> <> <<>> <> <> <> <> <<>> <> <<>> <> <<>> <> <<>> <> CreateConversation: PROC[ shhh: SHHH _ none, credentials: Credentials, state: Thrush.StateInConv_$initiating, urgency: Thrush.CallUrgency_NIL, -- $normal alertKind: Thrush.AlertKind_NIL, -- $standard reason: Thrush.Reason _ NIL, -- if present, state is probably $failed (to get error signals when no conversation was ever established.) comment: ROPE _ NIL, subject: Thrush.ROPE_NIL ] RETURNS [ nb: NB, convEvent: Thrush.ConvEvent ]; Alert: PROC[ shhh: SHHH _ none, credentials: Credentials, calledPartyID: PartyID_nullID, comment: ROPE_NIL ] RETURNS [nb: NB ]; <> Advance: PROC[ shhh: SHHH _ none, credentials: Credentials, state: Thrush.StateInConv, reportToAll: BOOL_FALSE, <> reason: Thrush.Reason_NIL, -- wontSay comment: ROPE_NIL ] RETURNS [nb: NB, convEvent: Thrush.ConvEvent ]; <> ReportAction: PROC[ shhh: SHHH _ none, report: Thrush.ActionReport, -- includes credentials (in other field) identifying the service party. reportToAll: BOOL _ FALSE, <> selfOnCompletion: BOOL_FALSE <> ] RETURNS [nb: NB, numReportsIssued: NAT_0]; <> <> <> <> <> <> <<] RETURNS [ nb: NB ];>> <<>> <> <<>> ConversationInfo: TYPE = RECORD [ <> subject: ROPE_NIL, urgency: Thrush.CallUrgency_NIL, alertKind: Thrush.AlertKind_NIL, startTime: BasicTime.GMT_TRASH, conferenceHost: Thrush.NetAddress_TRASH, numParties: NAT_TRASH, numActive: NAT_TRASH, numIdle: NAT_TRASH, originator: Thrush.PartyID _ TRASH <> ]; GetConversationInfo: PROC [ shh: SHHH_none, convID: ConversationID ] RETURNS [ <> nb: NB, -- one of $success, $noSuchConv cInfo: ConversationInfo ]; PartyInfo: TYPE = REF PartyInfoSeq; <> PartyInfoSeq: TYPE = RECORD [ numParties: NAT_0, -- number of valid entries in this sequence conferenceHost: Thrush.NetAddress_TRASH, -- needed for connection spec. stuff. parties: SEQUENCE len: NAT OF PartyInfoSpec ]; PartyInfoSpec: TYPE = RECORD [ partyID: PartyID_nullID, type: Thrush.PartyType_NIL, state: Thrush.StateInConv_$neverWas, -- of this party in the conversation <> <> name: Thrush.ROPE_NIL, -- owner, current name, or description, see below numConvs: NAT_TRASH, enabled: BOOL_TRASH, partyActive: BOOL_TRASH, socket: Thrush.VoiceSocket_TRASH -- in1 (tx1) socket template for voice terminal for this party ]; NameReq: TYPE = ATOM; -- { $owner, $current, $description, $address, $none }; <<$owner: RName of creator of this party; same as $current for telephone and individual parties; RName of trunk's owner for trunks; Idle service RName for services.>> <<$current: Current assignment; identity of party on the other end of a $trunk, or modified service name identifying user.>> <<$address: meaningless but same as $current for all but $trunk, where it's the phone number>> <<$description: dolled-up version of $current, suitable for framing, including all known names and numbers, for Finch and so on.>> GetPartyInfo: PROC [ shh: SHHH_none, credentials: Credentials, nameReq: NameReq_$current, allParties: BOOL_FALSE -- IF FALSE, just calling party; else all parties, calling party first ] RETURNS [ <> <> nb: NB, -- one of $success, $noSuchConv, $noSuchParty, $notInConv pInfo: PartyInfo ]; <> <> DescribeParty: PROC[partyID: Thrush.PartyID, nameReq: NameReq] RETURNS[nb: NB, description: Thrush.ROPE]; <> <<>> RegisterServiceInterface: PROC[ shhh: SHHH _ none, credentials: Credentials, interfaceSpecPattern: Thrush.InterfaceSpec ] RETURNS[nb: NB, interfaceSpec: Thrush.InterfaceSpec]; <> <> <> <> LookupServiceInterface: PROC[ shhh: SHHH _ none, credentials: Credentials, serviceParty: PartyID, type: RPC.ShortROPE ] RETURNS[nb: NB, interfaceSpec: Thrush.InterfaceSpec]; <> <> <<>> <> <<>> <> <> <> <> <<>> RegisterKey: PROC[ shh: SHHH _ none, credentials: Credentials, key: Thrush.EncryptionKey, reportNewKeys: BOOL_FALSE ] RETURNS [ nb: NB, keyIndex: [0..17B] ]; GetKeyTable: PROC [ shh: SHHH_none, credentials: Credentials ] RETURNS [ nb: NB, -- one of $success, $noSuchConv, $noSuchParty, $notInConv keyTable: Thrush.KeyTable ]; <<>> <> <> <> <> <> <> <> <> <> GetParty: PROC[ shh: SHHH_none, partyID: PartyID, rName: ROPE_NIL, type: Thrush.PartyType_NIL ] RETURNS [nb: NB, newPartyID: PartyID]; <> <> <> GetPartyFromNumber: PROC[ shh: SHHH_none, partyID: PartyID, phoneNumber: Thrush.ROPE_NIL, description: ROPE_NIL ] RETURNS [nb: NB, newPartyID: PartyID]; <> GetPartyFromFeepNum: PROC[ shh: SHHH_none, partyID: PartyID, feepNum: Thrush.ROPE_NIL ] RETURNS [nb: NB, newPartyID: PartyID]; <> GetCurrentParty: PROC[shh: SHHH_none, smartsID: SmartsID] RETURNS [nb: NB, partyID: Thrush.PartyID]; <> <> <<>> GetNumbersForRName: PROC[shh: SHHH_none, rName: ROPE] RETURNS [fullRName: ROPE, number: ROPE, homeNumber: ROPE]; <> <<>> <> <<>> <> < >> <> <> <> <> <> Register: PROC[ shh: SHHH_none, <> <> rName: ROPE_NIL, type: Thrush.PartyType_ $individual, <> clonePartyID: PartyID _ nullID, <> <> interface: SmartsInterfaceName, <> <> properties: SmartsProperties ] RETURNS [ nb: NB, credentials: Credentials ]; <> <> CheckIn: PROC[shh: SHHH_none, credentials: Credentials] RETURNS [nb: NB]; <> Deregister: PROC[shh: SHHH_none, smartsID: SmartsID] RETURNS [nb: NB]; <> Enable: PROC[shh: SHHH_none, smartsID: SmartsID] RETURNS [nb: Thrush.NB]; <> Disable: PROC[shh: SHHH_none, smartsID: SmartsID] RETURNS [nb: Thrush.NB]; <> }. <> <> <> <> <> <> <<>> <<>> <> <> <> <> <> <> <<>>