Difference between revisions of "THTTPDocument"
From Ultibo.org
(Created page with "Return to Unit HTTP __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapse...") |
|||
| Line 41: | Line 41: | ||
|- | |- | ||
| <code>FFlags:LongWord;</code> | | <code>FFlags:LongWord;</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>FUserAuthenticator:TAuthenticator;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>FSessionAuthenticator:TAuthenticator;</code> | ||
| | | | ||
|- | |- | ||
| Line 60: | Line 68: | ||
|- | |- | ||
| <code>FOnPut:THTTPDocumentEvent;</code> | | <code>FOnPut:THTTPDocumentEvent;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>FOnError:THTTPDocumentEvent;</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>FOnAuthorize:THTTPAuthorizationEvent;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>FOnAuthenticate:THTTPAuthenticationEvent;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>FOnDeauthenticate:THTTPDeauthenticationEvent;</code> | ||
| | | | ||
|- | |- | ||
| Line 71: | Line 93: | ||
|- | |- | ||
| <code>procedure SetFlags(AFlags:LongWord);</code> | | <code>procedure SetFlags(AFlags:LongWord);</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>function GetUserAuthenticator:TAuthenticator;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>procedure SetUserAuthenticator(AAuthenticator:TAuthenticator);</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function GetSessionAuthenticator:TAuthenticator;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>procedure SetSessionAuthenticator(AAuthenticator:TAuthenticator);</code> | ||
| | | | ||
|- | |- | ||
| Line 97: | Line 133: | ||
|- | |- | ||
| <code>procedure SetIsExtension(AIsExtension:Boolean);</code> | | <code>procedure SetIsExtension(AIsExtension:Boolean);</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function GetRequireAuthorization:Boolean;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>procedure SetRequireAuthorization(ARequireAuthorization:Boolean);</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function GetRequireAuthentication:Boolean;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>procedure SetRequireAuthentication(ARequireAuthentication:Boolean);</code> | ||
| | | | ||
|- | |- | ||
| Line 105: | Line 153: | ||
|- | |- | ||
| <code>function ReleaseLock:Boolean;</code> | | <code>function ReleaseLock:Boolean;</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>function ParseFormParams(AHost:THTTPHost; ARequest:THTTPServerRequest):THTTPParams; virtual;</code> | ||
| | | | ||
|- | |- | ||
| Line 119: | Line 172: | ||
|- | |- | ||
| <code>function DoPut(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;</code> | | <code>function DoPut(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function DoError(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>function DoAuthorize(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; var AAuthorized:Boolean):Boolean; virtual;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function DoAuthenticate(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; var AAuthenticated:Boolean):Boolean; virtual;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>function DoDeauthenticate(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; var ADeauthenticated:Boolean):Boolean; virtual;</code> | ||
| | | | ||
|- | |- | ||
| Line 144: | Line 211: | ||
|- | |- | ||
| <code>property IsExtension:Boolean read GetIsExtension write SetIsExtension;</code> | | <code>property IsExtension:Boolean read GetIsExtension write SetIsExtension;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>property RequireAuthorization:Boolean read GetRequireAuthorization write SetRequireAuthorization;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>property RequireAuthentication:Boolean read GetRequireAuthentication write SetRequireAuthentication;</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>property UserAuthenticator:TAuthenticator read GetUserAuthenticator write SetUserAuthenticator;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>property SessionAuthenticator:TAuthenticator read GetSessionAuthenticator write SetSessionAuthenticator;</code> | ||
| | | | ||
|- | |- | ||
| Line 158: | Line 239: | ||
|- | |- | ||
| <code>property OnPut:THTTPDocumentEvent read FOnPut write FOnPut;</code> | | <code>property OnPut:THTTPDocumentEvent read FOnPut write FOnPut;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>property OnError:THTTPDocumentEvent read FOnError write FOnError;</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>property OnAuthorize:THTTPAuthorizationEvent read FOnAuthorize write FOnAuthorize;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>property OnAuthenticate:THTTPAuthenticationEvent read FOnAuthenticate write FOnAuthenticate;</code> | ||
| + | | | ||
| + | |- | ||
| + | | <code>property OnDeauthenticate:THTTPDeauthenticationEvent read FOnDeauthenticate write FOnDeauthenticate;</code> | ||
| | | | ||
|- | |- | ||
Revision as of 00:37, 24 October 2025
Return to Unit HTTP
Description
To be documented
Class definitions
THTTPDocument = class(TListObject)
public
| |
constructor Create;
|
|
destructor Destroy; override;
|
|
private
| |
FLock:TCriticalSectionHandle;
|
|
FName:String;
|
|
FHash:LongWord;
|
|
FFlags:LongWord;
|
|
FUserAuthenticator:TAuthenticator;
|
|
FSessionAuthenticator:TAuthenticator;
|
|
FAliases:TLinkedList;
|
|
FOnGet:THTTPDocumentEvent;
|
|
FOnHead:THTTPDocumentEvent;
|
|
FOnPost:THTTPDocumentEvent;
|
|
FOnPut:THTTPDocumentEvent;
|
|
FOnError:THTTPDocumentEvent;
|
|
FOnAuthorize:THTTPAuthorizationEvent;
|
|
FOnAuthenticate:THTTPAuthenticationEvent;
|
|
FOnDeauthenticate:THTTPDeauthenticationEvent;
|
|
function GetName:String;
|
|
procedure SetName(const AName:String);
|
|
procedure SetFlags(AFlags:LongWord);
|
|
function GetUserAuthenticator:TAuthenticator;
|
|
procedure SetUserAuthenticator(AAuthenticator:TAuthenticator);
|
|
function GetSessionAuthenticator:TAuthenticator;
|
|
procedure SetSessionAuthenticator(AAuthenticator:TAuthenticator);
|
|
function GetIsDefault:Boolean;
|
|
procedure SetIsDefault(AIsDefault:Boolean);
|
|
function GetIsFolder:Boolean;
|
|
procedure SetIsFolder(AIsFolder:Boolean);
|
|
function GetIsSubtree:Boolean;
|
|
procedure SetIsSubtree(AIsSubtree:Boolean);
|
|
function GetIsExtension:Boolean;
|
|
procedure SetIsExtension(AIsExtension:Boolean);
|
|
function GetRequireAuthorization:Boolean;
|
|
procedure SetRequireAuthorization(ARequireAuthorization:Boolean);
|
|
function GetRequireAuthentication:Boolean;
|
|
procedure SetRequireAuthentication(ARequireAuthentication:Boolean);
|
|
protected
| |
function AcquireLock:Boolean;
|
|
function ReleaseLock:Boolean;
|
|
function ParseFormParams(AHost:THTTPHost; ARequest:THTTPServerRequest):THTTPParams; virtual;
|
|
function DoGet(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;
|
|
function DoHead(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;
|
|
function DoPost(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;
|
|
function DoPut(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;
|
|
function DoError(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; virtual;
|
|
function DoAuthorize(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; var AAuthorized:Boolean):Boolean; virtual;
|
|
function DoAuthenticate(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; var AAuthenticated:Boolean):Boolean; virtual;
|
|
function DoDeauthenticate(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; var ADeauthenticated:Boolean):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 IsFolder:Boolean read GetIsFolder write SetIsFolder;
|
|
property IsSubtree:Boolean read GetIsSubtree write SetIsSubtree;
|
|
property IsExtension:Boolean read GetIsExtension write SetIsExtension;
|
|
property RequireAuthorization:Boolean read GetRequireAuthorization write SetRequireAuthorization;
|
|
property RequireAuthentication:Boolean read GetRequireAuthentication write SetRequireAuthentication;
|
|
property UserAuthenticator:TAuthenticator read GetUserAuthenticator write SetUserAuthenticator;
|
|
property SessionAuthenticator:TAuthenticator read GetSessionAuthenticator write SetSessionAuthenticator;
|
|
property OnGet:THTTPDocumentEvent read FOnGet write FOnGet;
|
|
property OnHead:THTTPDocumentEvent read FOnHead write FOnHead;
|
|
property OnPost:THTTPDocumentEvent read FOnPost write FOnPost;
|
|
property OnPut:THTTPDocumentEvent read FOnPut write FOnPut;
|
|
property OnError:THTTPDocumentEvent read FOnError write FOnError;
|
|
property OnAuthorize:THTTPAuthorizationEvent read FOnAuthorize write FOnAuthorize;
|
|
property OnAuthenticate:THTTPAuthenticationEvent read FOnAuthenticate write FOnAuthenticate;
|
|
property OnDeauthenticate:THTTPDeauthenticationEvent read FOnDeauthenticate write FOnDeauthenticate;
|
|
function FindAlias(const AName:String):THTTPAlias;
|
|
function MatchAlias(const AName:String):THTTPAlias; virtual;
|
|
function RegisterAlias(AAlias:THTTPAlias):Boolean;
|
|
function DeregisterAlias(AAlias:THTTPAlias):Boolean;
|
|
Function declarations
constructor THTTPDocument.Create;
Description: To be documented
| Note | None documented |
|---|
destructor THTTPDocument.Destroy;
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.GetName:String;
Description: To be documented
| Note | None documented |
|---|
procedure THTTPDocument.SetName(const AName:String);
Description: To be documented
| Note | None documented |
|---|
procedure THTTPDocument.SetFlags(AFlags:LongWord);
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.GetIsDefault:Boolean;
Description: To be documented
| Note | None documented |
|---|
procedure THTTPDocument.SetIsDefault(AIsDefault:Boolean);
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.GetIsFolder:Boolean;
Description: To be documented
| Note | None documented |
|---|
procedure THTTPDocument.SetIsFolder(AIsFolder:Boolean);
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.GetIsSubtree:Boolean;
Description: To be documented
| Note | None documented |
|---|
procedure THTTPDocument.SetIsSubtree(AIsSubtree:Boolean);
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.GetIsExtension:Boolean;
Description: To be documented
| Note | None documented |
|---|
procedure THTTPDocument.SetIsExtension(AIsExtension:Boolean);
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.AcquireLock:Boolean;
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.ReleaseLock:Boolean;
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.DoGet(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base GET Method for an HTTP Document
| Note | None documented |
|---|
function THTTPDocument.DoHead(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base HEAD Method for an HTTP Document
| Note | None documented |
|---|
function THTTPDocument.DoPost(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base POST Method for an HTTP Document
| Note | None documented |
|---|
function THTTPDocument.DoPut(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base PUT Method for an HTTP Document
| Note | None documented |
|---|
function THTTPDocument.FindAlias(const AName:String):THTTPAlias;
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.MatchAlias(const AName:String):THTTPAlias;
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.RegisterAlias(AAlias:THTTPAlias):Boolean;
Description: To be documented
| Note | None documented |
|---|
function THTTPDocument.DeregisterAlias(AAlias:THTTPAlias):Boolean;
Description: To be documented
| Note | None documented |
|---|
Return to Unit Reference