ThExportOtherImpl.mesa
Last modified by D. Swinehart, June 19, 1984 7:53:03 am PDT
DIRECTORY
Log,
NamesGV,
Rope,
RPC,
RPCBinding,
RPCLupine,
ThPartyRpcControl,
ThPartyRpcServerImpl,
ThVersions,
UserProfile
;
ThExportOtherImpl: PROGRAM
IMPORTS
Log,
NamesGV,
RPCBinding,
ThPartyRpcServerImpl,
ThVersions,
UserProfile
SHARES
RPCBinding, ThPartyRpcServerImpl
= {
stubProtocol: RPC.VersionRange = ThPartyRpcControl.LupineProtocolVersion;
explicitInstance: Rope.ROPE;
ExportThingsWithExplicitInstance: PUBLIC PROC = {
instance: Rope.ROPE = UserProfile.Token[key: "ThrushServerInstance", default: "Morley.Lark"];
thVR: RPC.VersionRange = ThVersions.ThrushVR;
explicitInstance ← NamesGV.GVGetAttribute[
rName: instance, attribute: $connect, default: NIL];
IF explicitInstance=NIL THEN {
[]←Log.Problem["Trouble in ExportExplicitInstances",$System]; RETURN; };
ExportOneOther["ThParty.Lark", thVR, ThPartyRpcServerImpl.ServerDispatcher];
Log.Report["ExportExplicitInstances[]", $System];
};
ExportOneOther: PROC[interfaceType: Rope.ROPE, version: RPC.VersionRange, dispatcher: RPCLupine.Dispatcher] = {
[]←RPCBinding.AddToExportTable[[interfaceType, explicitInstance, version], dispatcher, stubProtocol];
};
ExportThingsWithExplicitInstance[];
}.