X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fstream-class.h;h=d26bc2ca861441745750309e2a2fd6ae052d9a30;hp=33737335e33a39952a2e8b9c4c2bbaa21f70cf0f;hb=2f100782231d86cdaaadf7a8568c5b28583800f4;hpb=c13c7ca07e124477b059a69d75835afe98d4e634 diff --git a/include/babeltrace/ctf-ir/stream-class.h b/include/babeltrace/ctf-ir/stream-class.h index 33737335..d26bc2ca 100644 --- a/include/babeltrace/ctf-ir/stream-class.h +++ b/include/babeltrace/ctf-ir/stream-class.h @@ -50,6 +50,16 @@ struct bt_ctf_clock; */ extern struct bt_ctf_stream_class *bt_ctf_stream_class_create(const char *name); +/* + * bt_ctf_stream_class_get_clock: get the clock associated with a stream class. + * + * @param stream_class Stream class. + * + * Returns a clock instance, NULL on error. + */ +extern struct bt_ctf_clock *bt_ctf_stream_class_get_clock( + struct bt_ctf_stream_class *stream_class); + /* * bt_ctf_stream_class_set_clock: assign a clock to a stream class. * @@ -65,6 +75,31 @@ extern int bt_ctf_stream_class_set_clock( struct bt_ctf_stream_class *stream_class, struct bt_ctf_clock *clock); +/* + * bt_ctf_stream_class_get_id: Get a stream class' id. + * + * @param stream_class Stream class. + * + * Returns the stream class' id, a negative value on error. + */ +extern int64_t bt_ctf_stream_class_get_id( + struct bt_ctf_stream_class *stream_class); + +/* + * bt_ctf_stream_class_set_id: Set a stream class' id. + * + * Set a stream class' id. Must be unique trace-wise. + * Note that stream classes are assigned a unique id when a stream instance + * is created for the first time from a trace or writer. + * + * @param stream_class Stream class. + * @param id Stream class id. + * + * Returns 0 on success, a negative value on error. + */ +extern int bt_ctf_stream_class_set_id( + struct bt_ctf_stream_class *stream_class, uint32_t id); + /* * bt_ctf_stream_class_set_clock: assign a clock to a stream class. *