<> <> <> <> DIRECTORY BasicTime USING [ GMT ], GVBasics USING [ Password ], IV, LoganBerry USING [ Entry ], RefID USING [ ID ], RPC USING [ InterfaceName, ShortROPE ], Thrush USING [ ActionReport, 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 <> ]; ConvType: TYPE = { none, interactive, meeting }; <<$none is used by some software to indicate that no type has yet been accommodated. See LarkOutImpl.>> <<$interactive is ordinary "full-duplex" conversation among 2 or more parties;>> <<$meeting is conversation involving one moderator, possibly one commentator, and n-c-1 auditors.>> <<>> SmartsRole: TYPE= ATOM; -- { $voiceTerminal, $controller, ? }; <> <> <<>> AccessList: TYPE = LIST OF ROPE; -- access control list for conversations <> Attributes: TYPE = LoganBerry.Entry; -- Property list <<>> <> <> <> <<$junk, $ifConvenient, $normal=NIL, $important, $urgent, $fire};>> <> <> <> <> <> <> <> <> <> <> <> <> <<>> <> <<>> <> <<>> <1 parties are already active in the conversation, else will enter a state where additional attempts to become active will fail until the requesting party leaves active participation.>> <<>> <> CreateConversation: PROC[ shhh: SHHH _ none, credentials: Credentials, state: Thrush.StateInConv_$initiating, reason: Thrush.Reason _ NIL, -- if present, state is probably $failed (to get error signals when no conversation was ever established.) comment: ROPE _ NIL, convAttributes: Attributes_NIL, -- added to conversation list partyAttributes: Attributes_NIL, -- added to own party list checkConflict: BOOL _ FALSE ] RETURNS [ nb: NB, convEvent: Thrush.ConvEvent ]; Alert: PROC[ shhh: SHHH _ none, credentials: Credentials, calledPartyID: PartyID_nullID, comment: ROPE_NIL, convAttributes: Attributes_NIL, partyAttributes: Attributes_NIL -- initializes alerted party's list! ] RETURNS [nb: NB ]; <> Advance: PROC[ shhh: SHHH _ none, credentials: Credentials, state: Thrush.StateInConv, reportToAll: BOOL_FALSE, <> reason: Thrush.Reason_NIL, -- wontSay comment: ROPE_NIL, convAttributes: Attributes_NIL, partyAttributes: Attributes_NIL, -- own bilateral: BOOL _ FALSE, -- no more than two active parties in this conversation, please, while this party is an active participant. checkConflict: BOOL _ FALSE -- The state we are advancing to will require that the associated voice hardware be in use; disallow transitions that would make this true of two different conversations for the same party (apply to poachees, inherit by poachers?) ] 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]; <> <<>> ConversationInfo: TYPE = REF ConversationInfoRec; ConversationInfoRec: TYPE = RECORD [ <> convID: Thrush.ConversationID_NULL, numParties: NAT_TRASH, numActive: NAT_TRASH, numIdle: NAT_TRASH, originator: Thrush.PartyID _ TRASH, conferenceHost: Thrush.NetAddress_TRASH, convType: ConvType_$none, -- meeting or interactive bilateralConv: BOOL _ FALSE, -- conversation restricted to two parties startTime: BasicTime.GMT_TRASH, convAttributes: Attributes_NIL, -- conversation-wide attributes moderator: Thrush.PartyID _ 0, -- not always the originator, for named conversations commentator: Thrush.PartyID _ 0 -- feedback channel party, for named conversations ]; <> GetConversationInfo: PROC [ shh: SHHH_none, convID: ConversationID ] RETURNS [ <> nb: NB, -- one of $success, $noSuchConv cInfo: ConversationInfo ]; <> <<>> RegisterConversation: PROC [ shhh: SHHH _ none, credentials: Credentials, -- partyID is owner, convID identifies conversation name: ROPE, -- Should be unique, but this is not yet enforced; may be some use convType: ConvType _ $meeting, -- default unregistered is $interactive convAttributes: Attributes _ NIL, -- Permits changing the subject, etc. accessList: AccessList _ NIL ] RETURNS [ nb: NB ]; GetConversationFromName: PROC [ shhh: SHHH _ none, partyID: PartyID, name: ROPE ] RETURNS [ nb: NB, cInfo: ConversationInfo ]; EnumerateNamedConversations: PROC [ shhh: SHHH _ none, partyID: PartyID ] RETURNS [ nb: NB, candidates: LIST OF ConversationInfo ]; <> <<>> PartyInfo: TYPE = REF PartyInfoSeq; <> nullIx: NAT = 0; PartyInfoSeq: TYPE = RECORD [ numParties: NAT_0, conversationInfo: ConversationInfoRec, -- description of overall conversation ixSelf: NAT_nullIx, -- index of own party in parties sequence ixOther: NAT _ nullIx, -- index of some other (active, if any) party, if any ixModerator: NAT_nullIx, -- index of moderator party ixCommentator: NAT_nullIx, -- index of talkBack (commentator) party ixCommSock: NAT_nullIx, -- index of party whose socket is in use as the commentator socket. ixOriginator: NAT_nullIx, -- index of originator party in parties sequence (needed?) parties: SEQUENCE len: NAT OF PartyInfoSpec -- and of individual parties ]; <> PartyInfoSpec: TYPE = RECORD [ partyID: PartyID_nullID, name: Thrush.ROPE_NIL, -- owner, current name, or description, see below <> intendedPartyID: PartyID_nullID, intendedName: Thrush.ROPE_NIL, type: Thrush.PartyType_NIL, state: Thrush.StateInConv_$neverWas, -- of this party in the conversation numConvs: NAT_0, enabled: BOOL_FALSE, voicePath: BOOL _ FALSE, -- TRUE iff this party can participate actively in conversations partyActive: BOOL_FALSE, -- actively involved in n-way conversation partyEngaged: BOOL_FALSE, -- hardware in use socket: Thrush.VoiceSocket_Thrush.noAddress, -- in1 (tx1) socket template this party's voice terminal partyAttributes: Attributes _ NIL ]; 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, type: Thrush.PartyType, partner: Thrush.PartyID_nullID, visitee: Thrush.PartyID_nullID, visitors: LIST OF Thrush.PartyID_NIL ]; <> <> AddAttributes: PROC[ credentials: Credentials, convAttributes: Attributes_NIL, partyAttributes: Attributes_NIL -- own ] RETURNS[nb: NB]; <> <<>> 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 ]; UnregisterKey: PROC[ shh: SHHH _ none, credentials: Credentials, key: Thrush.EncryptionKey ] RETURNS [ nb: NB ]; <<>> <> <> <> <> <> <> <> <> <> 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]; <> ReleaseParty: PROC[shh: SHHH_none, partyID: PartyID, targetPartyID: PartyID] RETURNS [nb: NB]; <> <<>> <> <<>> 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]; <> <<>> <> <<>> Visit: PROC[ shh: SHHH_none, hostPartyID: PartyID, guestPartyID: PartyID, guestPassword: GVBasics.Password ] RETURNS [nb: Thrush.NB]; <> <<>> Unvisit: PROC[ shh: SHHH_none, hostPartyID: PartyID, guestPartyID: PartyID, guestPassword: GVBasics.Password ] RETURNS [nb: Thrush.NB]; <> <<>> UnvisitSelf: PROC[ shh: SHHH_none, guestPartyID: PartyID ] RETURNS [nb: Thrush.NB]; <> }. <> <> <> <> <> <> <<>> <<>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<>>