// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Intrivialftpbase.pas' rev: 10.00

#ifndef IntrivialftpbaseHPP
#define IntrivialftpbaseHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Inglobal.hpp>	// Pascal unit
#include <Inudpbase.hpp>	// Pascal unit
#include <Inudpclient.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Intrivialftpbase
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TIdTFTPMode { tfNetAscii, tfOctet };
#pragma option pop

typedef SmallString<2>  WordStr;

//-- var, const, procedure ---------------------------------------------------
static const Shortint TFTP_RRQ = 0x1;
static const Shortint TFTP_WRQ = 0x2;
static const Shortint TFTP_DATA = 0x3;
static const Shortint TFTP_ACK = 0x4;
static const Shortint TFTP_ERROR = 0x5;
static const Shortint TFTP_OACK = 0x6;
static const Word MaxWord = 0xffff;
static const Shortint hdrsize = 0x4;
#define sBlockSize "blksize"
static const Shortint ErrUndefined = 0x0;
static const Shortint ErrFileNotFound = 0x1;
static const Shortint ErrAccessViolation = 0x2;
static const Shortint ErrAllocationExceeded = 0x3;
static const Shortint ErrIllegalOperation = 0x4;
static const Shortint ErrUnknownTransferID = 0x5;
static const Shortint ErrFileAlreadyExists = 0x6;
static const Shortint ErrNoSuchUser = 0x7;
static const Shortint ErrOptionNegotiationFailed = 0x8;
extern PACKAGE AnsiString __fastcall MakeAckPkt(const Word BlockNumber);
extern PACKAGE void __fastcall SendError(Inudpbase::TInUDPBase* UDPBase, AnsiString APeerIP, const int APort, const Word ErrNumber, AnsiString ErrorString)/* overload */;
extern PACKAGE void __fastcall SendError(Inudpclient::TInUDPClient* UDPClient, const Word ErrNumber, AnsiString ErrorString)/* overload */;
extern PACKAGE void __fastcall SendError(Inudpbase::TInUDPBase* UDPBase, AnsiString APeerIP, const int APort, Sysutils::Exception* E)/* overload */;
extern PACKAGE void __fastcall SendError(Inudpclient::TInUDPClient* UDPClient, Sysutils::Exception* E)/* overload */;

}	/* namespace Intrivialftpbase */
using namespace Intrivialftpbase;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Intrivialftpbase
