#define __NO_PRAGMAS 1

#include <libraries/filehandler.h>
#include <libraries/dosextens.h>
#include <devices/trackdisk.h>
#include <libraries/arpbase.h>
#include <hardware/custom.h>
#include <exec/execbase.h>
#include <exec/memory.h>
#include <functions.h>

struct Patch
{
	struct Patch	*NextPatch;

	struct IOExtTD	*Request;
	struct Device	*Device;

	VOID		*OldBeginIO;

	char		 UnitName[32];
	UBYTE		 PassWord[32];

	char		 DriverName[32];
};

struct LockSeg
{
	struct MsgPort	 SignalPort;

	struct Task	*Father;
	struct Task	*Child;
	ULONG		 HandShake;

	BPTR		 HandlerSegment;
	LONG		 SegSize;

	struct Patch	*RootPatch;
};

struct LockMsg
{
	struct Message	 ExecMessage;

	char		*DeviceName;
	char		*PassWord;

	BYTE		 Success;
};

extern struct ExecBase		*SysBase;
extern struct DosLibrary	*DOSBase;

#define PORTNAME	"LockDevice"

#define SIG_SHAKE	SIGBREAKF_CTRL_C
#define SIG_QUIT	SIGBREAKF_CTRL_D
#define SIG_PORT	SIGBREAKF_CTRL_E

#define REVISION	1
