NMSClientImpl.mesa
Please do not edit this file.
It was generated using CedarRPCGen.
DIRECTORY
Rope,
SunRPC,
SunRPCAuth,
MS,
NS,
MSGetPut,
NSGetPut,
NMSGetPut,
NMS;
NMSClientImpl:
CEDAR
PROGRAM
IMPORTS SunRPC, MSGetPut, NSGetPut, NMSGetPut
EXPORTS NMS =
BEGIN
ROPE: TYPE = Rope.ROPE;
defaultTimeout: CARDINAL ← 2000;
defaultRetries: CARDINAL ← 5;
MakeNMS2Client:
PUBLIC
PROC [h: SunRPC.Handle,
c: SunRPCAuth.Conversation] RETURNS [NMS.NMS2] ~ {
RETURN [
NEW[
NMS.NMS2Object ← [
servernoop2,
querycentralnms2,
updatecentralnms2,
querylocalnms2,
querymaintain2,
setdebuglevel2,
checkconfigfiles2,
nsinsert2,
nsdelete2,
nsreplace2,
nsfind2,
msmaintain2,
msunmaintain2,
h, c, NIL]]];
};
servernoop2:
PROC[o:
NMS.
NMS2] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 0];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
SunRPC.ReleaseReply[o.rpcHandle];
};
querycentralnms2:
PROC[o:
NMS.
NMS2,
host: ROPE,
state: NMS.ClaimState]
RETURNS [res: NMS.QueryCentralNMSreturn] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 7];
SunRPC.PutRope[o.rpcHandle, host];
NMSGetPut.PutClaimState[o.rpcHandle, state];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NMSGetPut.GetQueryCentralNMSreturn[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
updatecentralnms2:
PROC[o:
NMS.
NMS2,
host: NS.String,
how: NMS.UpdateType,
objs: NMS.SeqType0]
RETURNS [res: NMS.ReturnCodes] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 8];
NSGetPut.PutString[o.rpcHandle, host];
NMSGetPut.PutUpdateType[o.rpcHandle, how];
SunRPC.PutInt32[o.rpcHandle, objs.size];
FOR i:
INT
IN [0..objs.size)
DO
NMSGetPut.PutUpdateObject[o.rpcHandle, objs[i]];
ENDLOOP;
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NMSGetPut.GetReturnCodes[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
querylocalnms2:
PROC[o:
NMS.
NMS2,
centralHost: ROPE]
RETURNS [res: NMS.QueryLocalNMSreturn] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 9];
SunRPC.PutRope[o.rpcHandle, centralHost];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NMSGetPut.GetQueryLocalNMSreturn[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
querymaintain2:
PROC[o:
NMS.
NMS2,
idStr: ROPE]
RETURNS [res: NMS.QueryMaintainreturn] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 10];
SunRPC.PutRope[o.rpcHandle, idStr];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NMSGetPut.GetQueryMaintainreturn[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
setdebuglevel2:
PROC[o:
NMS.
NMS2, in:
INT32]
RETURNS [res: NMS.ReturnCodes] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 11];
SunRPC.PutInt32[o.rpcHandle,in];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NMSGetPut.GetReturnCodes[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
checkconfigfiles2:
PROC[o:
NMS.
NMS2]
RETURNS [res: NMS.ReturnCodes] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 12];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NMSGetPut.GetReturnCodes[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
nsinsert2:
PROC[o:
NMS.
NMS2,
registrationKind: NS.String,
object: NS.Object,
pid: INT32,
domain: NS.Domain]
RETURNS [res: NS.Insertreturn] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 1];
NSGetPut.PutString[o.rpcHandle, registrationKind];
NSGetPut.PutObject[o.rpcHandle, object];
SunRPC.PutInt32[o.rpcHandle, pid];
NSGetPut.PutDomain[o.rpcHandle, domain];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NSGetPut.GetInsertreturn[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
nsdelete2:
PROC[o:
NMS.
NMS2,
uid: NS.String,
domain: NS.Domain]
RETURNS [res: NS.ReturnCodes] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 2];
NSGetPut.PutString[o.rpcHandle, uid];
NSGetPut.PutDomain[o.rpcHandle, domain];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NSGetPut.GetReturnCodes[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
nsreplace2:
PROC[o:
NMS.
NMS2,
registrationKind: NS.String,
object: NS.Object,
uid: NS.String,
domain: NS.Domain]
RETURNS [res: NS.ReturnCodes] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 3];
NSGetPut.PutString[o.rpcHandle, registrationKind];
NSGetPut.PutObject[o.rpcHandle, object];
NSGetPut.PutString[o.rpcHandle, uid];
NSGetPut.PutDomain[o.rpcHandle, domain];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NSGetPut.GetReturnCodes[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
nsfind2:
PROC[o:
NMS.
NMS2,
patterns: NS.Object,
projection: NS.ProjectionList,
domain: NS.Domain]
RETURNS [res: NS.Findreturn] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 4];
NSGetPut.PutObject[o.rpcHandle, patterns];
NSGetPut.PutProjectionList[o.rpcHandle, projection];
NSGetPut.PutDomain[o.rpcHandle, domain];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← NSGetPut.GetFindreturn[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
msmaintain2:
PROC[o:
NMS.
NMS2,
idStr: ROPE,
progName: ROPE,
progArgs: MS.SeqType0,
uid: INT32,
pid: INT32]
RETURNS [res: MS.Maintainreturn] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 5];
SunRPC.PutRope[o.rpcHandle, idStr];
SunRPC.PutRope[o.rpcHandle, progName];
SunRPC.PutInt32[o.rpcHandle, progArgs.size];
FOR i:
INT
IN [0..progArgs.size)
DO
MSGetPut.PutString[o.rpcHandle, progArgs[i]];
ENDLOOP;
SunRPC.PutInt32[o.rpcHandle, uid];
SunRPC.PutInt32[o.rpcHandle, pid];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← MSGetPut.GetMaintainreturn[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
msunmaintain2:
PROC[o:
NMS.
NMS2,
idStr: ROPE]
RETURNS [res: MS.ReturnCodes] = {
SunRPC.StartCall[o.rpcHandle, o.rpcConversation,
NMS.NMSPrognum, 2, 6];
SunRPC.PutRope[o.rpcHandle, idStr];
[] ← SunRPC.SendCallAndReceiveReply[o.rpcHandle, defaultTimeout, defaultRetries];
res ← MSGetPut.GetReturnCodes[o.rpcHandle];
SunRPC.ReleaseReply[o.rpcHandle];
};
END.