THTTPHost

From Ultibo.org
Revision as of 06:34, 17 May 2018 by Ultibo (Talk | contribs) (Created page with "Return to Unit HTTP __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapse...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit HTTP


Description


To be documented

Class definitions



THTTPHost = class(TListObject)

public
constructor Create;  
destructor Destroy; override;  
private
FLock:TCriticalSectionHandle;  
 
FName:String;  
FHash:LongWord;  
FFlags:LongWord;  
 
FDefaultMimeType:String;  
 
FErrors:TLinkedList;  
FAliases:TLinkedList;  
FModules:TLinkedList;  
FDocuments:TLinkedList;  
FMimeTypes:TLinkedList;  
 
FOnGet:THTTPHostEvent;  
FOnHead:THTTPHostEvent;  
FOnPost:THTTPHostEvent;  
FOnPut:THTTPHostEvent;  
FOnError:THTTPHostEvent;  
 
FOnRequest:THTTPHostEvent;  
FOnResponse:THTTPHostEvent;  
 
function GetName:String;  
procedure SetName(const AName:String);  
procedure SetFlags(AFlags:LongWord);  
 
function GetDefaultMimeType:String;  
procedure SetDefaultMimeType(const ADefaultMimeType:String);  
 
function GetIsDefault:Boolean;  
procedure SetIsDefault(AIsDefault:Boolean);  
function GetIsDomain:Boolean;  
procedure SetIsDomain(AIsDomain:Boolean);  
protected
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
 
function MatchError(AStatus:LongWord):THTTPError; virtual;  
function MatchDocument(const AName:String; var AAlias:THTTPAlias):THTTPDocument; virtual;  
 
function DoGet(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;  
function DoHead(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;  
function DoPost(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;  
function DoPut(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;  
function DoError(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;  
 
function DoRequest(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;  
function DoResponse(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;  
public
property Name:String read GetName write SetName;  
property Hash:LongWord read FHash;  
property Flags:LongWord read FFlags write SetFlags;  
 
property IsDefault:Boolean read GetIsDefault write SetIsDefault;  
property IsDomain:Boolean read GetIsDomain write SetIsDomain;  
 
property DefaultMimeType:String read GetDefaultMimeType write SetDefaultMimeType;  
 
property OnGet:THTTPHostEvent read FOnGet write FOnGet;  
property OnHead:THTTPHostEvent read FOnHead write FOnHead;  
property OnPost:THTTPHostEvent read FOnPost write FOnPost;  
property OnPut:THTTPHostEvent read FOnPut write FOnPut;  
property OnError:THTTPHostEvent read FOnError write FOnError;  
 
property OnRequest:THTTPHostEvent read FOnRequest write FOnRequest;  
property OnResponse:THTTPHostEvent read FOnResponse write FOnResponse;  
 
function FindError(AStatus:LongWord):THTTPError;  
 
function RegisterError(AError:THTTPError):Boolean;  
function DeregisterError(AError:THTTPError):Boolean;  
 
function FindAlias(const AName:String):THTTPAlias;  
function MatchAlias(const AName:String):THTTPAlias; virtual;  
 
function RegisterAlias(AAlias:THTTPAlias):Boolean;  
function DeregisterAlias(AAlias:THTTPAlias):Boolean;  
 
function GetModule(APrevious:THTTPModule):THTTPModule;  
function FindModule(AModule:THTTPModule):THTTPModule;  
 
function RegisterModule(AModule:THTTPModule):Boolean;  
function DeregisterModule(AModule:THTTPModule):Boolean;  
 
function FindDocument(const AName:String):THTTPDocument;  
 
function RegisterDocument(ADocument:THTTPDocument):Boolean;  
function DeregisterDocument(ADocument:THTTPDocument):Boolean;  
 
function LoadMimeTypes:Boolean;  
 
function FindMimeType(const AExtension:String):THTTPMimeType;  
function ResolveMimeType(const AExtension:String):String;  
 
function RegisterMimeType(AMimeType:THTTPMimeType):Boolean;  
function DeregisterMimeType(AMimeType:THTTPMimeType):Boolean;  


Function declarations



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


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


function THTTPHost.GetName:String;
Description: To be documented
Note None documented


procedure THTTPHost.SetName(const AName:String);
Description: To be documented
Note None documented


procedure THTTPHost.SetFlags(AFlags:LongWord);
Description: To be documented
Note None documented


function THTTPHost.GetDefaultMimeType:String;
Description: To be documented
Note None documented


procedure THTTPHost.SetDefaultMimeType(const ADefaultMimeType:String);
Description: To be documented
Note None documented


function THTTPHost.GetIsDefault:Boolean;
Description: To be documented
Note None documented


procedure THTTPHost.SetIsDefault(AIsDefault:Boolean);
Description: To be documented
Note None documented


function THTTPHost.GetIsDomain:Boolean;
Description: To be documented
Note None documented


procedure THTTPHost.SetIsDomain(AIsDomain:Boolean);
Description: To be documented
Note None documented


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


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


function THTTPHost.MatchError(AStatus:LongWord):THTTPError;
Description: To be documented
Note None documented


function THTTPHost.MatchDocument(const AName:String; var AAlias:THTTPAlias):THTTPDocument;
Description: To be documented
Note None documented


function THTTPHost.DoGet(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base GET Method for an HTTP Host
Note None documented


function THTTPHost.DoHead(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base HEAD Method for an HTTP Host
Note None documented


function THTTPHost.DoPost(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base POST Method for an HTTP Host
Note None documented


function THTTPHost.DoPut(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base PUT Method for an HTTP Host
Note None documented


function THTTPHost.DoError(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base Error Method for an HTTP Host
Note None documented


function THTTPHost.DoRequest(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base Request Method for an HTTP Host
Note None documented


function THTTPHost.DoResponse(ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base Response Method for an HTTP Host
Note None documented


function THTTPHost.FindError(AStatus:LongWord):THTTPError;
Description: To be documented
Note None documented


function THTTPHost.RegisterError(AError:THTTPError):Boolean;
Description: To be documented
Note None documented


function THTTPHost.DeregisterError(AError:THTTPError):Boolean;
Description: To be documented
Note None documented


function THTTPHost.FindAlias(const AName:String):THTTPAlias;
Description: To be documented
Note None documented


function THTTPHost.MatchAlias(const AName:String):THTTPAlias;
Description: To be documented
Note None documented


function THTTPHost.RegisterAlias(AAlias:THTTPAlias):Boolean;
Description: To be documented
Note None documented


function THTTPHost.DeregisterAlias(AAlias:THTTPAlias):Boolean;
Description: To be documented
Note None documented


function THTTPHost.GetModule(APrevious:THTTPModule):THTTPModule;
Description: To be documented
Note None documented


function THTTPHost.FindModule(AModule:THTTPModule):THTTPModule;
Description: To be documented
Note None documented


function THTTPHost.RegisterModule(AModule:THTTPModule):Boolean;
Description: To be documented
Note None documented


function THTTPHost.DeregisterModule(AModule:THTTPModule):Boolean;
Description: To be documented
Note None documented


function THTTPHost.FindDocument(const AName:String):THTTPDocument;
Description: To be documented
Note None documented


function THTTPHost.RegisterDocument(ADocument:THTTPDocument):Boolean;
Description: To be documented
Note None documented


function THTTPHost.DeregisterDocument(ADocument:THTTPDocument):Boolean;
Description: To be documented
Note None documented


function THTTPHost.LoadMimeTypes:Boolean;
Description: To be documented
Note None documented


function THTTPHost.FindMimeType(const AExtension:String):THTTPMimeType;
Description: To be documented
Note None documented


function THTTPHost.ResolveMimeType(const AExtension:String):String;
Description: To be documented
Note None documented


function THTTPHost.RegisterMimeType(AMimeType:THTTPMimeType):Boolean;
Description: To be documented
Note None documented


function THTTPHost.DeregisterMimeType(AMimeType:THTTPMimeType):Boolean;
Description: To be documented
Note None documented


Return to Unit Reference