-- File: VFTOps.mesa
-- Last Edit: Stewart, September 17, 1982 12:58 pm
DIRECTORY
Buttons USING [Button],
GraphicsOps USING [BitmapRef],
IO USING [Handle],
Labels USING [Label],
Menus USING [Menu],
Rope USING [ROPE],
Rules USING [Rule],
Segments USING [FP, FPHandle],
Space USING [Handle],
STP USING [Handle],
Stream USING [Handle],
Time USING [Packed],
TypeScript USING [TS],
ViewerClasses USING [Viewer];
VFTOps: DEFINITIONS =
BEGIN
Handle: TYPE = REF VFTObject;
VFTObject: TYPE = MONITORED RECORD [
-- Other data
vftMenu: Menus.Menu ← NIL,
destRope: Rope.ROPE ← NIL,
sourceRope: Rope.ROPE ← NIL,
hostRope: Rope.ROPE ← NIL,
directoryRope: Rope.ROPE ← NIL,
fileNamesRope: Rope.ROPE ← NIL,
localRope: Rope.ROPE ← NIL,
connectNameRope: Rope.ROPE ← NIL,
cPasswordActive: BOOL ← FALSE,
cPasswordRope: Rope.ROPE ← NIL,
update: BOOL ← FALSE,
updateAlways: BOOL ← FALSE,
verify: BOOL ← FALSE,
--other stuff
log: IO.Handle ← NIL,
logIn: IO.Handle ← NIL,
-- variables used in VFileToolDir
buffer: LONG POINTER ← NIL,
bufAllocated: BOOL ← FALSE,
bufSize: CARDINAL ← 0,
bufSpace: Space.Handle,
-- variables used in VFileSupport
task: Task ← [],
user: STP.Handle ← NIL,
pleaseStop: BOOL ← FALSE,
running: BOOL ← FALSE,
opened: BOOL ← FALSE,
haveConfirm: CONDITION,
waitForHalt: CONDITION,
confirmState: VFTOps.ConfirmAbort ← waiting,
-- old Global Variables
options: ListOptionsArray ← DefaultOptions,
newOptions: ListOptionsArray ← DefaultOptions,
data: DataObject ← [],
bits: ARRAY Indicator OF GraphicsOps.BitmapRef,
-- Viewers
win: ViewerClasses.Viewer ← NIL, -- overall container
stop: Buttons.Button ← NIL, -- panic stop
msg: Labels.Label ← NIL, -- message window (top)
-- divider
bottomMsgRule: Rules.Rule ← NIL,
-- string labels of editable fields
stringDirectory: Buttons.Button ← NIL, -- the string "Directory:"
stringFileNames: Buttons.Button ← NIL, -- the string "FileName(s):"
stringLocal: Buttons.Button ← NIL, -- the string "LocalFileName:"
stringDFFile: Buttons.Button ← NIL, -- the string "DF File:"
stringConnect: Buttons.Button ← NIL, -- the string "Connect:"
stringCPassword: Buttons.Button ← NIL, -- the string "Password:"
-- Editable fields
fileNamesBox: ViewerClasses.Viewer ← NIL,
localBox: ViewerClasses.Viewer ← NIL,
dfFileBox: ViewerClasses.Viewer ← NIL,
connectBox: ViewerClasses.Viewer ← NIL,
directoryBox: ViewerClasses.Viewer ← NIL,
cpasswordBox: ViewerClasses.Viewer ← NIL,
-- Buttons in editable section
updateButton: Buttons.Button ← NIL,
updateAlwaysButton: Buttons.Button ← NIL,
exportsOnlyButton: Buttons.Button ← NIL,
verifyButton: Buttons.Button ← NIL,
-- divider
bottomParamRule: Rules.Rule ← NIL,
-- Buttons in command section
commandSW: ViewerClasses.Viewer ← NIL,
commandChildren: ViewerClasses.Viewer ← NIL,
retrieveButton: Buttons.Button ← NIL,
storeButton: Buttons.Button ← NIL,
localListButton: Buttons.Button ← NIL,
remoteListButton: Buttons.Button ← NIL,
listOptionsButton: Buttons.Button ← NIL,
closeButton: Buttons.Button ← NIL,
dfGetButton: Buttons.Button ← NIL,
dfGetBothButton: Buttons.Button ← NIL,
localDeleteButton: Buttons.Button ← NIL,
remoteDeleteButton: Buttons.Button ← NIL,
-- Buttons in confirm subwindow
confirmChildren: ViewerClasses.Viewer ← NIL,
confirmButton: Buttons.Button ← NIL,
denyButton: Buttons.Button ← NIL,
stopButton: Buttons.Button ← NIL,
-- Transfer subwindow
transferChildren: ViewerClasses.Viewer ← NIL,
transferBox: ViewerClasses.Viewer ← NIL,
-- ListOptions subwindow
optionsChildren: ViewerClasses.Viewer ← NIL,
typeOption: Buttons.Button ← NIL,
bytesOption: Buttons.Button ← NIL,
pagesOption: Buttons.Button ← NIL,
authorOption: Buttons.Button ← NIL,
applyOption: Buttons.Button ← NIL,
createOption: Buttons.Button ← NIL,
writeOption: Buttons.Button ← NIL,
readOption: Buttons.Button ← NIL,
abortOption: Buttons.Button ← NIL,
-- divider
bottomCommandRule: Rules.Rule ← NIL,
-- Log window
ts: TypeScript.TS ← NIL,
-- Remote get fields
-- program data
publiconly: BOOL ← FALSE,
ldspace: Space.Handle
];
-- types
Task: TYPE = RECORD [
userName: STRING ← NIL,
userPassword: STRING ← NIL,
connectName: STRING ← NIL,
connectPassword: STRING ← NIL,
host: STRING ← NIL,
sourceFileName: STRING ← NIL,
destFileName: STRING ← NIL,
directory: STRING ← NIL,
task: VFTOps.FTPCommand ← waiting
];
Indicator: TYPE = {off, left, right};
Functions: TYPE = {commands, confirms, empty, options};
Data: TYPE = POINTER TO DataObject;
DataObject: TYPE = RECORD[
optionMenu: BOOLEAN ← FALSE,
function: Functions ← commands,
indicator: Indicator ← off,
transferring: BOOLEAN ← FALSE
];
SmallMap: TYPE = ARRAY [0..16) OF UNSPECIFIED;
ConfirmAbort: TYPE = {waiting, confirm, skip, stop};
FTPCommand: TYPE = {
waiting, localList, localDelete, store, remoteList,
remoteDelete, retrieve, dfGet, dfGetBoth};
ListOptions: TYPE = {type, bytes, pages, create, write, read, author};
ListOptionsArray: TYPE = ARRAY ListOptions OF BOOL;
-- Values
DefaultOptions: ListOptionsArray = [
type: FALSE, bytes: TRUE, pages: FALSE, create: TRUE,
write: FALSE, read: FALSE, author: FALSE
];
LeftSmallMap: SmallMap = [
177400B, 177400B, 177400B, 177400B, 177400B, 177400B, 177400B, 177400B,
000377B, 000377B, 000377B, 000377B, 000377B, 000377B, 000377B, 000377B
];
RightSmallMap: SmallMap = [
000377B, 000377B, 000377B, 000377B, 000377B, 000377B, 000377B, 000377B,
177400B, 177400B, 177400B, 177400B, 177400B, 177400B, 177400B, 177400B
];
-- Exported Procedures from WFileInterface
PostComment: PROC [self: Handle, s: Rope.ROPE];
NeedConfirm: PROC [self: Handle];
NeedCommand: PROC [self: Handle];
InvertIndicator: PROC [self: Handle];
-- Exported procedures from WFileSupport
CloseCommand: PROC [self: Handle];
GiveCommand: PROC [self: Handle, command: FTPCommand];
GiveConfirm: PROC [self: Handle, confirm: ConfirmAbort];
StopFTP: PROC [self: Handle];
FreeTask: PROC [t: Task] RETURNS [Task];
-- Exported procedures from WFileToolDir
WriteDiskForRetrieve: PROCEDURE [
self: Handle, from: Stream.Handle, name: STRING, fpHint: Segments.FPHandle, create: Time.Packed, remoteName: LONG STRING, t: Task]
RETURNS [bytes: LONG CARDINAL];
DestroyFile: PROC [self: Handle, fp: Segments.FPHandle, name: STRING];
Enumerate: PROC [
self: Handle,
files: STRING,
proc: PROC [fp: Segments.FPHandle, file: STRING] RETURNS [BOOL],
wantWholeName: BOOL];
FileExists: PROC [self: Handle, name: STRING, cap: Segments.FPHandle] RETURNS [yes: BOOL];
FreeBufferPages: PROC [self: Handle, buf: LONG POINTER];
GetBufferPages: PROC [self: Handle, pages: CARDINAL] RETURNS [buf: LONG POINTER];
NoMoreRoom: PROC RETURNS [ERROR];
-- Exported procedures from WRemoteGetImpl
BuildOuter: PROC [self: Handle];
GetTheFile: PROC [self: Handle, getboth: BOOL];
RGDestroy: PROC [self: Handle];
END.
-- Phil Karlton Nov 21, 1980 12:43 PM
26-Jan-82 0:47:35, Stewart, created from FileToolOps.mesa
25-Jan-82 23:07:51, Stewart, Objects
29-Jan-82 18:19:08, Stewart, object monitor
March 27, 1982 7:49 pm, Stewart, cleanup and Cedar 3.0 revisions
June 7, 1982 7:23 pm, Stewart, pagesOption
July 3, 1982 7:53 pm, Stewart, name changes
September 16, 1982 10:33 am, Stewart, Cedar 3.4