7#ifndef BABELTRACE2_TRACE_IR_STREAM_H
8#define BABELTRACE2_TRACE_IR_STREAM_H
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
18#include <babeltrace2/types.h>
314 bt_trace *trace, uint64_t
id) __BT_NOEXCEPT;
455 const char *name) __BT_NOEXCEPT;
609#define BT_STREAM_PUT_REF_AND_RESET(_stream) \
611 bt_stream_put_ref(_stream); \
640#define BT_STREAM_MOVE_REF(_dst, _src) \
642 bt_stream_put_ref(_dst); \
struct bt_stream_class bt_stream_class
Stream class.
Definition types.h:90
bt_stream * bt_stream_create_with_id(bt_stream_class *stream_class, bt_trace *trace, uint64_t id)
Creates a stream with the numeric ID id from the stream class stream_class and adds it to the trace t...
const bt_value * bt_stream_borrow_user_attributes_const(const bt_stream *stream)
Borrows the user attributes of the stream stream (const version).
uint64_t bt_stream_get_id(const bt_stream *stream)
Returns the numeric ID of the stream stream.
const bt_trace * bt_stream_borrow_trace_const(const bt_stream *stream)
Borrows the trace which contains the stream stream (const version).
bt_stream_set_name_status bt_stream_set_name(bt_stream *stream, const char *name)
Sets the name of the stream stream to a copy of name.
const bt_stream_class * bt_stream_borrow_class_const(const bt_stream *stream)
Borrows the class of the stream stream (const version).
void bt_stream_put_ref(const bt_stream *stream)
Decrements the reference count of the stream stream.
bt_value * bt_stream_borrow_user_attributes(bt_stream *stream)
Borrows the user attributes of the stream stream.
const char * bt_stream_get_name(const bt_stream *stream)
Returns the name of the stream stream.
bt_stream_class * bt_stream_borrow_class(bt_stream *stream)
Borrows the class of the stream stream.
void bt_stream_set_user_attributes(bt_stream *stream, const bt_value *user_attributes)
Sets the user attributes of the stream stream to user_attributes.
bt_stream * bt_stream_create(bt_stream_class *stream_class, bt_trace *trace)
Creates a stream from the stream class stream_class and adds it to the trace trace.
void bt_stream_get_ref(const bt_stream *stream)
Increments the reference count of the stream stream.
struct bt_stream bt_stream
Stream.
Definition types.h:89
bt_trace * bt_stream_borrow_trace(bt_stream *stream)
Borrows the trace which contains the stream stream.
bt_stream_set_name_status
Status codes for bt_stream_set_name().
Definition stream.h:416
@ BT_STREAM_SET_NAME_STATUS_OK
Success.
Definition stream.h:421
@ BT_STREAM_SET_NAME_STATUS_MEMORY_ERROR
Out of memory.
Definition stream.h:427
struct bt_trace bt_trace
Trace.
Definition types.h:91
struct bt_value bt_value
Value.
Definition types.h:93