Difference between revisions of "Unit Shell"

From Ultibo.org
Jump to: navigation, search
Line 257: Line 257:
  
  
'''Shell manager'''
+
'''Shell specific classes
  
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
<code>TShellManager = class(TObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellManager|<code>TShellManager = class(TObject)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FLock:TCriticalSectionHandle;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FShells:TLinkedList;</code>
+
| &nbsp;
+
|-
+
| <code>FCommands:TLinkedList;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function AcquireLock:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ReleaseLock:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function GetShell(APrevious:TShell; ALock,AUnlock:Boolean):TShell;</code>
+
| &nbsp;
+
|-
+
| <code>function FindShell(const AName:String):TShell;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function RegisterShell(AShell:TShell):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function DeregisterShell(AShell:TShell):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCommand(APrevious:TShellCommand; ALock,AUnlock:Boolean):TShellCommand;</code>
+
| &nbsp;
+
|-
+
| <code>function FindCommand(const AName:String):TShellCommand;</code>
+
| &nbsp;
+
|-
+
| <code>function DefaultCommand:TShellCommand;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function RegisterCommand(ACommand:TShellCommand):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function DeregisterCommand(ACommand:TShellCommand):Boolean;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShell = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FManager:TShellManager;</code>
+
| &nbsp;
+
|-
+
| <code>FAuthenticator:TAuthenticator;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FLock:TCriticalSectionHandle;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FSessions:TLinkedList;</code>
+
| &nbsp;
+
|-
+
| <code>FCommands:TLinkedList;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FBanner:String;</code>
+
| &nbsp;
+
|-
+
| <code>FPrompt:String;</code>
+
| &nbsp;
+
|-
+
| <code>FError:String;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FName:String;</code>
+
| &nbsp;
+
|-
+
| <code>FHash:LongWord;</code>
+
| &nbsp;
+
|-
+
| <code>FFlags:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>procedure SetAuthenticator(AAuthenticator:TAuthenticator);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetBanner:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetBanner(const ABanner:String);</code>
+
| &nbsp;
+
|-
+
| <code>function GetPrompt:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetPrompt(const APrompt:String);</code>
+
| &nbsp;
+
|-
+
| <code>function GetError:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetError(const AError:String);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetName:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetName(const AName:String);</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetFlags(AFlags:LongWord);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function AcquireLock:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ReleaseLock:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Manager:TShellManager read FManager;</code>
+
| &nbsp;
+
|-
+
| <code>property Authenticator:TAuthenticator read FAuthenticator write SetAuthenticator;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Banner:String read GetBanner write SetBanner;</code>
+
| &nbsp;
+
|-
+
| <code>property Prompt:String read GetPrompt write SetPrompt;</code>
+
| &nbsp;
+
|-
+
| <code>property Error:String read GetError write SetError;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Name:String read GetName write SetName;</code>
+
| &nbsp;
+
|-
+
| <code>property Hash:LongWord read FHash;</code>
+
| &nbsp;
+
|-
+
| <code>property Flags:LongWord read FFlags write SetFlags;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoClear(ASession:TShellSession):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoBanner(ASession:TShellSession):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoPrompt(ASession:TShellSession):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoError(ASession:TShellSession):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoInput(ASession:TShellSession; var AInput:String):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoOutput(ASession:TShellSession; const AOutput:String):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoOutputEx(ASession:TShellSession; const AOutput:String; AReturn:Boolean):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoGetSize(ASession:TShellSession; var ARows,ACols:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoSetSize(ASession:TShellSession; ARows,ACols:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoGetCursor(ASession:TShellSession; var ARow,ACol:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoSetCursor(ASession:TShellSession; ARow,ACol:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoGetColors(ASession:TShellSession; var AForecolor,ABackcolor:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoSetColors(ASession:TShellSession; AForecolor,ABackcolor:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoGetCoordinates(ASession:TShellSession; var ARow,ACol:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoSetCoordinates(ASession:TShellSession; ARow,ACol:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoGetCursorMode(ASession:TShellSession; var AMode:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoSetCursorMode(ASession:TShellSession; AMode:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoGetCursorShape(ASession:TShellSession; var AShape:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoSetCursorShape(ASession:TShellSession; AShape:LongWord):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSession(APrevious:TShellSession; ALock,AUnlock:Boolean):TShellSession;</code>
+
| &nbsp;
+
|-
+
| <code>function FindSession(AIdentifier:LongWord):TShellSession;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateSession(AIdentifier:LongWord):TShellSession;</code>
+
| &nbsp;
+
|-
+
| <code>function DestroySession(ASession:TShellSession):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function RegisterSession(ASession:TShellSession):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function DeregisterSession(ASession:TShellSession):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCommand(APrevious:TShellCommand; ALock,AUnlock:Boolean):TShellCommand;</code>
+
| &nbsp;
+
|-
+
| <code>function FindCommand(const AName:String):TShellCommand;</code>
+
| &nbsp;
+
|-
+
| <code>function DefaultCommand:TShellCommand;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function RegisterCommand(ACommand:TShellCommand):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function DeregisterCommand(ACommand:TShellCommand):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function MatchCommand(const ACommand:String; var AName:String; var AParameters:TStrings; var AContinue:Boolean):TShellCommand; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function CompleteCommand(ASession:TShellSession; const ACommand:String; var AError:Boolean):String; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ProcessCommand(ASession:TShellSession; const ACommand:String):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CommandName(const ACommand:String):String;</code>
+
| &nbsp;
+
|-
+
| <code>function CommandSplit(const ACommand:String):TStrings;</code>
+
| &nbsp;
+
|-
+
| <code>function CommandJoin(AParameters:TStrings):String;</code>
+
| &nbsp;
+
|-
+
| <code>function CommandParse(const ACommand:String; var AName:String; var AParameters:TStrings):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function CommandConcat(const AName:String; AParameters:TStrings):String;</code>
+
| &nbsp;
+
|-
+
| <code>function CommandIndex(AIndex:Integer; const ACommand:String):String;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ParameterIndex(AIndex:Integer; AParameters:TStrings):String;</code>
+
| &nbsp;
+
|-
+
| <code>function ParameterValue(const AParameter:String; AParameters:TStrings):String;</code>
+
| &nbsp;
+
|-
+
| <code>function ParameterExists(const AParameter:String; AParameters:TStrings):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ParameterValueEx(const AParameter:String; AParameters:TStrings; APlus,AMinus:Boolean):String;</code>
+
| &nbsp;
+
|-
+
| <code>function ParameterExistsEx(const AParameter:String; AParameters:TStrings; APlus,AMinus:Boolean):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
| <code>function AddOutput(var AOutput:String; ACol:LongWord; const AValue:String):Boolean;</code>
+
| [[TShell|<code>TShell = class(TListObject)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div> 
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell session'''
+
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellSession = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellSession|<code>TShellSession = class(TListObject)</code>]]
|-
+
| <code>constructor Create(AShell:TShell; AIdentifier:LongWord);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FShell:TShell;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FLock:TCriticalSectionHandle; </code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FIdentifier:LongWord;</code>
+
| Unique identifier for this session
+
|-
+
| <code>FFlags:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FPrompt:String;</code>
+
| Current prompt for this session
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FData:Pointer;</code>
+
| Shell private data for this session
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FHistories:TLinkedObjList;</code>
+
| &nbsp;
+
|-
+
| <code>FCurrentHistory:TShellHistory;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>procedure SetFlags(AFlags:LongWord);</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetData(AData:Pointer);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetPrompt:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetPrompt(const APrompt:String);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function AcquireLock:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ReleaseLock:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Shell:TShell read FShell;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Identifier:LongWord read FIdentifier;</code>
+
| &nbsp;
+
|-
+
| <code>property Flags:LongWord read FFlags write SetFlags;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Prompt:String read GetPrompt write SetPrompt;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Data:Pointer read FData write SetData;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddHistory(const ACommand:String):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure ClearHistory;</code>
+
| &nbsp;
+
|-
+
| <code>function FirstHistory:String;</code>
+
| &nbsp;
+
|-
+
| <code>function LastHistory:String;</code>
+
| &nbsp;
+
|-
+
| <code>function NextHistory:String;</code>
+
| &nbsp;
+
|-
+
| <code>function PrevHistory:String;</code>
+
| &nbsp;
+
|-
+
| <code>function CurrentHistory:String;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommand = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FManager:TShellManager;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FLock:TCriticalSectionHandle; </code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FAliases:TLinkedList;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FName:String;</code>
+
| &nbsp;
+
|-
+
| <code>FHash:LongWord;</code>
+
| &nbsp;
+
|-
+
| <code>FFlags:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetName:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetName(const AName:String);</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetFlags(AFlags:LongWord);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function AcquireLock:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ReleaseLock:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Manager:TShellManager read FManager;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Name:String read GetName write SetName;</code>
+
| &nbsp;
+
|-
+
| <code>property Hash:LongWord read FHash;</code>
+
| &nbsp;
+
|-
+
| <code>property Flags:LongWord read FFlags write SetFlags;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoDefault(AShell:TShell; ASession:TShellSession; const AName:String; AParameters:TStrings):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function DoExtended(AShell:TShell; ASession:TShellSession; const AName:String; AParameters:TStrings):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DoCompletion(AShell:TShell; ASession:TShellSession; const AName:String; AParameters:TStrings; var AError:Boolean):String; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetAlias(APrevious:TShellAlias; ALock,AUnlock:Boolean):TShellAlias;</code>
+
| &nbsp;
+
|-
+
| <code>function FindAlias(const AName:String):TShellAlias;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function RegisterAlias(AAlias:TShellAlias):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function DeregisterAlias(AAlias:TShellAlias):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
| <code>function MatchAlias(const AName:String; var AContinue:Boolean):TShellAlias;</code>
+
| [[TShellCommand|<code>TShellCommand = class(TListObject)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell alias'''
+
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellAlias = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellAlias|<code>TShellAlias = class(TListObject)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FLock:TCriticalSectionHandle; </code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FName:String;</code>
+
| &nbsp;
+
|-
+
| <code>FHash:LongWord;</code>
+
| &nbsp;
+
|-
+
| <code>FFlags:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetName:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetName(const AName:String);</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetFlags(AFlags:LongWord);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function AcquireLock:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ReleaseLock:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Name:String read GetName write SetName;</code>
+
| &nbsp;
+
|-
+
| <code>property Hash:LongWord read FHash;</code>
+
| &nbsp;
+
|-
+
| <code>property Flags:LongWord read FFlags write SetFlags;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell history'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellHistory = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FCommand:String;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>FLength:Integer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Command:String read FCommand write FCommand;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>property Length:Integer read FLength write FLength;</code>
+
| [[TShellHistory|<code>TShellHistory = class(TListObject)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command help'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandHelp = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellCommandHelp|<code>TShellCommandHelp = class(TShellCommand)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command information'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandInfo = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| [[TShellCommandInfo|<code>TShellCommandInfo = class(TShellCommand)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command version'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandVer = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellCommandVer|<code>TShellCommandVer = class(TShellCommand)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command time'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandTime = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| [[TShellCommandTime|<code>TShellCommandTime = class(TShellCommand)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command clear'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandClear = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellCommandClear|<code>TShellCommandClear = class(TShellCommand)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command restart'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandRestart = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| [[TShellCommandRestart|<code>TShellCommandRestart = class(TShellCommand)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command shutdown'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandShutdown = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellCommandShutdown|<code>TShellCommandShutdown = class(TShellCommand)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
'''Shell command uptime'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandUptime = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| [[TShellCommandUptime|<code>TShellCommandUptime = class(TShellCommand)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command threads'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandThreads = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellCommandThreads|<code>TShellCommandThreads = class(TShellCommand)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command memory'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandMemory = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
| [[TShellCommandMemory|<code>TShellCommandMemory = class(TShellCommand)</code>]]
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div> 
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Shell command devices'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TShellCommandDevices = class(TShellCommand)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code>
+
| [[TShellCommandDevices|<code>TShellCommandDevices = class(TShellCommand)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div> 
 
 
<br />
 
<br />
  

Revision as of 03:57, 29 May 2018

Return to Unit Reference


Description


Ultibo Generic Shell unit

To be documented

Constants



Shell specific constants SHELL_*
SHELL_LINE_END = Chr(13) + Chr(10); {CR LF}  
 
SHELL_DEFAULT_BANNER = 'Ultibo Core (Release: ' + ULTIBO_RELEASE_NAME + ' Version: ' + ULTIBO_RELEASE_VERSION + ' Date: ' + ULTIBO_RELEASE_DATE + ')';  
SHELL_DEFAULT_PROMPT = '>';  
SHELL_DEFAULT_ERROR = 'Huh?';  


Shell flag SHELL_FLAG_*
SHELL_FLAG_NONE = $00000000;  
SHELL_FLAG_CLEAR = $00000001;  
SHELL_FLAG_SIZE = $00000002;  
SHELL_FLAG_CURSOR = $00000004;  
SHELL_FLAG_COLORS = $00000008;  
SHELL_FLAG_COORDINATES = $00000010;  


Shell cursor mode SHELL_CURSOR_MODE_*
SHELL_CURSOR_MODE_INSERT = 0;  
SHELL_CURSOR_MODE_OVERWRITE = 1;  


Shell cursor shape SHELL_CURSOR_SHAPE_*
SHELL_CURSOR_SHAPE_LINE = 0;  
SHELL_CURSOR_SHAPE_BAR = 1;  
SHELL_CURSOR_SHAPE_BLOCK = 2;  


Shell session flag SHELL_SESSION_FLAG_*
SHELL_SESSION_FLAG_NONE = $00000000;  


Shell command flag SHELL_COMMAND_FLAG_*
SHELL_COMMAND_FLAG_NONE = $00000000;  
SHELL_COMMAND_FLAG_HIDDEN = $00000001; Hidden command, do not show in HELP or INFO
SHELL_COMMAND_FLAG_HELP = $00000002; Command has HELP available
SHELL_COMMAND_FLAG_INFO = $00000004; Command has INFO available
SHELL_COMMAND_FLAG_DEFAULT = $00000008; Default command, pass unknown commands to this before showing error
SHELL_COMMAND_FLAG_EXTENDED = $00000008; Extended command, pass command name to command for extended handling
SHELL_COMMAND_FLAG_COMPLETION = $00000008; Command supports auto completion


Shell alias flag SHELL_ALIAS_FLAG_*
SHELL_ALIAS_FLAG_NONE = $00000000;  
SHELL_ALIAS_FLAG_HIDDEN = $00000001; Hidden alias, do not show in HELP or INFO


Shell command SHELL_COMMAND_*
SHELL_COMMAND_HELP = 'HELP';  
SHELL_COMMAND_INFO = 'INFO';  
SHELL_COMMAND_VER = 'VER';  
SHELL_COMMAND_TIME = 'TIME';  
SHELL_COMMAND_CLS = 'CLS';  
SHELL_COMMAND_RESTART = 'RESTART';  
SHELL_COMMAND_SHUTDOWN = 'SHUTDOWN';  
SHELL_COMMAND_CPU = 'CPU';  
SHELL_COMMAND_UPTIME = 'UPTIME';  
SHELL_COMMAND_WORKER = 'WORKER';  
SHELL_COMMAND_THREAD = 'THREAD';  
SHELL_COMMAND_MEMORY = 'MEMORY';  
SHELL_COMMAND_DEVICE = 'DEVICE';  


Shell alias SHELL_ALIAS_*
SHELL_ALIAS_HELP = '?';  
SHELL_ALIAS_VERSION = 'VERSION';  
SHELL_ALIAS_CLEAR = 'CLEAR';  
SHELL_ALIAS_REBOOT = 'REBOOT';  


Shell history SHELL_HISTORY_*
SHELL_HISTORY_MAX_COUNT = 100;  


Shell logging SHELL_LOG_*
SHELL_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG; Shell debugging messages
SHELL_LOG_LEVEL_INFO = LOG_LEVEL_INFO; Shell informational messages
SHELL_LOG_LEVEL_WARN = LOG_LEVEL_WARN; Shell warning messages
SHELL_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR; Shell error messages
SHELL_LOG_LEVEL_NONE = LOG_LEVEL_NONE; No Shell messages


Type definitions


None defined

Class definitions



Shell specific classes

TShellManager = class(TObject)
TShell = class(TListObject)
TShellSession = class(TListObject)
TShellCommand = class(TListObject)
TShellAlias = class(TListObject)
TShellHistory = class(TListObject)
TShellCommandHelp = class(TShellCommand)
TShellCommandInfo = class(TShellCommand)
TShellCommandVer = class(TShellCommand)
TShellCommandTime = class(TShellCommand)
TShellCommandClear = class(TShellCommand)
TShellCommandRestart = class(TShellCommand)
TShellCommandShutdown = class(TShellCommand)
TShellCommandUptime = class(TShellCommand)
TShellCommandThreads = class(TShellCommand)
TShellCommandMemory = class(TShellCommand)
TShellCommandDevices = class(TShellCommand)


Public variables



Shell logging

SHELL_DEFAULT_LOG_LEVEL:LongWord = SHELL_LOG_LEVEL_DEBUG; Minimum level for Shell messages. Only messages with level greater than or equal to this will be printed.
SHELL_LOG_ENABLED:Boolean;


Function declarations



Initialization functions

procedure ShellInit;
Description: To be documented
Note None documented


Shell functions

function ShellGetShell(APrevious:TShell; ALock,AUnlock:Boolean):TShell;
Description: To be documented
Note None documented


function ShellFindShell(const AName:String):TShell;
Description: To be documented
Note None documented


function ShellRegisterShell(AShell:TShell):Boolean;
Description: To be documented
Note None documented


function ShellDeregisterShell(AShell:TShell):Boolean;
Description: To be documented
Note None documented


function ShellGetCommand(APrevious:TShellCommand; ALock,AUnlock:Boolean):TShellCommand;
Description: To be documented
Note None documented


function ShellFindCommand(const AName:String):TShellCommand;
Description: To be documented
Note None documented


function ShellRegisterCommand(ACommand:TShellCommand):Boolean;
Description: To be documented
Note None documented


function ShellDeregisterCommand(ACommand:TShellCommand):Boolean;
Description: To be documented
Note None documented


Shell helper functions

procedure ShellLog(Level:LongWord; const AText:String);
Description: To be documented
Note None documented


procedure ShellLogInfo(const AText:String); inline;
Description: To be documented
Note None documented


procedure ShellLogWarn(const AText:String); inline;
Description: To be documented
Note None documented


procedure ShellLogError(const AText:String); inline;
Description: To be documented
Note None documented


procedure ShellLogDebug(const AText:String); inline;
Description: To be documented
Note None documented


Return to Unit Reference