BluejayRegisterLocalImpl.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Last modified by D. Swinehart, May 19, 1986 10:07:40 am PDT
DIRECTORY
BluejaySmarts,
ThParty  USING [ CreateParty ],
ThPartyPrivate USING [ RegisterLocal ],
Thrush  USING [ NetAddress, nullHandle, PartyHandle, ROPE, SmartsHandle, unencrypted ],
ThSmarts,
ThSmartsRpcControl USING [ InterfaceRecord, NewInterfaceRecord ],
VoiceUtils  USING [ OwnNetAddress ]
;
BluejayRegisterLocalImpl: CEDAR PROGRAM
IMPORTS BluejaySmarts, ThParty, ThPartyPrivate, ThSmarts, ThSmartsRpcControl, VoiceUtils
EXPORTS BluejaySmarts = {
BluejayRegister: PUBLIC PROC[bluejayInstance, thrushInstance, serverPassword: Thrush.ROPE]
RETURNS [partyID: Thrush.PartyHandle←Thrush.nullHandle,
smartsID: Thrush.SmartsHandle←Thrush.nullHandle] = {
smartsInterface: ThSmartsRpcControl.InterfaceRecord;
netAddress: Thrush.NetAddress = VoiceUtils.OwnNetAddress[];
BluejaySmarts.jayShh ← Thrush.unencrypted;
BluejaySmarts.interfaceIsImported←TRUE;
Register First Jay Party.
partyID←ThParty.CreateParty[type: service, rName: "Recording"];
IF partyID=Thrush.nullHandle THEN ERROR;
smartsInterface ← ThSmartsRpcControl.NewInterfaceRecord[];
smartsInterface.clientStubProgress ← Progress;
smartsID ← ThPartyPrivate.RegisterLocal[
partyID: partyID, interface: smartsInterface,
properties: [x: voiceTerminal[netAddress: [netAddress.net, netAddress.host]]]];
};
Progress: PROC[
interface: ThSmartsRpcControl.InterfaceRecord,
shh: ThSmarts.SHHH,
smartsID: Thrush.SmartsHandle,
event: ThSmarts.ConvEvent,
yourParty: BOOL, -- TRUE if this event deals with your party.
latestEvent: BOOL, -- TRUE if at time of call, this is latest known event for this conv.
informationOnly: BOOLFALSE -- TRUE if higher priority smarts has already acted.
] RETURNS [ d: ThSmarts.Disposition ] = {
RETURN[ThSmarts.Progress[shh, smartsID, event, yourParty, latestEvent, informationOnly]];
};
}.
Swinehart, May 15, 1985 10:29:50 am PDT
Cedar 6.0
changes to: BluejayRegister (change to CreateParty)
Swinehart, May 22, 1985 12:06:37 pm PDT
recording => service, Jay=>Recording
changes to: BluejayRegister
Swinehart, May 17, 1986 3:30:53 pm PDT
Cedar 6.1
changes to: DIRECTORY, BluejayRegisterLocalImpl