feat: Added new imhex/capabilities
network interface
This commit is contained in:
parent
14341d611d
commit
636ed0095d
@ -451,7 +451,7 @@ macro(addBundledLibraries)
|
||||
set_property(TARGET libwolv-io PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET libwolv-hash PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET libwolv-containers PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set_property(TARGET libwolv-net PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set(XDGPP_INCLUDE_DIRS "${EXTERN_LIBS_FOLDER}/xdgpp")
|
||||
set(CURL_USE_MBEDTLS ON)
|
||||
|
2
lib/external/libwolv
vendored
2
lib/external/libwolv
vendored
@ -1 +1 @@
|
||||
Subproject commit 7fea1070bd4c2d6767ac3ca6ececbb312c5a5049
|
||||
Subproject commit 113917c4472d61692ac8e8feff922d416efcef1d
|
@ -12,6 +12,24 @@ namespace hex::plugin::builtin {
|
||||
|
||||
return { };
|
||||
});
|
||||
|
||||
ContentRegistry::CommunicationInterface::registerNetworkEndpoint("imhex/capabilities", [](const nlohmann::json &) -> nlohmann::json {
|
||||
nlohmann::json result;
|
||||
|
||||
result["build"] = {
|
||||
{ "version", IMHEX_VERSION },
|
||||
{ "commit", GIT_COMMIT_HASH_LONG },
|
||||
{ "branch", GIT_BRANCH },
|
||||
};
|
||||
|
||||
std::vector<std::string> commands;
|
||||
for (const auto&[command, callback] : ContentRegistry::CommunicationInterface::impl::getNetworkEndpoints())
|
||||
commands.emplace_back(command);
|
||||
|
||||
result["commands"] = commands;
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user