ThExportOtherImpl.mesa
Last modified by D. Swinehart, December 28, 1983 9:13 pm
DIRECTORY
Log,
Names,
Rope,
RPC,
RPCBinding,
RPCLupine,
ThPartyRpcControl,
ThPartyRpcServerImpl,
ThVersions,
UserProfile
;
ThExportOtherImpl: PROGRAM
IMPORTS
Log,
Names,
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"];
details: Names.GVDetails;
results: Names.Results;
thVR: RPC.VersionRange = ThVersions.ThrushVR;
[results, details] ← Names.GetGVDetails[rName: instance, mode: ok, behavior: lookupFirst];
IF results#ok OR ~details.valid THEN {
[]←Log.Problem["Trouble in ExportExplicitInstances",$System]; RETURN; };
explicitInstance�tails.connect;
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[];
}.