Fix: Namespace lttng-viewer-abi

This header is copied to all the viewers that implement the lttng-live
protocol, we need to make sure it is properly namespaced.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Force the client to create a viewer session before attaching

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Fix: handle session hang up in get_new_streams

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Allow attach to multiple sessions

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Move static functions up to access them from get_new_streams

When we detect that the viewer is trying to get new streams for a
session closed and for which it already got all the streams, we can
delete and destroy the session, we know it won't be useful anymore.

FIXME: we should probably when we destroy the last stream of a ctf_trace
(when only the metadata remains).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
check for new streams in all attached sessions

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Fix: use uint32_t for metadata_flag in viewer's ABI

This struct is meant to be sent over the network so members should be
of exact-width.

Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>