Github user phrocker commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/448#discussion_r239103770 --- Diff: nanofi/include/api/nanofi.h --- @@ -68,60 +94,173 @@ typedef int c2_start_callback(char *); void enable_async_c2(nifi_instance *, C2_Server *, c2_stop_callback *, c2_start_callback *, c2_update_callback *); +/** + * Creates a new, empty flow + * @param instance the instance new flow will belong to + * @return a pointer to the created flow + **/ +flow *create_new_flow(nifi_instance * instance); -uint8_t run_processor(const processor *processor); - -flow *create_new_flow(nifi_instance *); -flow *create_flow(nifi_instance *, const char *); +/** + * Creates new flow and adds the first processor in case a valid name is provided + * @deprecated as there is no proper indication of processor adding errors, --- End diff -- I'm unclear about deprecation. Does this mean that it's deprecated because you have no way of indicating the processor could not be instantiated? Wouldn't that arrive at the case where flow is null? Flow in create_new_flow could be null by virtue of a malloc error, so why deprecate a function that results in the same behavior and fewer function calls?
---