X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fstream-class-internal.h;h=4338742e7688e21a20210236ca1fe287549a87b2;hb=de3dd40e6fcad56e227f5fc8a8290fbaa88b4e07;hp=0a1420d5dee824117427aa7c9a087e471a31aa3e;hpb=adc315b840e3970b9f6e255c91e38ec29f05adab;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/stream-class-internal.h b/include/babeltrace/ctf-ir/stream-class-internal.h index 0a1420d5..4338742e 100644 --- a/include/babeltrace/ctf-ir/stream-class-internal.h +++ b/include/babeltrace/ctf-ir/stream-class-internal.h @@ -4,7 +4,7 @@ /* * BabelTrace - CTF IR: Stream class internal * - * Copyright 2013 EfficiOS Inc. + * Copyright 2013, 2014 Jérémie Galarneau * * Author: Jérémie Galarneau * @@ -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_ctf_base base; GString *name; struct bt_ctf_clock *clock; GPtrArray *event_classes; /* Array of pointers to bt_ctf_event_class */ @@ -44,22 +45,18 @@ 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 *packet_context; + struct bt_ctf_field_type *event_header_type; struct bt_ctf_field_type *event_context_type; - struct bt_ctf_field *event_context; int frozen; + int byte_order; }; BT_HIDDEN void bt_ctf_stream_class_freeze(struct bt_ctf_stream_class *stream_class); -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_serialize(struct bt_ctf_stream_class *stream_class, struct metadata_context *context); @@ -68,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 */