New IO class now abstract
This commit is contained in:
parent
eb3a8c4417
commit
dbbd542fa2
|
@ -7,7 +7,7 @@ Interface
|
||||||
Uses
|
Uses
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
m_Input,
|
m_Input,
|
||||||
m_Socket_Class,
|
m_io_Base,
|
||||||
m_Protocol_Queue;
|
m_Protocol_Queue;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
@ -32,7 +32,7 @@ Type
|
||||||
Status : RecProtocolStatus;
|
Status : RecProtocolStatus;
|
||||||
StatusProc : TProtocolStatusProc;
|
StatusProc : TProtocolStatusProc;
|
||||||
AbortProc : TProtocolAbortProc;
|
AbortProc : TProtocolAbortProc;
|
||||||
Client : TSocketClass;
|
Client : TIOBase;
|
||||||
Queue : TProtocolQueue;
|
Queue : TProtocolQueue;
|
||||||
EndTransfer : Boolean;
|
EndTransfer : Boolean;
|
||||||
Connected : Boolean;
|
Connected : Boolean;
|
||||||
|
@ -40,7 +40,7 @@ Type
|
||||||
StatusTimer : LongInt;
|
StatusTimer : LongInt;
|
||||||
ReceivePath : String;
|
ReceivePath : String;
|
||||||
|
|
||||||
Constructor Create (Var C: TSocketClass; Var Q: TProtocolQueue); Virtual;
|
Constructor Create (Var C: TIOBase; Var Q: TProtocolQueue); Virtual;
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
|
|
||||||
Function AbortTransfer : Boolean;
|
Function AbortTransfer : Boolean;
|
||||||
|
@ -58,7 +58,7 @@ Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Constructor TProtocolBase.Create (Var C: TSocketClass; Var Q: TProtocolQueue);
|
Constructor TProtocolBase.Create (Var C: TIOBase; Var Q: TProtocolQueue);
|
||||||
Begin
|
Begin
|
||||||
Client := C;
|
Client := C;
|
||||||
Queue := Q;
|
Queue := Q;
|
||||||
|
|
|
@ -5,7 +5,7 @@ Unit m_Protocol_XModem;
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
m_Socket_Class,
|
m_io_Base,
|
||||||
m_Protocol_Base,
|
m_Protocol_Base,
|
||||||
m_Protocol_Queue;
|
m_Protocol_Queue;
|
||||||
|
|
||||||
|
@ -14,13 +14,13 @@ Type
|
||||||
DoCRC : Boolean;
|
DoCRC : Boolean;
|
||||||
Do1K : Boolean;
|
Do1K : Boolean;
|
||||||
|
|
||||||
Constructor Create (Var C: TSocketClass; Var Q: TProtocolQueue); Override;
|
Constructor Create (Var C: TIOBase; Var Q: TProtocolQueue); Override;
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
Constructor TProtocolXmodem.Create (Var C: TSocketClass; Var Q: TProtocolQueue);
|
Constructor TProtocolXmodem.Create (Var C: TIOBase; Var Q: TProtocolQueue);
|
||||||
Begin
|
Begin
|
||||||
Inherited Create(C, Q);
|
Inherited Create(C, Q);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ Unit m_Protocol_YModem;
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
m_Socket_Class,
|
m_io_Base,
|
||||||
m_Protocol_Queue,
|
m_Protocol_Queue,
|
||||||
m_Protocol_Xmodem;
|
m_Protocol_Xmodem;
|
||||||
|
|
||||||
|
@ -13,13 +13,13 @@ Type
|
||||||
TProtocolYmodem = Class(TProtocolXmodem)
|
TProtocolYmodem = Class(TProtocolXmodem)
|
||||||
UseG : Boolean;
|
UseG : Boolean;
|
||||||
|
|
||||||
Constructor Create (Var C: TSocketClass; Var Q: TProtocolQueue); Override;
|
Constructor Create (Var C: TIOBase; Var Q: TProtocolQueue); Override;
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
Constructor TProtocolYModem.Create (Var C: TSocketClass; Var Q: TProtocolQueue);
|
Constructor TProtocolYModem.Create (Var C: TIOBase; Var Q: TProtocolQueue);
|
||||||
Begin
|
Begin
|
||||||
Inherited Create(C, Q);
|
Inherited Create(C, Q);
|
||||||
|
|
||||||
|
@ -31,4 +31,4 @@ Begin
|
||||||
Inherited Destroy;
|
Inherited Destroy;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
|
|
@ -2,7 +2,7 @@ Unit m_Protocol_Zmodem;
|
||||||
|
|
||||||
{$I M_OPS.PAS}
|
{$I M_OPS.PAS}
|
||||||
|
|
||||||
{$DEFINE ZDEBUG}
|
{.$DEFINE ZDEBUG}
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Uses
|
||||||
m_FileIO,
|
m_FileIO,
|
||||||
m_Strings,
|
m_Strings,
|
||||||
m_Input,
|
m_Input,
|
||||||
m_Socket_Class,
|
m_io_Base,
|
||||||
m_Protocol_Base,
|
m_Protocol_Base,
|
||||||
m_Protocol_Queue;
|
m_Protocol_Queue;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ Type
|
||||||
RxBytes : LongInt;
|
RxBytes : LongInt;
|
||||||
RxCount : LongInt;
|
RxCount : LongInt;
|
||||||
|
|
||||||
Constructor Create (Var C: TSocketClass; Var Q: TProtocolQueue); Override;
|
Constructor Create (Var C: TIOBase; Var Q: TProtocolQueue); Override;
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
|
|
||||||
Procedure QueueReceive; Override;
|
Procedure QueueReceive; Override;
|
||||||
|
@ -187,7 +187,7 @@ Begin
|
||||||
End;
|
End;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
Constructor TProtocolZmodem.Create (Var C: TSocketClass; Var Q: TProtocolQueue);
|
Constructor TProtocolZmodem.Create (Var C: TIOBase; Var Q: TProtocolQueue);
|
||||||
Begin
|
Begin
|
||||||
Inherited Create (C, Q);
|
Inherited Create (C, Q);
|
||||||
|
|
||||||
|
@ -1681,4 +1681,4 @@ Begin
|
||||||
StatusUpdate(False, True);
|
StatusUpdate(False, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
|
|
@ -6,7 +6,7 @@ Interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
m_Output,
|
m_Output,
|
||||||
m_Socket_Class,
|
m_io_Base,
|
||||||
m_Strings;
|
m_Strings;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
@ -14,7 +14,7 @@ Type
|
||||||
Screen : TOutput;
|
Screen : TOutput;
|
||||||
WasValid : Boolean;
|
WasValid : Boolean;
|
||||||
Private
|
Private
|
||||||
Client : TSocketClass;
|
Client : TIOBase;
|
||||||
State : Byte;
|
State : Byte;
|
||||||
SavedX : Byte;
|
SavedX : Byte;
|
||||||
SavedY : Byte;
|
SavedY : Byte;
|
||||||
|
@ -33,7 +33,7 @@ Type
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
Procedure Process (Ch: Char);
|
Procedure Process (Ch: Char);
|
||||||
Procedure ProcessBuf (Var Buf; BufLen : Word);
|
Procedure ProcessBuf (Var Buf; BufLen : Word);
|
||||||
Procedure SetReplyClient (Var Cli: TSocketClass);
|
Procedure SetReplyClient (Var Cli: TIOBase);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
@ -57,7 +57,7 @@ Begin
|
||||||
Inherited Destroy;
|
Inherited Destroy;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TTermAnsi.SetReplyClient (Var Cli: TSocketClass);
|
Procedure TTermAnsi.SetReplyClient (Var Cli: TIOBase);
|
||||||
Begin
|
Begin
|
||||||
Client := Cli;
|
Client := Cli;
|
||||||
End;
|
End;
|
||||||
|
|
Loading…
Reference in New Issue