<> <> <> DIRECTORY Commander USING [ CommandProc, Register ], CommandTool USING [ NextArgument ], <> LoganBerryRpcControl USING [ ExportInterface ], <> IO, RPC USING [ ExportFailed, matchAllVersions, ShortROPE ], UserProfile USING [ Token ], VoiceUtils USING [ CurrentRName, CurrentPasskey, Problem, ReportFR ] ; LoganBerryExportImpl: CEDAR PROGRAM IMPORTS Commander, CommandTool, IO, RPC, LoganBerryRpcControl, UserProfile, VoiceUtils <> <> = { OPEN IO; <> ROPE: TYPE= RPC.ShortROPE; exported: BOOL_FALSE; <> LBExport: PROC [instance: ROPE_NIL] RETURNS [success: BOOL] = { ENABLE RPC.ExportFailed => { VoiceUtils.Problem["Couldn't export LoganBerry.Lark"]; CONTINUE; }; IF instance=NIL THEN instance _ UserProfile.Token[key: "ThrushServerInstance", default: "Morley.Lark"]; IF exported THEN { VoiceUtils.ReportFR[remark: "ExportInterface[LoganBerry.Lark, %s] already done", where: $System, a1: rope[instance]]; RETURN; }; LoganBerryRpcControl.ExportInterface [ interfaceName: [ type: "LoganBerry.Lark", instance: instance ], user: VoiceUtils.CurrentRName[], password: VoiceUtils.CurrentPasskey[] ]; <> exported _ TRUE; VoiceUtils.ReportFR[ remark: "ExportInterface[LoganBerry.Lark, %s]", a1: rope[instance], where: $System]; }; <> CmdLBExport: Commander.CommandProc = { []_LBExport[CommandTool.NextArgument[cmd]]; }; <> <<>> Commander.Register["ExportLoganBerry", CmdLBExport, "ExportLoganBerry [Instance]\nSupply a remote LoganBerry."]; }.