BluejayRegisterLocalImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last modified by D. Swinehart, May 22, 1985 12:07:01 pm PDT
DIRECTORY
BluejaySmarts,
Names  USING [ OwnNetAddress ],
ThParty  USING [ CreateParty ],
ThPartyPrivate USING [ RegisterLocal ],
Thrush  USING [ nullHandle, PartyHandle, ROPE, SmartsHandle, unencrypted ],
ThSmarts,
ThSmartsRpcControl USING [ InterfaceRecord, NewInterfaceRecord ]
;
BluejayRegisterLocalImpl: CEDAR PROGRAM
IMPORTS BluejaySmarts, Names, ThParty, ThPartyPrivate, ThSmarts, ThSmartsRpcControl
EXPORTS BluejaySmarts = {
BluejayRegister: PUBLIC PROC[bluejayInstance, thrushInstance, serverPassword: Thrush.ROPE]
RETURNS [partyID: Thrush.PartyHandle←Thrush.nullHandle,
smartsID: Thrush.SmartsHandle←Thrush.nullHandle] = {
smartsInterface: ThSmartsRpcControl.InterfaceRecord;
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[machine: Names.OwnNetAddress[]]]];
};
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