diff options
| author | saturneric <[email protected]> | 2026-09-14 23:51:56 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-14 23:51:56 +0200 |
| commit | 8c92af69c76ae564fdec14c82feb83ac0c18cf4c (patch) | |
| tree | 909a519b560cfc72f3eeab0d29694f20665ec5a2 | |
| parent | refactor(email): migrate crypto to RAII SDK handles (diff) | |
| download | modules-8c92af69c76ae564fdec14c82feb83ac0c18cf4c.tar.gz modules-8c92af69c76ae564fdec14c82feb83ac0c18cf4c.zip | |
refactor(module): remove legacy export macros
- remove obsolete GF_MODULE_API_DEFINE macro variants
- document the bootstrap table as the new module interface
- retain shared includes for module compatibility
| -rw-r--r-- | include/GFModuleDefine.h | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/include/GFModuleDefine.h b/include/GFModuleDefine.h index e847a0c..1a77bd6 100644 --- a/include/GFModuleDefine.h +++ b/include/GFModuleDefine.h @@ -28,43 +28,13 @@ #pragma once +// The GF_MODULE_API_DEFINE / _V2 macros that used to live here defined the ten +// separately-exported module symbols. They are gone: a module now describes +// itself through the single bootstrap table in GFModuleBootstrap.h, which is +// what lets the host and the module negotiate an ABI and lets the host +// withhold a capability. This header remains for the shared includes. + #include "GFModuleCommonUtils.hpp" #include "GFSDKBuildInfo.h" -#define GF_MODULE_API_DEFINE(id, name, ver, desc, author) \ - auto GFGetModuleGFSDKVersion() -> const char* { \ - return DUP(GF_SDK_VERSION_STR); \ - } \ - auto GFGetModuleGFSDKABIVersion() -> int { return GF_SDK_ABI_VERSION; } \ - auto GFGetModuleQtEnvVersion() -> const char* { \ - return DUP(QT_VERSION_STR); \ - } \ - auto GFGetModuleID() -> const char* { return DUP((id)); } \ - auto GFGetModuleVersion() -> const char* { return DUP((ver)); } \ - auto GFGetModuleMetaData() -> GFModuleMetaData* { \ - return QMapToGFModuleMetaDataList( \ - {{"Name", (name)}, {"Description", (desc)}, {"Author", (author)}}); \ - } -#define GF_MODULE_API_DEFINE_V2(id, name, ver, desc, author) \ - auto GFGetModuleGFSDKVersion() -> const char* { \ - return DUP(GF_SDK_VERSION_STR); \ - } \ - auto GFGetModuleGFSDKABIVersion() -> int { return GF_SDK_ABI_VERSION; } \ - auto GFGetModuleQtEnvVersion() -> const char* { \ - return DUP(QT_VERSION_STR); \ - } \ - auto GFGetModuleID() -> const char* { return DUP((id)); } \ - auto GFGetModuleVersion() -> const char* { return DUP((ver)); } \ - auto GFGetModuleMetaData() -> GFModuleMetaData* { \ - return QMapToGFModuleMetaDataList( \ - {{"Name", (name)}, {"Description", (desc)}, {"Author", (author)}}); \ - } \ - using MEvent = QMap<QString, QString>; \ - using EventHandler = std::function<int(const MEvent&)>; \ - namespace { \ - static QMap<QString, EventHandler> Module##nameEventHandlers; \ - static QMap<QString, EventHandler>& _gr_module_event_handlers = \ - Module##nameEventHandlers; \ - } \ - DEFINE_EXECUTE_API_USING_STANDARD_EVEN_HANDLE_MODEL |
