X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fstream-class.h;h=d26bc2ca861441745750309e2a2fd6ae052d9a30;hb=2f100782231d86cdaaadf7a8568c5b28583800f4;hp=2e2f3fb93f5678427a652d7774b12203dee4b2d0;hpb=adc315b840e3970b9f6e255c91e38ec29f05adab;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/stream-class.h b/include/babeltrace/ctf-ir/stream-class.h index 2e2f3fb9..d26bc2ca 100644 --- a/include/babeltrace/ctf-ir/stream-class.h +++ b/include/babeltrace/ctf-ir/stream-class.h @@ -4,7 +4,7 @@ /* * BabelTrace - CTF IR: Stream Class * - * Copyright 2014 EfficiOS Inc. + * Copyright 2014 Jérémie Galarneau * * Author: Jérémie Galarneau * @@ -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. *