bt_graph *graph,
bt_graph_filter_component_input_port_added_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
extern bt_graph_add_listener_status
bt_graph_add_sink_component_input_port_added_listener(
bt_graph *graph,
bt_graph_sink_component_input_port_added_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
extern bt_graph_add_listener_status
bt_graph_add_source_component_output_port_added_listener(
bt_graph *graph,
bt_graph_source_component_output_port_added_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
extern bt_graph_add_listener_status
bt_graph_add_filter_component_output_port_added_listener(
bt_graph *graph,
bt_graph_filter_component_output_port_added_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
extern bt_graph_add_listener_status
bt_graph_add_source_filter_component_ports_connected_listener(
bt_graph *graph,
bt_graph_source_filter_component_ports_connected_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
extern bt_graph_add_listener_status
bt_graph_add_filter_filter_component_ports_connected_listener(
bt_graph *graph,
bt_graph_filter_filter_component_ports_connected_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
extern bt_graph_add_listener_status
bt_graph_add_source_sink_component_ports_connected_listener(
bt_graph *graph,
bt_graph_source_sink_component_ports_connected_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
extern bt_graph_add_listener_status
bt_graph_add_filter_sink_component_ports_connected_listener(
bt_graph *graph,
bt_graph_filter_sink_component_ports_connected_listener_func listener,
bt_graph_listener_removed_func listener_removed, void *data,
- int *listener_id);
+ bt_listener_id *listener_id);
typedef enum bt_graph_add_interrupter_status {
BT_GRAPH_ADD_INTERRUPTER_STATUS_OK = __BT_FUNC_STATUS_OK,
bt_trace_class_add_destruction_listener(
const bt_trace_class *trace_class,
bt_trace_class_destruction_listener_func listener,
- void *data, uint64_t *listener_id);
+ void *data, bt_listener_id *listener_id);
typedef enum bt_trace_class_remove_listener_status {
BT_TRACE_CLASS_REMOVE_LISTENER_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
extern bt_trace_class_remove_listener_status
bt_trace_class_remove_destruction_listener(
- const bt_trace_class *trace_class, uint64_t listener_id);
+ const bt_trace_class *trace_class, bt_listener_id listener_id);
extern void bt_trace_class_get_ref(const bt_trace_class *trace_class);
extern bt_trace_add_listener_status bt_trace_add_destruction_listener(
const bt_trace *trace,
bt_trace_destruction_listener_func listener,
- void *data, uint64_t *listener_id);
+ void *data, bt_listener_id *listener_id);
typedef enum bt_trace_remove_listener_status {
BT_TRACE_REMOVE_LISTENER_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
} bt_trace_remove_listener_status;
extern bt_trace_remove_listener_status bt_trace_remove_destruction_listener(
- const bt_trace *trace, uint64_t listener_id);
+ const bt_trace *trace, bt_listener_id listener_id);
extern void bt_trace_get_ref(const bt_trace *trace);
*/
typedef int bt_bool;
+typedef uint64_t bt_listener_id;
+
typedef const uint8_t *bt_uuid;
typedef struct bt_clock_class bt_clock_class;
#include "common/assert.h"
#include "py-common/py-common.h"
-
-typedef const uint8_t *bt_uuid;
%}
typedef int bt_bool;
+typedef uint64_t bt_listener_id;
/* For uint*_t/int*_t */
%include "stdint.i"
{
PyObject *py_listener_ids = NULL;
PyObject *py_listener_id = NULL;
- int listener_id;
+ bt_listener_id listener_id;
bt_graph_add_listener_status status;
const char * const module_name =
"graph_add_port_added_listener() (Python)";
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
{
PyObject *py_listener_ids = NULL;
PyObject *py_listener_id = NULL;
- int listener_id;
+ bt_listener_id listener_id;
bt_graph_add_listener_status status;
const char * const module_name =
"graph_add_ports_connected_listener() (Python)";
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
goto error;
}
- py_listener_id = PyLong_FromLong(listener_id);
+ py_listener_id = PyLong_FromUnsignedLongLong(listener_id);
if (!py_listener_id) {
BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name,
"Failed to allocate one PyLong.");
}
int bt_bt2_trace_add_destruction_listener(bt_trace *trace,
- PyObject *py_callable, uint64_t *id)
+ PyObject *py_callable, bt_listener_id *id)
{
bt_trace_add_listener_status status;
%}
int bt_bt2_trace_add_destruction_listener(bt_trace *trace,
- PyObject *py_callable, uint64_t *id);
+ PyObject *py_callable, bt_listener_id *id);
int bt_bt2_trace_class_add_destruction_listener(
bt_trace_class *trace_class, PyObject *py_callable,
- uint64_t *id)
+ bt_listener_id *id)
{
bt_trace_class_add_listener_status status;
int bt_bt2_trace_class_add_destruction_listener(
bt_trace_class *trace_class, PyObject *py_callable,
- uint64_t *id);
+ bt_listener_id *id);
struct bt_graph *graph,
bt_graph_source_component_output_port_added_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_port_added listener = {
.base = {
},
.func = (port_added_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
struct bt_graph *graph,
bt_graph_filter_component_output_port_added_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_port_added listener = {
.base = {
},
.func = (port_added_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
struct bt_graph *graph,
bt_graph_filter_component_input_port_added_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_port_added listener = {
.base = {
},
.func = (port_added_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
struct bt_graph *graph,
bt_graph_sink_component_input_port_added_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_port_added listener = {
.base = {
},
.func = (port_added_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
struct bt_graph *graph,
bt_graph_source_filter_component_ports_connected_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_ports_connected listener = {
.base = {
},
.func = (ports_connected_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
struct bt_graph *graph,
bt_graph_source_sink_component_ports_connected_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_ports_connected listener = {
.base = {
},
.func = (ports_connected_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
struct bt_graph *graph,
bt_graph_filter_filter_component_ports_connected_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_ports_connected listener = {
.base = {
},
.func = (ports_connected_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
struct bt_graph *graph,
bt_graph_filter_sink_component_ports_connected_listener_func func,
bt_graph_listener_removed_func listener_removed, void *data,
- int *out_listener_id)
+ bt_listener_id *out_listener_id)
{
struct bt_graph_listener_ports_connected listener = {
.base = {
},
.func = (ports_connected_func_t) func,
};
- int listener_id;
+ bt_listener_id listener_id;
BT_ASSERT_PRE_NON_NULL(graph, "Graph");
BT_ASSERT_PRE_NON_NULL(func, "Listener");
enum bt_trace_class_add_listener_status bt_trace_class_add_destruction_listener(
const struct bt_trace_class *_tc,
bt_trace_class_destruction_listener_func listener,
- void *data, uint64_t *listener_id)
+ void *data, bt_listener_id *listener_id)
{
struct bt_trace_class *tc = (void *) _tc;
uint64_t i;
}
enum bt_trace_class_remove_listener_status bt_trace_class_remove_destruction_listener(
- const struct bt_trace_class *_tc, uint64_t listener_id)
+ const struct bt_trace_class *_tc, bt_listener_id listener_id)
{
struct bt_trace_class *tc = (void *) _tc;
struct bt_trace_class_destruction_listener_elem *elem;
enum bt_trace_add_listener_status bt_trace_add_destruction_listener(
const struct bt_trace *c_trace,
bt_trace_destruction_listener_func listener,
- void *data, uint64_t *listener_id)
+ void *data, bt_listener_id *listener_id)
{
struct bt_trace *trace = (void *) c_trace;
uint64_t i;
}
enum bt_trace_remove_listener_status bt_trace_remove_destruction_listener(
- const struct bt_trace *c_trace, uint64_t listener_id)
+ const struct bt_trace *c_trace, bt_listener_id listener_id)
{
struct bt_trace *trace = (void *) c_trace;
struct bt_trace_destruction_listener_elem *elem;
*/
const bt_trace *ir_trace;
- uint64_t ir_trace_destruction_listener_id;
+ bt_listener_id ir_trace_destruction_listener_id;
/* Trace's directory */
GString *path;
bt_self_component *self_comp;
struct debug_info_component *comp;
const bt_trace *input_trace;
- uint64_t destruction_listener_id;
+ bt_listener_id destruction_listener_id;
/*
* Hash table of VPIDs (pointer to int64_t) to
struct field_class_resolving_context *fc_resolving_ctx;
- uint64_t destruction_listener_id;
+ bt_listener_id destruction_listener_id;
};
struct trace_ir_data_maps {
*/
GHashTable *packet_map;
- uint64_t destruction_listener_id;
+ bt_listener_id destruction_listener_id;
};
struct trace_ir_maps {
* Trace class destruction listener ID (`UINT64_C(-1)` if
* there's no listener ID.
*/
- uint64_t tc_destruction_listener_id;
+ bt_listener_id tc_destruction_listener_id;
};
/*
* Trace destruction listener ID (`UINT64_C(-1)` if there's no
* listener ID.
*/
- uint64_t trace_destruction_listener_id;
+ bt_listener_id trace_destruction_listener_id;
};
/* A `sink.text.details` component */