Class TRegisteredProtocol
Unit
Declaration
type TRegisteredProtocol = class(TObject)
Description
Details of the registered URL protocol. Do not create instances of this class directly, only use RegisterUrlProtocol that returns an instance of this.
Hierarchy
- TObject
- TRegisteredProtocol
Overview
Nested Types
![]() |
TUrlMimeTypeEvent = function(const Url: String; out Gzipped: Boolean): String of object; |
Properties
![]() |
property Protocol: String read FProtocol; |
![]() |
property ReadEvent: TUrlReadEvent read FReadEvent write FReadEvent; |
![]() |
property WriteEvent: TUrlWriteEvent read FWriteEvent write FWriteEvent; |
![]() |
property AsynchronousReader: TUrlAsynchronousReaderClass
read FAsynchronousReader write FAsynchronousReader; |
![]() |
property DetectMimeTypeFromExtension: Boolean read
GetDetectMimeTypeFromExtension write SetDetectMimeTypeFromExtension
default false; |
![]() |
property ExistsEvent: TUrlExistsEvent read FExistsEvent write FExistsEvent; |
Description
Nested Types
![]() |
TUrlMimeTypeEvent = function(const Url: String; out Gzipped: Boolean): String of object; |
Event called when UriMimeType function wants to get MIME type from given URL. Use with RegisterUrlProtocol. |
Properties
![]() |
property Protocol: String read FProtocol; |
Registered URL |
![]() |
property ReadEvent: TUrlReadEvent read FReadEvent write FReadEvent; |
Optional event to read contents of URLs with given protocol. This event returns TStream from which the called can read. Used for synchronous reading by Download. See https://castle-engine.io/url for more information how our resource loading works. |
![]() |
property WriteEvent: TUrlWriteEvent read FWriteEvent write FWriteEvent; |
Optional event to write contents of URLs with given protocol. This event returns TStream to which the caller can write. Used for writing by URLSaveStream. See https://castle-engine.io/url for more information how our resource saving works. |
![]() |
property AsynchronousReader: TUrlAsynchronousReaderClass
read FAsynchronousReader write FAsynchronousReader; |
Optional class reference to read contents of URLs with given protocol asynchronously. Protocols that want to support asynchronous reading, so that you can easily download the URL contents while performing other operations (like displaying some animation) should provide this. See https://castle-engine.io/url for more information how our resource loading works. |
![]() |
property DetectMimeTypeFromExtension: Boolean read
GetDetectMimeTypeFromExtension write SetDetectMimeTypeFromExtension
default false; |
Can a reasonable MIME type be inferred from the URL extension. This determines whether the routine UriMimeType returns useful MIME type for this protocol. The readers (in ReadEvent and AsynchronousReader) may also use UriMimeType, thus be affected by this property, but they can also use more elaborate ways to determine the downloaded MIME type. For example, reading resources from HTTP(S) allows to (usually) get MIME type from the HTTP(S) server. Using UriMimeType, to determine MIME type from extension, is only a fallback in this case. |
![]() |
property ExistsEvent: TUrlExistsEvent read FExistsEvent write FExistsEvent; |
Optional event to check whether given URL exists (as a directory or file). |
Generated by PasDoc 0.16.0-snapshot.