Difference between revisions of "Unit RemoteShell"
From Ultibo.org
Line 119: | Line 119: | ||
|- | |- | ||
| <code>FListener:TTelnetListener;</code> | | <code>FListener:TTelnetListener;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure Reset(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure MoveFirst(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure MoveLast(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure MoveLeft(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure MoveRight(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure EraseLine(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure OutputLine(ASession:TTelnetSession; const AValue:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function ExpandLine(ASession:TTelnetSession):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure EraseCharacter(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DeleteCharacter(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure InsertCharacter(ASession:TTelnetSession; ACh:Char);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure OverwriteCharacter(ASession:TTelnetSession; ACh:Char);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure PrevHistory(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure NextHistory(ASession:TTelnetSession);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure CurrentHistory(ASession:TTelnetSession);</code> | ||
| | | | ||
|- | |- | ||
Line 168: | Line 223: | ||
|} | |} | ||
</div></div> | </div></div> | ||
− | |||
'''Telnet session''' | '''Telnet session''' | ||
Revision as of 05:12, 27 March 2018
Return to Unit Reference
Contents
Description
Ultibo Remote Shell unit
To be documented
Constants
Remote shell
REMOTE_SHELL_*
REMOTE_SHELL_DEFAULT_WELCOME = ' (Type HELP for a list of available commands)';
|
Telnet shell
TELNET_SHELL_*
TELNET_SHELL_NAME = 'Telnet Shell';
|
Telnet shell command
TELNET_SHELL_COMMAND_*
TELNET_SHELL_COMMAND_LOGOUT = 'LOGOUT';
|
Telnet shell alias
TELNET_SHELL_ALIAS_*
TELNET_SHELL_ALIAS_EXIT = 'EXIT';
|
SSH shell
SSH_SHELL_*
SSH_SHELL_NAME = 'SSH Shell';
|
SSH shell command
SSH_SHELL_COMMAND_*
SSH_SHELL_COMMAND_LOGOUT = 'LOGOUT';
|
SSH shell alias
SSH_SHELL_ALIAS_*
SSH_SHELL_ALIAS_EXIT = 'EXIT';
|
Type definitions
None defined
Class definitions
Telnet shell
TTelnetShell = class(TShell)
public
| |
constructor Create;
|
|
destructor Destroy; override;
|
|
private
| |
FListener:TTelnetListener;
|
|
procedure Reset(ASession:TTelnetSession);
|
|
procedure MoveFirst(ASession:TTelnetSession);
|
|
procedure MoveLast(ASession:TTelnetSession);
|
|
procedure MoveLeft(ASession:TTelnetSession);
|
|
procedure MoveRight(ASession:TTelnetSession);
|
|
procedure EraseLine(ASession:TTelnetSession);
|
|
procedure OutputLine(ASession:TTelnetSession; const AValue:String);
|
|
function ExpandLine(ASession:TTelnetSession):Boolean;
|
|
procedure EraseCharacter(ASession:TTelnetSession);
|
|
procedure DeleteCharacter(ASession:TTelnetSession);
|
|
procedure InsertCharacter(ASession:TTelnetSession; ACh:Char);
|
|
procedure OverwriteCharacter(ASession:TTelnetSession; ACh:Char);
|
|
procedure PrevHistory(ASession:TTelnetSession);
|
|
procedure NextHistory(ASession:TTelnetSession);
|
|
procedure CurrentHistory(ASession:TTelnetSession);
|
|
protected
| |
procedure TelnetConnected(AConnection:TTelnetConnection);
|
|
procedure TelnetDisconnected(AConnection:TTelnetConnection);
|
|
function TelnetInit(AConnection:TTelnetConnection):Boolean;
|
|
function TelnetChar(AConnection:TTelnetConnection; AChar:Char):Boolean;
|
|
function TelnetCommand(AConnection:TTelnetConnection; ACommand,AOption:Byte; AData:Pointer; ASize:LongWord):Boolean;
|
|
public
| |
property Listener:TTelnetListener read FListener;
|
|
function DoClear(ASession:TShellSession):Boolean; override;
|
|
function DoInput(ASession:TShellSession; var AInput:String):Boolean; override;
|
|
function DoOutputEx(ASession:TShellSession; const AOutput:String; AReturn:Boolean):Boolean; override;
|
|
function MatchSequence(const ASequence:String; var AContinue:Boolean):Boolean;
|
|
function ProcessSequence(const ASequence:String):Boolean;
|
Telnet session
TTelnetSession = class(TShellSession)
public
| |
Command:String;
|
|
Sequence:String;
|
|
Position:LongWord;
|
|
private
| |
public
| |
SSH shell
TSSHShell = class(TShell)
public
| |
constructor Create;
|
|
destructor Destroy; override;
|
|
private
| |
public
| |
Telnet shell logout
TTelnetShellLogout = class(TShellCommand)
public
| |
constructor Create;
|
|
destructor Destroy; override;
|
|
private
| |
public
| |
function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;
|
|
function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;
|
|
function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;
|
SSH shell logout
TSSHShellLogout = class(TShellCommand)
public
| |
constructor Create;
|
|
destructor Destroy; override;
|
|
private
| |
public
| |
Public variables
None defined
Function declarations
Initialization functions
procedure RemoteShellInit;
Description: To be documented
Note | None documented |
---|
Return to Unit Reference