X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fstream-class-internal.h;h=2a481b0852c4d2a409a4eeba7e843e55700879dd;hb=83509119a945fc77faff869daaf48627e1c4b3fa;hp=ed995b1c3e1d8ebea9a2f327abc8043731e2d850;hpb=c35a1669cedba73681bd259ea7945aa55643e158;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/stream-class-internal.h b/include/babeltrace/ctf-ir/stream-class-internal.h index ed995b1c..2a481b08 100644 --- a/include/babeltrace/ctf-ir/stream-class-internal.h +++ b/include/babeltrace/ctf-ir/stream-class-internal.h @@ -27,16 +27,17 @@ * SOFTWARE. */ -#include #include #include #include +#include +#include #include #include #include struct bt_ctf_stream_class { - struct bt_ctf_ref ref_count; + struct bt_object base; GString *name; struct bt_ctf_clock *clock; GPtrArray *event_classes; /* Array of pointers to bt_ctf_event_class */ @@ -44,9 +45,10 @@ struct bt_ctf_stream_class { uint32_t id; uint32_t next_event_id; uint32_t next_stream_id; - struct bt_ctf_field_type *event_header_type; - struct bt_ctf_field *event_header; + /* Weak reference; a stream class does not have ownership of a trace */ + struct bt_ctf_trace *trace; struct bt_ctf_field_type *packet_context_type; + struct bt_ctf_field_type *event_header_type; struct bt_ctf_field_type *event_context_type; int frozen; int byte_order; @@ -63,4 +65,17 @@ BT_HIDDEN int bt_ctf_stream_class_set_byte_order(struct bt_ctf_stream_class *stream_class, enum bt_ctf_byte_order byte_order); +/* Set stream_class id without checking if the stream class is frozen */ +BT_HIDDEN +int _bt_ctf_stream_class_set_id(struct bt_ctf_stream_class *stream_class, + uint32_t id); + +BT_HIDDEN +int bt_ctf_stream_class_set_id_no_check( + struct bt_ctf_stream_class *stream_class, uint32_t id); + +BT_HIDDEN +int bt_ctf_stream_class_set_trace(struct bt_ctf_stream_class *stream_class, + struct bt_ctf_trace *trace); + #endif /* BABELTRACE_CTF_IR_STREAM_CLASS_INTERNAL_H */