CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::FileURLProtocol Class Referencefinal

A URLProtocol implementation that fetches resources from the local operating system file system. More...

#include <CeresEngine/Foundation/IO/URLSession.File.hpp>

Inheritance diagram for CeresEngine::FileURLProtocol:
CeresEngine::TURLProtocol< FileURLProtocol, "File"> CeresEngine::URLProtocol

Classes

class  Request
 The URLRequest object for FileURLProtocol. More...
 
class  Response
 The URLResponse object for FileURLProtocol. More...
 

Public Member Functions

bool isRequestSupported (const URLRequest &request) final
 Checks if the given request is supported by the protocol.
 
Async< URLResponseexecute (Task &connection) final
 
- Public Member Functions inherited from CeresEngine::TURLProtocol< FileURLProtocol, "File">
URLRequest prepareRequest (URLRequest &&request) override
 If the request is supported by the protocol, this method is called to perform and transformation that the protocol may be require on the user request object.
 
StringView getName () const noexcept final
 Returns a string that identifies the protocol by a name.
 
 URLProtocol (URLSession &session) noexcept
 Creates a new URLProtocol instance.
 
- Public Member Functions inherited from CeresEngine::URLProtocol
 URLProtocol (URLSession &session) noexcept
 Creates a new URLProtocol instance.
 
virtual ~URLProtocol () noexcept=default
 Destroys the URLProtocol instance.
 

Additional Inherited Members

- Protected Attributes inherited from CeresEngine::URLProtocol
URLSessionmSession
 The session that owns this protocol instance.
 

Detailed Description

A URLProtocol implementation that fetches resources from the local operating system file system.

Member Function Documentation

◆ execute()

Async< URLResponse > CeresEngine::FileURLProtocol::execute ( Task connection)
finalvirtual

◆ isRequestSupported()

bool CeresEngine::FileURLProtocol::isRequestSupported ( const URLRequest request)
finalvirtual

Checks if the given request is supported by the protocol.

This method will be called very often, so it must be efficiently implemented.

Note
This method must be thread-safe, as it may be called multiple times from different threads.
Parameters
requestThe request to check for support.
Returns
True if the protocol can execute the request; false otherwise.

Implements CeresEngine::URLProtocol.


The documentation for this class was generated from the following file: