mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
feat: Added remote SSH file provider
This commit is contained in:
22
plugins/remote/source/plugin_remote.cpp
Normal file
22
plugins/remote/source/plugin_remote.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <hex/plugin.hpp>
|
||||
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#include <pl/api.hpp>
|
||||
|
||||
#include <romfs/romfs.hpp>
|
||||
|
||||
#include <libssh2.h>
|
||||
#include <content/helpers/sftp_client.hpp>
|
||||
#include <content/providers/ssh_provider.hpp>
|
||||
|
||||
IMHEX_PLUGIN_SETUP("Remote", "WerWolv", "Reading data from remote servers") {
|
||||
hex::log::debug("Using romfs: '{}'", romfs::name());
|
||||
for (auto &path : romfs::list("lang"))
|
||||
hex::ContentRegistry::Language::addLocalization(nlohmann::json::parse(romfs::get(path).string()));
|
||||
|
||||
hex::plugin::remote::SFTPClient::init();
|
||||
|
||||
hex::ContentRegistry::Provider::add<hex::plugin::remote::SSHProvider>();
|
||||
}
|
||||
Reference in New Issue
Block a user