DIRECTORY Commander USING [ CommandProc, Register ], CommandTool USING [ NextArgument ], NamesGVImpExp, NamesGVRpcControl USING [ ImportInterface ], IO, Rope USING [ ROPE ], RPC USING [ ImportFailed ], UserProfile USING [ Token ], VoiceUtils USING [ MakeRName, Problem, Report ] ; NamesGVImportImpl: CEDAR PROGRAM IMPORTS Commander, CommandTool, IO, NamesGVRpcControl, RPC, UserProfile, VoiceUtils EXPORTS NamesGVImpExp = { OPEN IO; ROPE: TYPE= Rope.ROPE; GVImport: PUBLIC PROC [instance: ROPE_NIL] RETURNS [success: BOOL_FALSE] = { ENABLE RPC.ImportFailed => { VoiceUtils.Problem["Couldn't import NamesGV.Lark", $Finch]; CONTINUE; }; [] _ DoImport[instance]; success _ TRUE; }; DoImport: PROC [instance: ROPE_NIL] RETURNS [newInstance: ROPE_NIL] = { newInstance _ VoiceUtils.MakeRName[style: rName, name: IF instance#NIL THEN instance ELSE UserProfile.Token[key: "NamesGVInstance", default: "Strowger.Lark"]]; NamesGVRpcControl.ImportInterface [ interfaceName: [ type: "NamesGV.Lark", instance: newInstance ] ]; }; UnGVImport: PUBLIC PROC = { NULL; }; CmdGVImport: Commander.CommandProc = { ENABLE RPC.ImportFailed => { VoiceUtils.Problem["Couldn't import NamesGV.Lark", $System]; CONTINUE; }; instance: ROPE = DoImport[CommandTool.NextArgument[cmd]]; VoiceUtils.Report[IO.PutFR["ImportInterface[NamesGV.Lark, %s]", rope[instance]], $System]; }; Commander.Register["GVImport", CmdGVImport, "Connect to remote NamesGV."]; }. pNamesGVImportImpl.Mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reserved. Last modified by Swinehart, June 27, 1986 9:42:55 am PDT Importing is now automatic on binding failures in the RpcClient implementation. This interface is here for backward compatibility and to allow specification of a different server host than the default. Data Import Procedure $Finch until $System can be made much cleverer! Defaults to $System when there's no Finch. Import "NamesGV.Lark" from the specified instance, using any available host hint, then after succeeding, update host hint from NamesGV database. See RPC documentation for description of import host hint option. User command Initialization Swinehart, May 14, 1985 12:59:49 pm PDT Cedar 6.0 Swinehart, May 9, 1986 11:29:57 am PDT Convert to new communications package changes to: DIRECTORY, importHostHint ΚR˜šœ™Icodešœ Οmœ7™BJšœ8™8J™—J™ΚJ˜šΟk ˜ Jšœ žœ˜+J˜#Jšœ˜Jšœžœ˜,Jšžœ˜Jšœžœžœ˜Jšžœžœ˜Jšœ žœ ˜Jšœ žœ˜/J˜J˜—šœžœž˜ Jšžœžœžœ˜Sšžœ˜Jšžœžœ˜J˜——™J˜Jšžœžœžœ˜J˜—J™˜šΟnœžœžœ žœžœžœ žœžœ˜Lšž˜JšžœOžœ˜^J™[—J˜Jšœ žœ˜J˜J˜—šŸœžœ žœžœžœžœžœ˜GJ™Σšœ0˜0šœžœ žœžœ ˜#JšžœF˜J——šœ#˜#Jšœ>˜>J˜—J˜J˜—šŸ œžœžœžœ˜$J˜——J˜™ J˜šŸ œ˜&šž˜JšžœPžœ˜_—Jšœ žœ*˜9JšœžœF˜ZJšœ˜—J˜—J˜™J™JšœJ˜J—J˜K™™'K™ —™&K™%Kšœ Οr™%—K™—…—  b