DIRECTORY BasicTime USING [ GMT ], Lark USING [ KeyTable], LarkPlay USING [ ToneSpec], Thrush USING [ AlertKind, CallUrgency, ConversationHandle, ConvEvent, Credentials, Disposition, EventSequence, NB, PartyHandle, PartyType, nullHandle, Reason, RingEnable, ROPE, SHHH, SmartsHandle, StateID, StateInConv, ThHandle, Time, unencrypted ], ThSmarts USING [ SmartsProperties ], ThSmartsRpcControl USING [ InterfaceRecord, InterfaceRecordObject ] ; ThPartyPrivate: CEDAR DEFINITIONS = { LocalSmartsInterface: TYPE = ThSmartsRpcControl.InterfaceRecord; LocalSmartsBody: TYPE = ThSmartsRpcControl.InterfaceRecordObject; none: Thrush.SHHH = Thrush.unencrypted; StateInConv: TYPE = Thrush.StateInConv; nullHandle: Thrush.ThHandle = Thrush.nullHandle; RingMethod: TYPE = { standard, ownTune, bothTunes }; PartyData: TYPE = REF PartyBody; PartyBody: TYPE = RECORD [ numConvs: NAT _ 0, numSmarts: NAT _ 0, numEnabled: NAT _ 0, -- must be >0 for party to be visible to GetParty[]. actionNeeded: CONDITION, supervisor: PROCESS, supervisorGone: CONDITION, partyActive: BOOL _ FALSE, partyFailed: BOOL_FALSE, type: Thrush.PartyType_, -- Must be specified. ringEnable: Thrush.RingEnable _ on, -- are we noisily accepting calls? defaultRingEnable: Thrush.RingEnable _ on, -- are we noisily accepting calls? ringDo: RingMethod _ standard, -- we use the ring tune? ringTime: BasicTime.GMT_NULL, -- if not, when again? ringVolume: CARDINAL_1, -- sets up tune every time initialized ringTune: LarkPlay.ToneSpec, -- Specification of ring tune ringTuneRope: Thrush.ROPE_NIL, outgoing: Thrush.ROPE _ NIL, -- * reservedBy: Thrush.PartyHandle _ NULL, -- ** serviceName: Thrush.ROPE ]; SmartsData: TYPE=REF SmartsBody; SmartsBody: TYPE = RECORD [ interface: ThSmartsRpcControl.InterfaceRecord, -- an RPC or direct interface properties: ThSmarts.SmartsProperties, type: Thrush.PartyType_individual, shh: Thrush.SHHH, -- outgoing encryption handle; should be one for each Party-Smarts pair? canProgress: BOOLEAN_TRUE, -- when FALSE, don't call Progress any more. enablesParty: BOOLEAN _ FALSE, -- when TRUE, we're contributing to party.numEnabled authenticated: BOOLEAN ]; ConversationData: TYPE = REF ConversationBody; ConversationBody: TYPE = RECORD [ subject: Thrush.ROPE _ NIL, numParties: NAT_0, numActive: NAT_0, creatorPartyID: Thrush.PartyHandle _ Thrush.nullHandle, urgency: Thrush.CallUrgency, alertKind: Thrush.AlertKind, currentStateID: Thrush.StateID_0, timeOfID: Thrush.Time, convID: Thrush.ConversationHandle_NULL, keyTable: Lark.KeyTable _ NIL, -- current key table for this conversation newKeyTable: BOOL_FALSE, -- IF key table has changed but not yet been posted log: Thrush.EventSequence ]; CFRef: TYPE = REF CFRec; -- Ref to party/conversation record CFRec: TYPE = RECORD [ -- One such CFRec for each Party-Conversation pair event: Thrush.ConvEvent, -- describes a state and the event that put it there. voiceSmartsID: Thrush.SmartsHandle_Thrush.nullHandle, -- the one that will carry the conversation load for this Party in this conversation sockID: LONG CARDINAL_NULL, -- local socket ID for this participant. lastPostedID: Thrush.StateID_0, -- last time event referring to this party was posted lastNotedID: Thrush.StateID_0 -- last time this party's smarts were informed. ]; logSizeIncrement: NAT = 16; outsideRingTune: LarkPlay.ToneSpec; GetCurrentParty: PROC[ shh: Thrush.SHHH_Thrush.unencrypted, smartsID: Thrush.SmartsHandle] RETURNS [partyID: Thrush.PartyHandle]; GetPartySmarts: PROC[partyID: Thrush.PartyHandle, kind: ATOM] RETURNS [smartsID: Thrush.SmartsHandle]; MakeServiceRname: PROC[serviceName: Thrush.ROPE] RETURNS [serviceRname: Thrush.ROPE, serviceRnameAtom: ATOM]; GetStdRingInfo: PROC [partyID: Thrush.PartyHandle]; SetStdRingInfo: PROC [partyID: Thrush.PartyHandle, update: BOOL_FALSE]; DistributionProc: TYPE = PROC[ smarts: SmartsData ] RETURNS [ d: Thrush.Disposition ]; -- controls whether distribution will progress. Distribute: PROC[ party: PartyData, proc: DistributionProc] RETURNS [ d: Thrush.Disposition ]; -- accept/reject/pass, depending on whether anybody did. GetEvent: PROC[conv: ConversationData, stateID: Thrush.StateID] RETURNS [ event: Thrush.ConvEvent ]; Supervisor: PROC[party: PartyData]; -- supervision process root. Supervise: PROC[party: PartyData]; -- Creates or joggles a Supervisor. Use where one would normally do a NOTIFY party.actionNeeded Verify: PROC[ credentials: Thrush.Credentials ] RETURNS [ conv: ConversationData, party: PartyData, cfRef: CFRef, nb: Thrush.NB ]; FindOtherParty: PROC[myPartyID: Thrush.PartyHandle, conv: ConversationData] RETURNS[partyID: Thrush.PartyHandle, conference: BOOL]; DoDescribeParty: PROC[partyID: Thrush.PartyHandle] RETURNS[ description: Thrush.ROPE]; DoAdvance: PROC [ smartsID: Thrush.SmartsHandle, party: PartyData, conv: ConversationData, cfRef: CFRef, state: StateInConv, reason: Thrush.Reason, comment: Thrush.ROPE_NIL ] RETURNS [nb: Thrush.NB]; RegisterLocal: PROC[partyID: Thrush.PartyHandle, interface: LocalSmartsInterface, properties: ThSmarts.SmartsProperties, oldSmartsID: Thrush.SmartsHandle_nullHandle] RETURNS [smartsID: Thrush.SmartsHandle]; DehandleConv: PROC[convID: Thrush.ConversationHandle] RETURNS [ conv: ConversationData ]; DehandleParty: PROC[partyID: Thrush.PartyHandle, insist: BOOLEAN_FALSE] RETURNS[party: PartyData]; DehandleSmarts: PROC[smartsID: Thrush.SmartsHandle, insist: BOOLEAN_FALSE] RETURNS[party: SmartsData]; DestroyConversation: PROC[ conv: ConversationData ]; }. ώThPartyPrivate.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. last modified by Swinehart, May 22, 1985 11:53:40 am PDT Record Types PartyData: data representing an individual, trunk, or voice recording within Thrush Fields used by parties representing individuals and some services Fields used by trunk parties For services, record "idle service" rName for use when party goes idle Names of recording smarts interface . . . use to get mgmt interfaces * Set at GetParty time to called party number. This number is just what's needed to complete the call, with all alternatives removed. *x* in the number indicates the need for a pause of x 100 ms ticks. ** Since GetParty custom-tailors a trunk party for the specific outgoing call before initiating a conversation, need a way to make sure that the same smarts does start the conversation. Implementors say SmartsBody: PUBLIC TYPE=ThPartyPrivate.SmartsBody; for now, callee in shh is RName associated of Party that creates smarts. Procedures Get Party that this Smarts considers that it is currently associated with. << This might not be an adequate facility; may need an enumerator to get all connections, as well; quite likely, actually. >> There should be a function like this for each sort of smarts. This one works OK for both Lark Smarts and Lark Trunk Smarts. << Very likely this now belongs in ThParty with the other Triples-mungers>> Service Name is the formal descriptor of one of the voice services, such as "Recording", "Text-to-Speech", and so on. The result is "idle..Lark", as a ROPE and as a corresponding ATOM. This is a procedure because the service name is stored, but several clients need the atom or rope values. Inherited from ThPartyIn Party Initialization This is the local analog of ThParty.Register. Conversations Special dehandling operations Swinehart, May 15, 1985 6:01:06 pm PDT Cedar 6.0 changes to: PartyBody (incoming phone number removed), DIRECTORY Swinehart, May 20, 1985 1:16:41 pm PDT PartyBody is not a variant record any more. changes to: PartyBody Swinehart, May 22, 1985 10:32:47 am PDT serviceNameAtom => serviceName changes to: PartyBody Swinehart, May 22, 1985 10:41:26 am PDT changes to: MakeServiceRname, GetStdRingInfo, SetStdRingInfo, MakeServiceRname Κ˜šœ™Icodešœ Οmœ1™JšœŸ˜:Jšœžœž˜—J˜™J˜JšœžœžœŸ˜"Jšœ!žœŸ˜,J˜—™Fšœž˜JšœE™E——J˜J˜JšœŸ,œœ™Κ™ΉJ˜——Jšœ žœžœ ˜ JšœC™Cšœ žœžœ˜Jšœ/Ÿ˜LJ˜&J˜"šœ žœŸH˜ZJšœH™H—Jšœ žœžœŸ,˜GJšœžœžœŸ4˜SJšœž˜Jšœ˜J˜—Jšœžœžœ˜.šœžœžœ˜!Jšœžœžœ˜Jšœ žœ˜Jšœ žœ˜J˜7J˜J˜J˜!J˜Jšœ"žœ˜'Jšœžœ,˜IJšœ žœžœŸ3˜MJ˜J˜J˜—JšœžœžœŸ#˜<šœžœžœŸ2˜JJ˜Nšœ5˜5JšŸT˜T—JšœžœžœžœŸ(˜EJšœ Ÿ5˜UJšœŸ/˜NJ˜—J˜Jšœžœ˜J˜Jšœ#˜#J˜—™ JšœΗ™ΗšΟnœžœ˜Jšœ žœ˜$˜Jšžœ˜&J˜——JšœK™Kš œžœ$žœ˜=Jšžœ!˜(—J˜š œžœžœ˜0Jšžœžœžœ˜˜Q˜SJšžœ!˜(——šœ.™.J˜——šœ ™ J˜J™š  œžœ#˜5Jšžœ˜#—š  œžœ&žœžœ˜GJšžœ˜—š œžœ(žœžœ˜JJšžœ˜—J˜Jš œžœ˜4J™——J˜™&K™ Kšœ Οr œ ‘ ™@—K™™&K™+Kšœ ‘ ™—™'K™Kšœ ‘ ™—™'Kšœ ‘B™N—K™K™—…—ž%)