Cleaning up initial commit and restructured some of the execution flow, fixed returns and reference mgmt

This commit is contained in:
Chris Punches
2025-02-23 03:26:49 -05:00
parent 1ce163ef29
commit 932c40275f
7 changed files with 292 additions and 105 deletions

View File

@@ -1,12 +1,29 @@
#pragma once
#include <string>
#include <vector>
/*
* Provides reserved symbol names we look for in modules.
*/
// Define required symbols in one place
namespace module_interface {
// This is the single source of truth for required module symbols
static const std::vector<std::string> required_symbols = {
"dpm_module_execute",
"dpm_module_get_version",
"dpm_get_description"
};
}
// Common interface for all DPM modules
extern "C" {
// Module must export this symbol to be considered valid
int dpm_module_execute(const char* command, int argc, char** argv);
// Module version information
const char* dpm_module_get_version(void);
// Module description information
const char* dpm_get_description(void);
}