diff options
| author | Dmytro Ivanov <[email protected]> | 2024-10-02 14:50:08 +0200 |
|---|---|---|
| committer | Dmytro Ivanov <[email protected]> | 2024-10-02 15:46:27 +0200 |
| commit | bec66d81db35a72258ef68df87abcfa350012e97 (patch) | |
| tree | a85609b1fbfba614f61239cb786fc4421e5552fc /src | |
| parent | wip (diff) | |
| download | zen-di/poc_zen_command_plugins.tar.xz zen-di/poc_zen_command_plugins.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/transports/transport-sdk/include/serverplugin.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/transports/transport-sdk/include/serverplugin.h b/src/transports/transport-sdk/include/serverplugin.h index c5c02dea9..92370956b 100644 --- a/src/transports/transport-sdk/include/serverplugin.h +++ b/src/transports/transport-sdk/include/serverplugin.h @@ -6,19 +6,23 @@ namespace zen { -class ServerAPI +static constexpr uint32_t kZenPluginApiVersion = 1; + +class ZenServerAPI { public: - virtual uint32_t GetCurrentPort(); + virtual uint32_t GetCurrentServerPort(); + + virtual void RegisterEndpoint(); }; -class ServerPlugin +class ZenServerPlugin { public: virtual uint32_t AddRef() const = 0; virtual uint32_t Release() const = 0; virtual void Configure(const char* OptionTag, const char* OptionValue) = 0; - virtual void Initialize(const uint32_t APIVersion, ServerAPI* ServerInterface) = 0; + virtual void Initialize() = 0; virtual void Shutdown() = 0; virtual const char* GetDebugName() = 0; }; @@ -33,7 +37,7 @@ public: extern "C" { - DLL_TRANSPORT_API zen::ServerPlugin* CreateServerPlugin(); + DLL_TRANSPORT_API bool CreateZenServerPlugin(const uint32_t CurrentApiVersion, zen::ZenServerAPI* ServerInterface); } -typedef zen::ServerPlugin* (*PfnCreateServerPlugin)(); +typedef zen::ZenServerPlugin* (*PfnCreateZenServerPlugin)(const uint32_t CurrentApiVersion, zen::ZenServerAPI* ServerInterface); |