Plugin system, mk. 1

This commit is contained in:
TheAssassin
2018-06-19 18:02:23 +02:00
parent 47295b7a2a
commit 7c06295cfd
10 changed files with 357 additions and 10 deletions

23
src/plugin_test_main.cpp Normal file
View File

@@ -0,0 +1,23 @@
#include <iostream>
#include <linuxdeploy/plugin/plugin.h>
namespace bf = boost::filesystem;
int main(const int argc, const char* const* const argv) {
if (argc < 2) {
std::cout << "Usage: " << argv[0] << " <path to plugin>" << std::endl;
return 1;
}
const std::string path = argv[1];
std::cout << "Testing plugin: " << path << std::endl;
auto* plugin = linuxdeploy::plugin::createPluginInstance(path);
std::cout << "API level: " << plugin->apiLevel() << std::endl;
std::cout << "Plugin type: " << plugin->pluginType() << " (a.k.a. " << plugin->pluginTypeString() << ")" << std::endl;
return 0;
}