TNetworkSettings

From Ultibo.org
Jump to: navigation, search

Return to Unit Network


Description


To be documented

Class definitions



TNetworkSettings = class(TObject)

constructor Create;  
destructor Destroy; override;  
private
FLock:TSynchronizerHandle;  
FLocalLock:TMutexHandle;  
 
FHostName:String;  
FDomainName:String;  
FList:TLinkedObjList;  
 
function ReaderLock:Boolean;  
function ReaderUnlock:Boolean;  
function WriterLock:Boolean;  
function WriterUnlock:Boolean;  
 
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
 
function GetHostName:String;  
procedure SetHostName(const AHostName:String);  
 
function GetDomainName:String;  
procedure SetDomainName(const ADomainName:String);  
 
function ExtractName(const AValue,AToken:String):String;  
function ExtractValue(const AValue,AToken:String):String;  
function ExtractPrefix(const AValue:String):String;  
 
function SplitName(const AName:String):String;  
function SplitPrefix(const AName:String):String;  
 
function MergePrefix(const APrefix,AName:String):String;  
 
function TranslateString(const AValue,ADefault:String):String;  
function TranslateInteger(const AValue:String; ADefault:Integer):Integer;  
function TranslateBoolean(const AValue:String; ADefault:Boolean):Boolean;  
 
function GetFromList(const AName:String):TNetworkSetting;  
 
function FindFromList(const AName:String):String;  
function FindFromEnvironment(const AName:String):String;  
public
property HostName:String read GetHostName write SetHostName;  
property DomainName:String read GetDomainName write SetDomainName;  
 
function GetString(const AName:String):String;  
function GetStringDefault(const AName,ADefault:String):String;  
 
function GetInteger(const AName:String):Integer;  
function GetIntegerDefault(const AName:String; ADefault:Integer):Integer;  
 
function GetBoolean(const AName:String):Boolean;  
function GetBooleanDefault(const AName:String; ADefault:Boolean):Boolean;  
 
function AddString(const AName,AValue:String):Boolean;  
function AddInteger(const AName:String; AValue:Integer):Boolean;  
function AddBoolean(const AName:String; AValue:Boolean):Boolean;  
 
function Remove(const AName:String):Boolean;  
 
function LoadFromFile(const AFileName:String; AFlat:Boolean):Boolean;  
function LoadFromStream(AStream:TStream; AFlat:Boolean):Boolean;  
function LoadFromStrings(AStrings:TStrings; AFlat:Boolean):Boolean;  
 
function SaveToFile(const AFileName:String; AFlat:Boolean):Boolean;  
function SaveToStream(AStream:TStream; AFlat:Boolean):Boolean;  
function SaveToStrings(AStrings:TStrings; AFlat:Boolean):Boolean;  
 
function LoadFromEnvironment:Boolean;  


Function declarations



constructor TNetworkSettings.Create;
Description: To be documented
Note None documented


destructor TNetworkSettings.Destroy;
Description: To be documented
Note None documented


function TNetworkSettings.ReaderLock:Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.ReaderUnlock:Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.WriterLock:Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.WriterUnlock:Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.AcquireLock:Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.ReleaseLock:Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.GetHostName:String;
Description: To be documented
Note None documented


procedure TNetworkSettings.SetHostName(const AHostName:String);
Description: To be documented
Note None documented


function TNetworkSettings.GetDomainName:String;
Description: To be documented
Note None documented


procedure TNetworkSettings.SetDomainName(const ADomainName:String);
Description: To be documented
Note None documented


function TNetworkSettings.ExtractName(const AValue,AToken:String):String;
Description: Extract the name from a name value pair
Note None documented


function TNetworkSettings.ExtractValue(const AValue,AToken:String):String;
Description: Extract the value from a name value pair
Note None documented


function TNetworkSettings.ExtractPrefix(const AValue:String):String;
Description: Extract the prefix from the section header
Note None documented


function TNetworkSettings.SplitName(const AName:String):String;
Description: Split name only portion from the complete name
Note None documented


function TNetworkSettings.SplitPrefix(const AName:String):String;
Description: Split prefix from the complete name
Note None documented


function TNetworkSettings.MergePrefix(const APrefix,AName:String):String;
Description: Add prefix to name to make a complete name
Note None documented


function TNetworkSettings.TranslateString(const AValue,ADefault:String):String;
Description: To be documented
Note None documented


function TNetworkSettings.TranslateInteger(const AValue:String; ADefault:Integer):Integer;
Description: To be documented
Note None documented


function TNetworkSettings.TranslateBoolean(const AValue:String; ADefault:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.GetFromList(const AName:String):TNetworkSetting;
Description: To be documented
Note None documented


function TNetworkSettings.FindFromList(const AName:String):String;
Description: To be documented
Note None documented


function TNetworkSettings.FindFromEnvironment(const AName:String):String;
Description: To be documented
Note None documented


function TNetworkSettings.GetString(const AName:String):String;
Description: To be documented
Note None documented


function TNetworkSettings.GetStringDefault(const AName,ADefault:String):String;
Description: To be documented
Note None documented


function TNetworkSettings.GetInteger(const AName:String):Integer;
Description: To be documented
Note None documented


function TNetworkSettings.GetIntegerDefault(const AName:String; ADefault:Integer):Integer;
Description: To be documented
Note None documented


function TNetworkSettings.GetBoolean(const AName:String):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.GetBooleanDefault(const AName:String; ADefault:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.AddString(const AName,AValue:String):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.AddInteger(const AName:String; AValue:Integer):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.AddBoolean(const AName:String; AValue:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.Remove(const AName:String):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.LoadFromFile(const AFileName:String; AFlat:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.LoadFromStream(AStream:TStream; AFlat:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.LoadFromStrings(AStrings:TStrings; AFlat:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.SaveToFile(const AFileName:String; AFlat:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.SaveToStream(AStream:TStream; AFlat:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.SaveToStrings(AStrings:TStrings; AFlat:Boolean):Boolean;
Description: To be documented
Note None documented


function TNetworkSettings.LoadFromEnvironment:Boolean;
Description: To be documented
Note None documented


Return to Unit Reference