diff options
| author | Stefan Boberg <[email protected]> | 2023-10-11 10:05:42 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-11 10:05:42 +0200 |
| commit | 6ca893920560f2e907962c0b6e9b561ba797da38 (patch) | |
| tree | 9ca574b9fb9ab1c60c0203ae2e8c714e25419874 /src/zenhttp/include | |
| parent | remove legacy compute interfaces (#461) (diff) | |
| download | zen-6ca893920560f2e907962c0b6e9b561ba797da38.tar.xz zen-6ca893920560f2e907962c0b6e9b561ba797da38.zip | |
updated plugin API class names (#462)
* renamed some interfaces to improve pluggable transport API
TransportConnectionInterface -> TransportConnection
TransportPluginInterface -> TransportPlugin
TransportServerConnectionHandler -> TransportServerConnection
TransportServerInterface -> TransportServer
Diffstat (limited to 'src/zenhttp/include')
| -rw-r--r-- | src/zenhttp/include/zenhttp/httpplugin.h | 4 | ||||
| -rw-r--r-- | src/zenhttp/include/zenhttp/transportplugin.h | 30 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/zenhttp/include/zenhttp/httpplugin.h b/src/zenhttp/include/zenhttp/httpplugin.h index 409eb1b61..de54b9042 100644 --- a/src/zenhttp/include/zenhttp/httpplugin.h +++ b/src/zenhttp/include/zenhttp/httpplugin.h @@ -33,8 +33,8 @@ public: virtual void RequestExit() override; virtual void Close() override; - void AddPlugin(Ref<TransportPluginInterface> Plugin); - void RemovePlugin(Ref<TransportPluginInterface> Plugin); + void AddPlugin(Ref<TransportPlugin> Plugin); + void RemovePlugin(Ref<TransportPlugin> Plugin); private: Event m_ShutdownEvent; diff --git a/src/zenhttp/include/zenhttp/transportplugin.h b/src/zenhttp/include/zenhttp/transportplugin.h index 38b07d471..fe17680de 100644 --- a/src/zenhttp/include/zenhttp/transportplugin.h +++ b/src/zenhttp/include/zenhttp/transportplugin.h @@ -7,10 +7,10 @@ // Important note: this header is meant to compile standalone // and should therefore not depend on anything from the Zen codebase -class TransportConnectionInterface; -class TransportPluginInterface; -class TransportServerConnectionHandler; -class TransportServerInterface; +class TransportConnection; +class TransportPlugin; +class TransportServerConnection; +class TransportServer; /************************************************************************* @@ -26,7 +26,7 @@ class TransportServerInterface; * appropriate request handlers and ultimately call into functions * which write data back to the client. */ -class TransportServerConnectionHandler +class TransportServerConnection { public: virtual uint32_t AddRef() const = 0; @@ -40,10 +40,10 @@ public: * should use this to manage lifetimes of connections and any * other resources. */ -class TransportServerInterface +class TransportServer { public: - virtual TransportServerConnectionHandler* CreateConnectionHandler(TransportConnectionInterface* Connection) = 0; + virtual TransportServerConnection* CreateConnectionHandler(TransportConnection* Connection) = 0; }; /************************************************************************* @@ -57,13 +57,13 @@ public: * This is responsible for setting up and running the communication * for a given transport. */ -class TransportPluginInterface +class TransportPlugin { public: - virtual uint32_t AddRef() const = 0; - virtual uint32_t Release() const = 0; - virtual void Initialize(TransportServerInterface* ServerInterface) = 0; - virtual void Shutdown() = 0; + virtual uint32_t AddRef() const = 0; + virtual uint32_t Release() const = 0; + virtual void Initialize(TransportServer* ServerInterface) = 0; + virtual void Shutdown() = 0; /** Check whether this transport is usable. */ @@ -75,7 +75,7 @@ public: * There will be one instance of this per established connection and * this interface is used to write response data back to the client. */ -class TransportConnectionInterface +class TransportConnection { public: virtual int64_t WriteBytes(const void* Buffer, size_t DataSize) = 0; @@ -91,7 +91,7 @@ public: extern "C" { - DLL_TRANSPORT_API TransportPluginInterface* CreateTransportPluginInterface(); + DLL_TRANSPORT_API TransportPlugin* CreateTransportPlugin(); } -typedef TransportPluginInterface* (*PfnCreateTransportPluginInterface)(); +typedef TransportPlugin* (*PfnCreateTransportPlugin)(); |