*/
int bt_ctf_iter_add_callback(struct bt_ctf_iter *iter,
bt_intern_str event, void *private_data, int flags,
- enum bt_cb_ret (*callback)(struct bt_ctf_event *ctf_data,
+ enum bt_cb_ret (*callback)(struct ctf_event_definition *ctf_data,
void *private_data),
struct bt_dependencies *depends,
struct bt_dependencies *weak_depends,
tin = container_of(td_read, struct ctf_trace, parent);
for (stream_id = 0; stream_id < tin->streams->len; stream_id++) {
- struct ctf_stream_class *stream;
+ struct ctf_stream_declaration *stream;
struct bt_stream_callbacks *bt_stream_cb = NULL;
struct bt_callback_chain *bt_chain = NULL;
struct bt_callback new_callback;
}
static
-struct ctf_stream_event *extract_ctf_stream_event(struct ctf_stream *stream)
+struct ctf_event_definition *extract_ctf_stream_event(struct ctf_stream_definition *stream)
{
- struct ctf_stream_class *stream_class = stream->stream_class;
- struct ctf_event *event_class;
- struct ctf_stream_event *event;
+ struct ctf_stream_declaration *stream_class = stream->stream_class;
+ struct ctf_event_declaration *event_class;
+ struct ctf_event_definition *event;
uint64_t id = stream->event_id;
if (id >= stream_class->events_by_id->len) {
}
void process_callbacks(struct bt_ctf_iter *iter,
- struct ctf_stream *stream)
+ struct ctf_stream_definition *stream)
{
struct bt_stream_callbacks *bt_stream_cb;
struct bt_callback_chain *bt_chain;
struct bt_callback *cb;
int i;
enum bt_cb_ret ret;
- struct bt_ctf_event ctf_data;
+ struct ctf_event_definition *ctf_data;
- ctf_data.event = extract_ctf_stream_event(stream);
- ctf_data.stream = stream;
+ ctf_data = extract_ctf_stream_event(stream);
/* process all events callback first */
if (iter->main_callbacks.callback) {
cb = &g_array_index(iter->main_callbacks.callback, struct bt_callback, i);
if (!cb)
goto end;
- ret = cb->callback(&ctf_data, cb->private_data);
+ ret = cb->callback(ctf_data, cb->private_data);
switch (ret) {
case BT_CB_OK_STOP:
case BT_CB_ERROR_STOP:
cb = &g_array_index(bt_chain->callback, struct bt_callback, i);
if (!cb)
goto end;
- ret = cb->callback(&ctf_data, cb->private_data);
+ ret = cb->callback(ctf_data, cb->private_data);
switch (ret) {
case BT_CB_OK_STOP:
case BT_CB_ERROR_STOP: