Build system: build reader plug-in stub
[babeltrace.git] / include / babeltrace / plugin / plugin-lib.h
index 8bafd263ba6ec8949e840f849779269ff2d34e5d..bea8665a532263ef9a3f20fe210c19cdb089d37a 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include <babeltrace/objects.h>
+#include <babeltrace/plugin/plugin.h>
 #include <stdint.h>
 
 #ifdef __cplusplus
@@ -37,16 +38,6 @@ extern "C" {
 struct bt_plugin;
 struct bt_notification;
 
-enum bt_plugin_type {
-       BT_PLUGIN_TYPE_UNKNOWN = -1,
-       /* A source plug-in is a notification generator. */
-       BT_PLUGIN_TYPE_SOURCE = 0,
-       /* A sink plug-in handles incoming notifications. */
-       BT_PLUGIN_TYPE_SINK = 1,
-       /* A filter plug-in implements both SOURCE and SINK interfaces. */
-       BT_PLUGIN_TYPE_FILTER = 2,
-};
-
 /**
  * Plug-in discovery functions.
  *
@@ -57,16 +48,29 @@ enum bt_plugin_type {
  * The functions marked as mandatory MUST be exported by the shared object
  * to be considered a valid plug-in.
  */
-enum bt_plugin_type bt_plugin_lib_get_type(void);
-const char *bt_plugin_lib_get_format_name(void);
+
+/**
+ * Get the plug-in type implemented by the library.
+ *
+ * @returns            One of #bt_plugin_type values
+ */
+extern enum bt_plugin_type bt_plugin_lib_get_type(void);
+
+/**
+ * Get the name of the format implemented by the library.
+ *
+ * @returns            A string (ownership is not transfered)
+ */
+extern const char *bt_plugin_lib_get_format_name(void);
 
 /**
  * Create a plug-in instance configured with the provided parameters.
  *
  * @param params       Map object of configuration parameters
+ *                     (see bt_object_map_create())
  * @returns            An instance of the plug-in
  */
-struct bt_plugin *bt_plugin_lib_create(struct bt_object *params);
+extern struct bt_plugin *bt_plugin_lib_create(struct bt_object *params);
 
 #ifdef __cplusplus
 }
This page took 0.024463 seconds and 4 git commands to generate.