Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
extras/Makefile
extras/valgrind/Makefile
plugins/Makefile
extras/Makefile
extras/valgrind/Makefile
plugins/Makefile
+ plugins/ctf/Makefile
+ plugins/ctf/ctf-reader/Makefile
babeltrace.pc
babeltrace-ctf.pc
])
babeltrace.pc
babeltrace-ctf.pc
])
#include <babeltrace/plugin/plugin-system.h>
#include <babeltrace/ctf-writer/ref-internal.h>
#include <glib.h>
#include <babeltrace/plugin/plugin-system.h>
#include <babeltrace/ctf-writer/ref-internal.h>
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#ifdef __cplusplus
extern "C" {
*/
#include <babeltrace/objects.h>
*/
#include <babeltrace/objects.h>
-#include <babeltrace/plugin.h>
+#include <babeltrace/plugin/plugin.h>
#include <stdint.h>
#ifdef __cplusplus
#include <stdint.h>
#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
#ifdef __cplusplus
extern "C" {
AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
lib_LTLIBRARIES = libbabeltrace-plugin.la
lib_LTLIBRARIES = libbabeltrace-plugin.la
libbabeltrace_plugin_la_LIBADD = \
$(top_builddir)/lib/libbabeltrace.la
libbabeltrace_plugin_la_LIBADD = \
$(top_builddir)/lib/libbabeltrace.la
- $(top_builddir)/ctf/ir/libctf-ir.la
#include <babeltrace/plugin/plugin-lib.h>
#include <babeltrace/plugin/plugin-system.h>
#include <babeltrace/plugin/plugin-lib.h>
#include <babeltrace/plugin/plugin-system.h>
+#include <babeltrace/plugin/plugin.h>
#include <glib.h>
#include <stdio.h>
#include <glib.h>
#include <stdio.h>
struct bt_plugin *bt_plugin_lib_create(struct bt_object *params)
{
struct bt_plugin *bt_plugin_lib_create(struct bt_object *params)
{
- enum bt_plugin_status ret;
struct bt_plugin *plugin = NULL;
struct ctf_reader *reader = g_new0(struct ctf_reader, 1);
struct bt_plugin *plugin = NULL;
struct ctf_reader *reader = g_new0(struct ctf_reader, 1);
- if (!reader) {
- goto error;
- }
-
plugin = bt_plugin_source_create(plugin_name, reader,
ctf_reader_destroy, ctf_reader_iterator_create);
if (!plugin) {
goto error;
}
plugin = bt_plugin_source_create(plugin_name, reader,
ctf_reader_destroy, ctf_reader_iterator_create);
if (!plugin) {
goto error;
}
- ret = bt_plugin_set_error_stream_cb(plugin,
- ctf_reader_set_error_stream);
- if (ret != BT_PLUGIN_STATUS_OK) {
- goto error;
- }
end:
return plugin;
error:
if (reader) {
end:
return plugin;
error:
if (reader) {
- ctf_reader_destroy(reader);
- }
- if (plugin) {
- bt_plugin_put(plugin);
- plugin = NULL;
+void *bt_plugin_get_private_data(struct bt_plugin *plugin)
+{
+ void *ret = NULL;
+
+ if (!plugin) {
+ goto end;
+ }
+
+ ret = plugin->user_data;
+end:
+ return ret;
+}
+
static
void bt_plugin_destroy(struct bt_ctf_ref *ref)
{
static
void bt_plugin_destroy(struct bt_ctf_ref *ref)
{