lib: bt_plugin_find*(): return status code; add "fail on load error" param
[babeltrace.git] / src / lib / plugin / plugin.h
index edaad960f0a4738e746e07ac4ee604570268980b..46b2b117be7b9b089db11687f2fad155c4c88b0f 100644 (file)
@@ -37,7 +37,7 @@
 
 /* Protection: this file uses BT_LIB_LOG*() macros directly */
 #ifndef BT_LIB_LOG_SUPPORTED
-# error Please include "lib/lib-logging.h" before including this file.
+# error Please include "lib/logging.h" before including this file.
 #endif
 
 enum bt_plugin_type {
@@ -45,12 +45,6 @@ enum bt_plugin_type {
        BT_PLUGIN_TYPE_PYTHON = 1,
 };
 
-enum bt_plugin_status {
-       BT_PLUGIN_STATUS_OK = 0,
-       BT_PLUGIN_STATUS_ERROR = -1,
-       BT_PLUGIN_STATUS_NOMEM = -12,
-};
-
 struct bt_plugin {
        struct bt_object base;
        enum bt_plugin_type type;
@@ -99,8 +93,12 @@ const char *bt_plugin_status_string(enum bt_plugin_status status)
        switch (status) {
        case BT_PLUGIN_STATUS_OK:
                return "BT_PLUGIN_STATUS_OK";
+       case BT_PLUGIN_STATUS_NOT_FOUND:
+               return "BT_PLUGIN_STATUS_NOT_FOUND";
        case BT_PLUGIN_STATUS_ERROR:
                return "BT_PLUGIN_STATUS_ERROR";
+       case BT_PLUGIN_STATUS_LOADING_ERROR:
+               return "BT_PLUGIN_STATUS_LOADING_ERROR";
        case BT_PLUGIN_STATUS_NOMEM:
                return "BT_PLUGIN_STATUS_NOMEM";
        default:
This page took 0.025057 seconds and 4 git commands to generate.