-- 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