DIRECTORY IO, NamesRPC USING [ StartConversation ], RecordingServiceRegister, RPC USING [ AuthenticateFailed, EncryptionKey, ImportFailed, VersionRange ], ThParty USING [ Register ], ThPartyRpcControl, Thrush USING [ Credentials, NB, nullID, PartyID, ROPE, SmartsID, unencrypted ], ThSmarts, ThSmartsRpcControl USING [ ExportInterface, InterfaceName ], ThVersions USING [ GetThrushVR, JayVersion, JayVR ], VoiceUtils USING [ CurrentPasskey, OwnNetAddress, Report, ReportFR ] ; BluejayRegisterImpl: CEDAR PROGRAM IMPORTS RecordingServiceRegister, IO, NamesRPC, RPC, ThParty, ThPartyRpcControl, ThSmartsRpcControl, ThVersions, VoiceUtils EXPORTS RecordingServiceRegister = { OPEN IO; BluejayRegister: PUBLIC PROC [bluejayInstance, thrushInstance, serverPassword: Thrush.ROPE] RETURNS [nb: Thrush.NB, credentials: Thrush.Credentials] = { myName: ThSmartsRpcControl.InterfaceName _ [ type: "ThSmarts.Lark", instance: bluejayInstance, version: ThVersions.JayVR]; serverPasskey: RPC.EncryptionKey _ VoiceUtils.CurrentPasskey[serverPassword]; thVR: RPC.VersionRange = ThVersions.GetThrushVR; myName _ [ type: "ThSmarts.Lark", instance: bluejayInstance, version: ThVersions.JayVR]; ThSmartsRpcControl.ExportInterface[ interfaceName: myName, user: bluejayInstance, password: serverPasskey]; RecordingServiceRegister.jayShh _ IF NOT RecordingServiceRegister.encryptionRequested THEN Thrush.unencrypted ELSE NamesRPC.StartConversation [ caller: bluejayInstance, callee: thrushInstance --rName--, key: serverPasskey, level: --<>--CBCCheck ! RPC.AuthenticateFailed=>GOTO InitFailed]; ThPartyRpcControl.ImportInterface[ interfaceName: [type: "ThParty.Lark", instance: thrushInstance, version: thVR] ! RPC.ImportFailed=> IF why=wrongVersion THEN { VoiceUtils.ReportFR["Bluejay version %d too old; import failed", $Bluejay, NIL, card[ThVersions.JayVersion]]; GOTO InitFailed; }]; RecordingServiceRegister.interfaceIsImported_TRUE; [nb, credentials] _ ThParty.Register[ shh: RecordingServiceRegister.jayShh, rName: "recording", type: $service, interface: myName, properties: [role: $voiceTerminal, netAddress: VoiceUtils.OwnNetAddress[]] ]; IF nb#$success THEN { VoiceUtils.Report["Bluejay registration failed", $Bluejay]; GOTO InitFailed; }; EXITS InitFailed => { RecordingServiceRegister.interfaceIsImported_FALSE; IF nb=$success THEN nb _ $bluejayRegistrationFailed; }; }; }. ΜBluejayRegisterImpl.mesa Copyright Σ 1985, 1986, 1987 by Xerox Corporation. All rights reserved. Last modified by D. Swinehart, January 30, 1987 2:04:41 pm PST Doug Terry, November 18, 1986 3:13:53 pm PST Export ThSmarts Interface Import ThParty Interface Register First Jay Party. BluejayRegister.nb~$success BluejayRegister.nb~$bluejayRegistrationFailed BluejayRegister.nb~~$ Swinehart, May 15, 1985 10:28:41 am PDT Cedar 6.0 changes to: BluejayRegisterImpl Swinehart, May 22, 1985 12:05:46 pm PDT recording => service, Jay => Recording changes to: BluejayRegisterImpl Swinehart, May 17, 1986 3:30:10 pm PDT Cedar 6.1 changes to: DIRECTORY, BluejayRegisterImpl Swinehart, June 4, 1986 0:23:02 am PDT New Thrush design changes to: DIRECTORY, BluejayRegisterImpl Doug Terry, November 18, 1986 3:11:03 pm PST Changed to export to RecordingServiceRegister instead of BluejaySmarts. changes to: DIRECTORY, BluejayRegisterImpl Κ˜šœ™IcodešœH™HJšœ>™>K™,—J™šΟk ˜ Jšœ˜Jšœ œ˜%Jšœ˜JšœœC˜NJšœ œ˜Jšœ˜Jšœœœœ˜PJ˜ Jšœœ$˜