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: BOOL←FALSE -- TRUE if higher priority smarts has already acted.
] RETURNS [ d: ThSmarts.Disposition ] = {
RETURN[ThSmarts.Progress[shh, smartsID, event, yourParty, latestEvent, informationOnly]];
};