DIRECTORY Lark USING [ KeyTable], PupTypes USING [ PupHostID ], Thrush USING [ AlertKind, CallUrgency, ConversationHandle, ConvEvent, Credentials, Disposition, EventSequence, NB, PartyHandle, PartyType, nullHandle, PhoneNumber, Reason, 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; 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, v: SELECT type: Thrush.PartyType FROM individual=> [], trunk => [ incoming: Thrush.PhoneNumber _, -- << Use? >> outgoing: Thrush.ROPE _ NIL], -- set at GetParty time to called party number. recording => [ ], ENDCASE]; 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 remote: BOOLEAN, -- if TRUE, need to do call timeouts in supervisor loop 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 conferenceHost: PupTypes.PupHostID _ [0], -- Current-host value for conference participants 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; recordingRAtom: ATOM; 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]; 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 ]; 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 ]; }. JThPartyPrivate.mesa last modified by Swinehart, February 8, 1984 1:01 pm Record Types PartyData: data representing an individual, trunk, or voice recording within Thrush 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. Names of recording smarts interface . . . use to get mgmt interfaces 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>> Inherited from ThPartyIn Party Initialization This is the local analog of ThParty.Register. Conversations Special dehandling operations �Êq˜Jšœ™šœ4™4J˜—šÏk ˜ Jšœ�œ ˜Jšœ �œ˜Jš œ�œc�œ;�œ�œD˜úJšœ �œ˜$Jšœ�œ+˜CJ˜J˜—Jšœ�œ� œ˜%J˜Jšœ�œ&˜@Jšœ�œ,˜AJšœ �œ˜'Jšœ �œ˜'J˜J˜0J˜™ JšœS™SJ˜Jšœ �œ�œ ˜ šœ �œ�œ˜Jšœ �œ˜Jšœ �œ˜Jšœ �œÏc4˜IJšœ� œ˜Jšœ �œ˜Jšœ� œ˜Jšœ �œ�œ˜Jšœ �œ�œ˜šœ�œ�˜%Jšœ˜˜ Jšœ ž ˜-šœ�œ�œž/˜MJšœ7™7Jšœ1™1Jšœ1™1——šœ˜JšœE™E—Jš�œ˜ J˜——Jšœ �œ�œ ˜ JšœC™Cšœ �œ�œ˜Jšœ/ž˜LJ˜&J˜"šœ �œžH˜ZJšœH™H—Jšœ �œ�œž,˜GJšœ�œ�œž4˜SJšœ�œž7˜HJšœ�˜Jšœ˜J˜—Jšœ�œ�œ˜.šœ�œ�œ˜!Jšœ�œ�œ˜Jšœ �œ˜Jšœ �œ˜J˜7J˜J˜J˜!J˜Jšœ"�œ˜'Jšœ�œ,˜IJšœ*ž1˜[Jšœ �œ�œž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˜šŸœ�œ�œ˜3Jš�œž/˜RJ˜—šŸ œ�œ+˜;Jš�œž8˜[—J™šŸœ�œ1˜?Jš�œ˜$J˜—JšŸ œ�œž˜@JšŸ œ�œž`˜ƒJ˜šŸœ�œ"˜.šœ�œ˜ J˜J˜J˜ Jšœ �œ˜J˜——šŸœ�œ˜2Jš�œ�œ˜#J˜—šŸ œ�œ˜J˜Jšœ˜Jšœ˜J˜ J˜J˜Jšœ�œ�˜Jšœ�œ �œ˜—˜J˜——™J˜šœ™J˜šŸ œ�œ>˜Q˜SJš�œ!˜(——šœ.™.J˜——šœ ™ J˜J™šŸ œ�œ#˜5Jš�œ˜#—šŸ œ�œ&�œ�œ˜GJš�œ˜—šŸœ�œ(�œ�œ˜JJš�œ˜—J˜JšŸœ�œ˜4J™——J˜J˜—…—Ó