CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TURLProtocol< T, N > Class Template Reference

Creates a new URLProtocol instance. More...

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

Inheritance diagram for CeresEngine::TURLProtocol< T, N >:
CeresEngine::URLProtocol

Public Member Functions

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.
 
virtual bool isRequestSupported (const URLRequest &request)=0
 Checks if the given request is supported by the protocol.
 
virtual Async< URLResponseexecute (Task &connection)=0
 Executes a request.
 

Additional Inherited Members

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

Detailed Description

template<typename T, StringLiteral N>
class CeresEngine::TURLProtocol< T, N >

Creates a new URLProtocol instance.

Member Function Documentation

◆ getName()

template<typename T , StringLiteral N>
StringView CeresEngine::TURLProtocol< T, N >::getName ( ) const
inlinefinalvirtualnoexcept

Returns a string that identifies the protocol by a name.

Implements CeresEngine::URLProtocol.

◆ prepareRequest()

template<typename T , StringLiteral N>
URLRequest CeresEngine::TURLProtocol< T, N >::prepareRequest ( URLRequest &&  request)
inlineoverridevirtual

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.

All transformations will be performed on a copy of the request object and will be passed to execute().

Note
This method must be thread-safe, as it may be called multiple times from different threads.
Parameters
requestThe request to be transformed.
Returns
A prepared request or move request.

Reimplemented from CeresEngine::URLProtocol.

◆ URLProtocol()

template<typename T , StringLiteral N>
CeresEngine::URLProtocol::URLProtocol ( URLSession session)
inlineexplicitnoexcept

Creates a new URLProtocol instance.


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