#define NET4_URL_PREFIX "net4://"
#define NET6_URL_PREFIX "net6://"
-static struct bt_component_factory *component_factory;
static char *opt_input_format, *opt_output_format;
/*
struct bt_format *fmt_write;
struct bt_trace_descriptor *td_write;
struct bt_context *ctx;
+ struct bt_component_factory *component_factory;
int i;
call_plugins_hooks();
}
bt_object_init(component, bt_component_destroy);
- bt_get(class);
- component->class = class;
+ component->class = bt_get(class);
component->name = g_string_new(name);
if (!component->name) {
ret = BT_COMPONENT_STATUS_NOMEM;
#include <glib.h>
#include <stdio.h>
+static
const char *plugin_name = "ctf-text";
-static enum bt_component_status ctf_text_init(struct bt_component *);
-static void ctf_text_exit(void);
+static
+enum bt_component_status ctf_text_init(struct bt_component *);
+static
+void ctf_text_plugin_exit(void);
/* Initialize plug-in entry points. */
BT_PLUGIN_NAME("ctf-text");
BT_PLUGIN_AUTHOR("Jérémie Galarneau");
BT_PLUGIN_LICENSE("MIT License");
-BT_PLUGIN_EXIT(ctf_text_exit);
+BT_PLUGIN_EXIT(ctf_text_plugin_exit);
+/* Defines BT_PLUGIN_INIT. */
BT_PLUGIN_COMPONENT_CLASSES_BEGIN
BT_PLUGIN_SINK_COMPONENT_CLASS_ENTRY(plugin_name, ctf_text_init)
BT_PLUGIN_COMPONENT_CLASSES_END
LOGLEVEL_DEBUG = 14,
};
+static
const char *loglevel_str [] = {
[LOGLEVEL_EMERG] = "TRACE_EMERG",
[LOGLEVEL_ALERT] = "TRACE_ALERT",
};
static
-enum bt_component_status ctf_text_init(struct bt_component *component)
+enum bt_component_status ctf_text_init(
+ struct bt_component *component)
{
return BT_COMPONENT_STATUS_OK;
}
static
-void ctf_text_exit(void)
+void ctf_text_plugin_exit(void)
{
printf("in ctf_text_exit\n");
}
PLUGIN_SYMBOL_NAME, g_module_name(module));
goto error;
}
+
+ printf("Loaded plugin with name %s\n", plugin->name);
if (!g_module_symbol(module, PLUGIN_SYMBOL_LICENSE,
(gpointer *) &plugin->license))
{