Implement plugin with the new lib

This commit is contained in:
jussi
2020-03-18 01:39:44 +02:00
parent 8eb738b9ff
commit 32b3321a33
12 changed files with 212 additions and 154 deletions

View File

@@ -1 +1,34 @@
#include <Plugin.hpp>
#include <iostream>
using namespace TuxClocker::Plugin;
using namespace TuxClocker::Device;
using namespace TuxClocker;
class AMDPlugin : public DevicePlugin {
public:
AMDPlugin();
std::optional<InitializationError> initializationError() {return std::nullopt;}
void foo() {std::cout << "hi from AMD plugin\n";}
TreeNode<DeviceNode> deviceRootNode();
~AMDPlugin() {}
private:
TreeNode<DeviceNode> m_rootNode;
};
AMDPlugin::AMDPlugin() {
/*Assignable a([](auto arg) {
return std::nullopt;
});
DeviceNode root{"AMD", a};
m_rootNode.appendChild(root);*/
}
TreeNode<DeviceNode> AMDPlugin::deviceRootNode() {
;
return m_rootNode;
}
TUXCLOCKER_PLUGIN_EXPORT(AMDPlugin)