Declare enum type to use from C++

Anonymous enum can't be referenced from C++. to fix this issue, declare enum
bt_iter_pos_type and use this type in struct bt_iter_pos.

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
gcc warning fix: -Wextra

For the "ordered comparison of pointer with integer zero" warning, fix
this by comparing (type) -1 against (type) 0 instead of just 0, so if
"type" is a pointer type, this pointer type will be applied to the right
operand too, thus fixing the warning.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: Close traces on context destruction

bt_trace_handle_destroy is called on destruction of the trace_handle
hash table's elements. This function only frees the trace handle,
leaving the input traces open.

This fix sets remove_trace_handle as the value_destroy_func ensuring
that the format's close_trace function is called before the trace_handle
is destroyed.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Parse LTTng indexes

If a trace file has an associated index (same filename and .idx suffix),
we open it and use it instead of generating the index at open.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
babeltrace handle the inactive streams (review needed)

when content_size == 0, just set the timestamp_end of the packet and
reinsert the stream in the heap.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Live viewer

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
cleanup unused files

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>