XNSCHPrivate.mesa
Demers, December 11, 1986 8:05:40 pm PST
DIRECTORY
CHOpsP2V3 USING [Authenticator],
CrRPC USING [BulkDataCheckAbortProc, Handle],
IO USING [STREAM],
Rope USING [ROPE],
XNS USING [Host],
XNSCH USING [Conversation, Element]
;
XNSCHPrivate: CEDAR DEFINITIONS ~ {
OPEN CHOps: CHOpsP2V3;
Copied Types
CARD16: TYPE ~ CARDINAL; -- Temporary until Mimosa ????
ROPE: TYPE ~ Rope.ROPE;
Element: TYPE ~ XNSCH.Element;
Conversation: TYPE ~ XNSCH.Conversation;
Conversations
GetAuthenticator: PROC [c: XNSCH.Conversation, host: XNS.Host]
RETURNS [CHOps.Authenticator];
IsGeneric: PROC [c: XNSCH.Conversation]
RETURNS [BOOL];
Bulk Data Stream Procs
BulkDataValueProc: TYPE ~ PROC [stream: IO.STREAM] RETURNS [abort: BOOLFALSE];
A callback to read/write a data value from/to a bulk data stream. IO.Error[...] and transport-specific ERRORs raised here will be caught by the CrRPC package.
ReadBulkDataStream: PROC [h: CrRPC.Handle, stream: IO.STREAM,
checkAbort: CrRPC.BulkDataCheckAbortProc,
readValue: BulkDataValueProc]
RETURNS [abort: BOOL];
WriteSegment: PROC [h: CrRPC.Handle, stream: IO.STREAM,
checkAbort: CrRPC.BulkDataCheckAbortProc,
writeValue: BulkDataValueProc,
n: CARDINAL ← 1]
RETURNS [abort: BOOL, heAborted: BOOL];
! CrRPC.Error
If n > 0 then write the header of a streamOfT element of type nextSegment with count n; then call the BulkDataValueProc n times to fill in the data.
If n=0 then write a streamOfT element of type lastSegment and length 0.
Utilities for building BulkDataSegmentProcs
ReadCard16: PROC [stream: IO.STREAM] RETURNS [CARD16];
ReadRope: PROC [stream: IO.STREAM] RETURNS [rope: ROPE];
ReadElement: PROC [stream: IO.STREAM] RETURNS [element: Element];
ReadOrganization: PROC [stream: IO.STREAM] RETURNS [element: Element];
The object and domain fields of the returned Element are NIL.
ReadDomain: PROC [stream: IO.STREAM] RETURNS [element: Element];
The object field of the returned Element is NIL.
WriteCard16: PROC [stream: IO.STREAM, card16: CARD16];
WriteRope: PROC [stream: IO.STREAM, rope: ROPE];
WriteElement: PROC [stream: IO.STREAM, element: Element];
Invoking a remote procedure
RemoteProc: TYPE ~ PROC[handle: CrRPC.Handle, host: XNS.Host];
CallRemote: PROC [c: Conversation, proc: RemoteProc, domain: ROPENIL,
idempotent: BOOLTRUE];
}...