szaszm commented on code in PR #2054:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2054#discussion_r2477804926
##########
extensions/opencv/OpenCVLoader.cpp:
##########
@@ -15,18 +15,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include "core/extension/Extension.h"
+#include "minifi-cpp/core/extension/ExtensionInfo.h"
+#include "minifi-cpp/properties/Configure.h"
#include "utils/Environment.h"
+#include "minifi-cpp/agent/agent_version.h"
-static bool init(const std::shared_ptr<org::apache::nifi::minifi::Configure>&
/*config*/) {
+namespace minifi = org::apache::nifi::minifi;
+
+extern "C" minifi::core::extension::ExtensionInitializer InitExtension = []
(const std::shared_ptr<minifi::Configure>& /*config*/) ->
std::optional<minifi::core::extension::ExtensionInfo> {
Review Comment:
I think this could stay a normal function. Also not sure if shared_ptr and
C++ types are a good idea here, I would use C types.
config: doesn't really need ownership, could be a lookup callback (`const
char* (*)(const char* config_key)`) or a flat array of config properties (array
of structs with 2 const char* members or array of const char* with `=`
separator between key/value)
result: drop the optional, let's say a negative version means unsuccessful
extension init
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]