adamdebreceni commented on code in PR #1987:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1987#discussion_r2485846058


##########
minifi-api/include/minifi-c/minifi-c.h:
##########
@@ -0,0 +1,228 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MINIFI_API_INCLUDE_MINIFI_C_MINIFI_C_H_
+#define MINIFI_API_INCLUDE_MINIFI_C_MINIFI_C_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h>
+#include <stdint.h>
+
+#define STRINGIFY_HELPER(X) #X
+#define STRINGIFY(X) STRINGIFY_HELPER(X)
+
+#define MINIFI_API_MAJOR_VERSION 0
+#define MINIFI_API_MINOR_VERSION 1
+#define MINIFI_API_PATCH_VERSION 0
+#define MINIFI_API_VERSION STRINGIFY(MINIFI_API_MAJOR_VERSION) "." 
STRINGIFY(MINIFI_API_MINOR_VERSION) "." STRINGIFY(MINIFI_API_PATCH_VERSION)
+#define MINIFI_API_VERSION_TAG "MINIFI_API_VERSION=[" MINIFI_API_VERSION "]"
+#define MINIFI_NULL 0
+#define OWNED
+
+typedef uint32_t MinifiBool;
+#define MINIFI_TRUE MinifiBool(1)
+#define MINIFI_FALSE MinifiBool(0)
+
+typedef enum MinifiInputRequirement {
+  MINIFI_INPUT_REQUIRED = 0,
+  MINIFI_INPUT_ALLOWED = 1,
+  MINIFI_INPUT_FORBIDDEN = 2
+} MinifiInputRequirement;
+
+typedef struct MinifiStringView {
+  const char* data;
+  uint32_t length;
+} MinifiStringView;
+
+typedef struct MinifiRelationship {
+  MinifiStringView name;
+  MinifiStringView description;
+} MinifiRelationship;
+
+typedef struct MinifiOutputAttribute {
+  MinifiStringView name;
+  uint32_t relationships_count;
+  const MinifiRelationship* relationships_ptr;
+  MinifiStringView description;
+} MinifiOutputAttribute;
+
+typedef struct MinifiDynamicProperty {
+  MinifiStringView name;
+  MinifiStringView value;
+  MinifiStringView description;
+  MinifiBool supports_expression_language;
+} MinifiDynamicProperty;
+
+#define MINIFI_DECLARE_HANDLE(name) typedef struct name ## _T* name
+#define MINIFI_DECLARE_CONST_HANDLE(name) typedef const struct name ## _T* name
+
+MINIFI_DECLARE_CONST_HANDLE(MinifiPropertyValidator);
+MINIFI_DECLARE_HANDLE(MinifiFlowFile);
+MINIFI_DECLARE_HANDLE(MinifiLogger);
+MINIFI_DECLARE_HANDLE(MinifiProcessContext);
+MINIFI_DECLARE_HANDLE(MinifiProcessSession);
+MINIFI_DECLARE_HANDLE(MinifiInputStream);
+MINIFI_DECLARE_HANDLE(MinifiOutputStream);
+MINIFI_DECLARE_HANDLE(MinifiConfigure);
+MINIFI_DECLARE_HANDLE(MinifiExtension);
+MINIFI_DECLARE_HANDLE(MinifiPublishedMetrics);
+
+typedef struct MinifiExtensionCreateInfo {
+  MinifiStringView name;
+  MinifiBool(*initialize)(void*, MinifiConfigure);
+  void* user_data;
+} MinifiExtensionCreateInfo;
+
+typedef enum MinifiStatus {
+  MINIFI_SUCCESS = 0,
+  MINIFI_UNKNOWN_ERROR = 1,
+  MINIFI_NOT_SUPPORTED_PROPERTY = 2,
+  MINIFI_DYNAMIC_PROPERTIES_NOT_SUPPORTED = 3,
+  MINIFI_PROPERTY_NOT_SET = 4,
+  MINIFI_VALIDATION_FAILED = 5,
+  MINIFI_PROCESSOR_YIELD = 6
+} MinifiStatus;

Review Comment:
   done



##########
core-framework/c-api-framework/include/api/core/PublishedMetrics.h:
##########
@@ -0,0 +1,26 @@
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include <vector>
+#include <string>
+
+namespace org::apache::nifi::minifi::api::core {
+
+using PublishedMetrics = std::vector<std::pair<std::string, double>>;

Review Comment:
   done



-- 
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]

Reply via email to