ThPartySunRPCToThParty.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Polle Zellweger (PTZ) October 29, 1990 3:34:01 pm PST
Pier, May 24, 1990 12:06:58 pm PDT
Exports ThPartySunRPCServer, which is called by ThPartySunRPCServerStub, and calls the real ThParty routines.
DIRECTORY
ThParty,
ThPartySunRPC,
ThPartySunRPCServer,
Thrush,
ThrushSunRPC,
ThrushSunRPCConvert;
ThPartySunRPCToThParty: CEDAR PROGRAM
IMPORTS ThParty, ThrushSunRPCConvert
EXPORTS ThPartySunRPCServer
~ {
OPEN ThPartySunRPC, ThPartySunRPCServer, ThrushSunRPCConvert;
Conversation Management
CreateConversation: PUBLIC CreateConversationType ~ {
thNB: Thrush.NB;
thConvEvent: Thrush.ConvEvent;
[thNB, thConvEvent] ¬ ThParty.CreateConversation[shhh: Thrush.none, credentials: SrToCredentials[credentials], state: SrToState[state], reason: SrToATOM[reason], comment: SrToROPE[comment], convAttributes: SrToAttributes[convAttributes], partyAttributes: SrToAttributes[partyAttributes], checkConflict: checkConflict];
nb ¬ ATOMToSr[thNB];
convEvent ¬ ConvEventToSr[thConvEvent];
};
Alert: PUBLIC AlertType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.Alert[shhh: Thrush.none, credentials: SrToCredentials[credentials], calledPartyID: calledPartyID, comment: SrToROPE[comment], convAttributes: SrToAttributes[convAttributes], partyAttributes: SrToAttributes[partyAttributes] ];
nb ¬ ATOMToSr[thNB];
};
Advance: PUBLIC AdvanceType ~ {
thNB: Thrush.NB;
thConvEvent: Thrush.ConvEvent;
[thNB, thConvEvent] ¬ ThParty.Advance[shhh: Thrush.none, credentials: SrToCredentials[credentials], state: SrToState[state], reportToAll: reportToAll, reason: SrToATOM[reason], comment: SrToROPE[comment], convAttributes: SrToAttributes[convAttributes], partyAttributes: SrToAttributes[partyAttributes], bilateral: bilateral, checkConflict: checkConflict];
nb ¬ ATOMToSr[thNB];
convEvent ¬ ConvEventToSr[thConvEvent];
};
ReportAction: PUBLIC ReportActionType ~ {
thNB: Thrush.NB;
[thNB, numReportsIssued] ¬ ThParty.ReportAction[shhh: Thrush.none, report: SrToActionReport[report], reportToAll: reportToAll, selfOnCompletion: selfOnCompletion];
nb ¬ ATOMToSr[thNB];
};
Enumerations, registrations, queries
GetConversationInfo: PUBLIC GetConversationInfoType ~ {
thNB: Thrush.NB;
thCInfo: ThParty.ConversationInfo;
[thNB, thCInfo] ¬ ThParty.GetConversationInfo[Thrush.none, SrToConvID[convID] ];
nb ¬ ATOMToSr[thNB];
cInfo ¬ ConversationInfoToSr[thCInfo];
};
Named conversations
RegisterConversation: PUBLIC RegisterConversationType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.RegisterConversation[shhh: Thrush.none, credentials: SrToCredentials[credentials], name: SrToROPE[name], convType: SrToConvType[convType], convAttributes: SrToAttributes[convAttributes], accessList: SrToAccessList[accessList] ];
nb ¬ ATOMToSr[thNB];
};
GetConversationFromName: PUBLIC GetConversationFromNameType ~ {
thNB: Thrush.NB;
thCInfo: ThParty.ConversationInfo;
[thNB, thCInfo] ¬ ThParty.GetConversationFromName[shhh: Thrush.none,
partyID: partyID, name: SrToROPE[name] ];
nb ¬ ATOMToSr[thNB];
cInfo ¬ ConversationInfoToSr[thCInfo];
};
EnumerateNamedConversations: PUBLIC EnumerateNamedConversationsType ~ {
thNB: Thrush.NB;
thCandidates: LIST OF ThParty.ConversationInfo;
[thNB, thCandidates] ¬ ThParty.EnumerateNamedConversations[shhh: Thrush.none, partyID: partyID];
nb ¬ ATOMToSr[thNB];
candidates ¬ CandidateListToSr[thCandidates];
};
Party information
GetPartyInfo: PUBLIC GetPartyInfoType ~ {
thNB: Thrush.NB;
thPInfo: ThParty.PartyInfo;
[thNB, thPInfo] ¬ ThParty.GetPartyInfo[shh: Thrush.none, credentials: SrToCredentials[credentials], nameReq: SrToATOM[nameReq], allParties: allParties ];
nb ¬ ATOMToSr[thNB];
pInfo ¬ PartyInfoToSr[thPInfo];
};
DescribeParty: PUBLIC DescribePartyType ~ {
thNB: Thrush.NB;
thDesc: Thrush.ROPE;
thType: Thrush.PartyType;
thPartner: Thrush.PartyID;
thVisitee: Thrush.PartyID;
thVisitors: LIST OF Thrush.PartyID;
[thNB, thDesc, thType, thPartner, thVisitee, thVisitors] ¬ ThParty.DescribeParty[partyID: partyID, nameReq: SrToATOM[nameReq] ];
RETURN[nb: ATOMToSr[thNB], description: ROPEToSr[thDesc], type: ATOMToSr[thType], partner: thPartner, visitee: thVisitee, visitors: VisitorListToSr[thVisitors] ];
};
AddAttributes: PUBLIC AddAttributesType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.AddAttributes[credentials: SrToCredentials[credentials], convAttributes: SrToAttributes[convAttributes], partyAttributes: SrToAttributes[partyAttributes] ];
nb ¬ ATOMToSr[thNB];
};
Service action registration, lookup. See also ReportAction, above.
RegisterServiceInterface: PUBLIC RegisterServiceInterfaceType ~ {
thNB: Thrush.NB;
thInterfaceSpec: Thrush.InterfaceSpec;
[thNB, thInterfaceSpec] ¬ ThParty.RegisterServiceInterface[shhh: Thrush.none, credentials: SrToCredentials[credentials], interfaceSpecPattern: SrToInterfaceSpec[interfaceSpecPattern] ];
nb ¬ ATOMToSr[thNB];
interfaceSpec ¬ InterfaceSpecToSr[thInterfaceSpec];
};
LookupServiceInterface: PUBLIC LookupServiceInterfaceType ~ {
thNB: Thrush.NB;
thInterfaceSpec: Thrush.InterfaceSpec;
[thNB, thInterfaceSpec] ¬ ThParty.LookupServiceInterface[shhh: Thrush.none, credentials: SrToCredentials[credentials], serviceParty: serviceParty, type: type ];
nb ¬ ATOMToSr[thNB];
interfaceSpec ¬ InterfaceSpecToSr[thInterfaceSpec];
};
Encryption key registration.
RegisterKey: PUBLIC RegisterKeyType ~ {
thNB: Thrush.NB;
thKeyIndex: [0..17B];
[thNB, thKeyIndex] ¬ ThParty.RegisterKey[shh: Thrush.none, credentials: SrToCredentials[credentials], key: SrToEncryptionKey[key], reportNewKeys: reportNewKeys ];
nb ¬ ATOMToSr[thNB];
keyIndex ¬ thKeyIndex;
};
GetKeyTable: PUBLIC GetKeyTableType ~ {
thNB: Thrush.NB;
thKeyTable: Thrush.KeyTable;
[thNB, thKeyTable] ¬ ThParty.GetKeyTable[shh: Thrush.none, credentials: SrToCredentials[credentials] ];
nb ¬ ATOMToSr[thNB];
keyTable ¬ KeyTableToSr[thKeyTable];
};
UnregisterKey: PUBLIC UnregisterKeyType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.UnregisterKey[shh: Thrush.none, credentials: SrToCredentials[credentials], key: SrToEncryptionKey[key] ];
nb ¬ ATOMToSr[thNB];
};
Names to Parties, Numbers to Parties
GetParty: PUBLIC GetPartyType ~ {
thNB: Thrush.NB;
thNewPartyID: Thrush.PartyID;
[thNB, thNewPartyID] ¬ ThParty.GetParty[shh: Thrush.none, partyID: partyID, rName: SrToROPE[rName], type: SrToATOM[type] ];
nb ¬ ATOMToSr[thNB];
newPartyID ¬ thNewPartyID;
};
GetPartyFromNumber: PUBLIC GetPartyFromNumberType ~ {
thNB: Thrush.NB;
thNewPartyID: Thrush.PartyID;
[thNB, thNewPartyID] ¬ ThParty.GetPartyFromNumber[shh: Thrush.none, partyID: partyID, phoneNumber: SrToROPE[phoneNumber], description: SrToROPE[description] ];
nb ¬ ATOMToSr[thNB];
newPartyID ¬ thNewPartyID;
};
GetPartyFromFeepNum: PUBLIC GetPartyFromFeepNumType ~ {
thNB: Thrush.NB;
thNewPartyID: Thrush.PartyID;
[thNB, thNewPartyID] ¬ ThParty.GetPartyFromFeepNum[shh: Thrush.none, partyID: partyID, feepNum: SrToROPE[feepNum] ];
nb ¬ ATOMToSr[thNB];
newPartyID ¬ thNewPartyID;
};
GetCurrentParty: PUBLIC GetCurrentPartyType ~ {
thNB: Thrush.NB;
thPartyID: Thrush.PartyID;
[thNB, thPartyID] ¬ ThParty.GetCurrentParty[shh: Thrush.none, smartsID: smartsID ];
nb ¬ ATOMToSr[thNB];
partyID ¬ thPartyID;
};
ReleaseParty: PUBLIC ReleasePartyType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.ReleaseParty[shh: Thrush.none, partyID: partyID, targetPartyID: targetPartyID ];
nb ¬ ATOMToSr[thNB];
};
Information about people and parties
GetNumbersForRName: PUBLIC GetNumbersForRNameType ~ {
[fullRName, number, homeNumber] ¬ ThParty.GetNumbersForRName[
shh: Thrush.none, rName: SrToROPE[rName] ];
RETURN[fullRName: ROPEToSr[fullRName], number: ROPEToSr[number],
homeNumber: ROPEToSr[homeNumber] ];
};
Party and Smarts creation, initialization
Register: PUBLIC RegisterType ~ {
thNB: Thrush.NB;
thCredentials: Thrush.Credentials;
[thNB, thCredentials] ¬ ThParty.Register[shh: Thrush.none, rName: SrToROPE[rName],type: SrToATOM[type], clonePartyID: clonePartyID, interface: SrToInterfaceName[interface], properties: SrToSmartsProperties[properties] ];
nb ¬ ATOMToSr[thNB];
credentials ¬ CredentialsToSr[thCredentials];
};
CheckIn: PUBLIC CheckInType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.CheckIn[shh: Thrush.none, credentials: SrToCredentials[credentials] ];
nb ¬ ATOMToSr[thNB];
};
Deregister: PUBLIC DeregisterType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.Deregister[shh: Thrush.none, smartsID: smartsID ];
nb ¬ ATOMToSr[thNB];
};
Enable: PUBLIC EnableType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.Enable[shh: Thrush.none, smartsID: smartsID ];
nb ¬ ATOMToSr[thNB];
};
Disable: PUBLIC DisableType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.Disable[shh: Thrush.none, smartsID: smartsID ];
nb ¬ ATOMToSr[thNB];
};
Visit: PUBLIC VisitType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.Visit[shh: Thrush.none, hostPartyID: hostPartyID, guestPartyID: guestPartyID, guestPassword: SrToPassword[guestPassword] ];
nb ¬ ATOMToSr[thNB];
};
Unvisit: PUBLIC UnvisitType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.Unvisit[shh: Thrush.none, hostPartyID: hostPartyID, guestPartyID: guestPartyID, guestPassword: SrToPassword[guestPassword] ];
nb ¬ ATOMToSr[thNB];
};
UnvisitSelf: PUBLIC UnvisitSelfType ~ {
thNB: Thrush.NB;
thNB ¬ ThParty.UnvisitSelf[shh: Thrush.none, guestPartyID: guestPartyID];
nb ¬ ATOMToSr[thNB];
};
}.
Polle Zellweger (PTZ) April 30, 1990 3:56:17 pm PDT
changes to: DIRECTORY, ThPartySunRPCToThParty, IMPORTS, EXPORTS, ~, GetConversationInfo, ConversationInfoToSr, AddressToSr, AttributesToSr
Pier, May 10, 1990 9:58:19 am PDT
moved data conversion routines to ThrushSunRPCConvert
Polle Zellweger (PTZ) May 11, 1990 4:08:39 pm PDT
Atom.GetPName couldn't handle NIL, so make a new conversion routine.
Polle Zellweger (PTZ) October 29, 1990 3:32:25 pm PST
Allow detection of NIL ropes across a SunRPC connection.
changes to: CreateConversation, Alert, Advance, RegisterConversation, GetConversationFromName, DescribeParty, GetParty, GetPartyFromNumber, GetPartyFromFeepNum, GetNumbersForRName, Register