TrickleChargeP9813V411.mesa
Copyright Ó 1989 b, 1992y Xerox Corporation. All rights reserved.
Generated by Diebert.pa at September 15, 1989 9:59:26 am PDT
using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST
Tim Diebert: September 18, 1989 3:11:51 pm PDT
DIRECTORY
Basics USING [HWORD, FWORD],
CrRPC,
BulkDataP0V1,
Rope;
TrickleChargeP9813V411: CEDAR DEFINITIONS ~ {
ROPE: TYPE ~ Rope.ROPE;
It is assumed that all times in this interface are BasicTime.GMT LOOPHOLEd in the proper way.
RetrieveType: TYPE ~ PROC [h: CrRPC.Handle, name: ROPE, wantedCreatedTime: INT32, data: CrRPC.BulkDataSink];
Retrieve: RetrieveType;
The general idea here is that you supply the server side with the fullFName and wantedCreatedTime (can be nullGMT) of the file you want. You then read the contents using data.
EnumerateForInfoType: TYPE ~ PROC [h: CrRPC.Handle, pattern: ROPE, info: CrRPC.BulkDataSink];
EnumerateForInfo: EnumerateForInfoType;
This proc is a bit different since the actual data from the Enumeration is sent to the client specified only as a stream of bytes. I propose that the stream of bytes be defined as follows. It is strongly suggested that the definition here be used by both the client and the server. Since this bypasses all type checking, we must be carefull! There is one EnumerationRep for each file in the enumeration.
EnumerationRep: TYPE ~ RECORD [
nameLength: Basics.HWORD, -- if the name of the file is bigger than this we have a real problem.
created: Basics.FWORD, -- really BasicTime.GMT LOOPHOLEd
size: Basics.FWORD, -- number of bytes in the file
nameBytes: PACKED ARRAY [0..0) OF BYTE -- the contents of the name.
];
FileInfoType: TYPE ~ PROC [h: CrRPC.Handle, name: ROPE, wantedCreatedTime: INT32] RETURNS [fullFName: ROPE, bytes: INT32, created: INT32];
FileInfo: FileInfoType;
This procedure takes the name and wantedCreatedTime (can be nullGMT) of the file you want. It then returns the fullFName, size and create date.
AnyBodyHomeType: TYPE ~ PROC [h: CrRPC.Handle] RETURNS [mayBe: INT16];
AnyBodyHome: AnyBodyHomeType;
Poke this proc to see if the server is alive. Should proably become logon if we ever decide to implement it.
FileNotFoundType: TYPE ~ ERROR [file: ROPE];
FileNotFound: FileNotFoundType;
ErrorType: TYPE ~ ERROR [description: ROPE];
Error: ErrorType;
}...