/*
 * $Header: Network:src/wpllib/RCS/launch.c,v 1.1 93/07/02 17:12:05 rwm Exp Locker: rwm $
 *    WPL Programmer Interface (WPI) prototypes.
 *
 *   *PRELIMINARY RELEASE*
 *
 *  Since the WPI interface is not complete, the interface may change
 *  in a non-backward compatable way.  Make sure the appropriate version
 *  of the library is in use, and document this to your users.
 *

    Copyright (C) 1993 Russell McOrmond

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
*/

#ifndef IS_WPL_LIB
  typedef void slave;
  typedef void wpl_filehandle;
#endif

ULONG wpi_launch(UBYTE *name,UBYTE *startup,ULONG priority,ULONG stack);
BOOL wpi_loadscript(char *scriptname,char *infile);
slave *wpi_findslave(void);
void wpi_execscript(UBYTE *start,slave *thisSlave);

/* WPL variable interface */

UBYTE *wpi_getstring(UBYTE *oldstring,UBYTE *buffer,ULONG len,slave *thisSlave);
BOOL wpi_setvar(UBYTE *variable,UBYTE *value,slave *thisSlave);

BOOL wpi_getvarnum(UBYTE *variable,ULONG *number,slave *thisSlave);
BOOL wpi_setvarnum(UBYTE *variable,ULONG number,slave *thisSlave);

BOOL wpi_getvarbool(UBYTE *variable,slave *thisSlave);
BOOL wpi_setvarbool(UBYTE *variable,BOOL boolean,slave *thisSlave);



/*  XPR style functions - See XPR 2.0 and XPR 3.0 update documentation for
 *  more information
 */
LONG wpi_sflush(slave *thisSlave);
ULONG wpi_sread(UBYTE *Buffer,ULONG Size,LONG Timeout,slave *thisSlave);
LONG wpi_swrite(UBYTE *Buffer,LONG Size,slave *thisSlave);
LONG wpi_chkabort(slave *thisSlave);
void wpi_chkmisc(slave *thisSlave);
LONG wpi_getptr(LONG InfoType,slave *thisSlave);
LONG wpi_fopen(UBYTE *FileName,UBYTE *AccessMode,slave *thisSlave);
LONG wpi_fclose(wpl_filehandle *File,slave *thisSlave);
LONG wpi_fread(APTR Buffer,LONG Size,LONG Count,wpl_filehandle *File,slave *thisSlave);
LONG wpi_fwrite(APTR Buffer,LONG Size,LONG Count,wpl_filehandle *File,slave *thisSlave);
LONG wpi_fseek(wpl_filehandle *File,LONG Offset,LONG Origin,slave *thisSlave);
LONG wpi_update(struct XPR_UPDATE *UpdateInfo,slave *thisSlave);
LONG wpi_ffirst(UBYTE *Buffer,UBYTE *Pattern,slave *thisSlave);
LONG wpi_fnext(LONG OldState,UBYTE *Buffer,UBYTE *Pattern,slave *thisSlave);
LONG wpi_finfo(UBYTE *FileName,LONG InfoType,slave *thisSlave);
ULONG wpi_options(LONG NumOpts,struct xpr_option **Opts,slave *thisSlave);
LONG wpi_unlink(UBYTE *FileName,slave *thisSlave);
LONG wpi_setserial(LONG Status,slave *thisSlave);
LONG wpi_squery(slave *thisSlave);
struct MsgPort *wpi_publicport(slave *thisSlave);
void wpi_waitpubmsg(struct Message *myMsg,slave *thisSlave);
void wpi_docmd(LONG command,ULONG argc,char *argv[],slave *thisSlave);
