ir: make bt_ctf_stream_create() public
[babeltrace.git] / include / babeltrace / ctf-ir / trace.h
index d85a4bead08185a57d2b01ac2d70c1a38766defc..ee740039829052cf6367cca4d9feaba46c84e1f5 100644 (file)
@@ -30,7 +30,7 @@
  * http://www.efficios.com/ctf
  */
 
-#include <babeltrace/ctf-ir/event-types.h>
+#include <babeltrace/ctf-ir/field-types.h>
 #include <babeltrace/values.h>
 #include <stdint.h>
 
@@ -58,21 +58,6 @@ struct bt_ctf_clock;
  */
 extern struct bt_ctf_trace *bt_ctf_trace_create(void);
 
-/*
- * bt_ctf_trace_create_stream: create a stream instance.
- *
- * Allocate a new stream instance and register it to the trace. The creation of
- * a stream sets its reference count to 1.
- *
- * @param trace Trace instance.
- * @param stream_class Stream class to instantiate.
- *
- * Returns a new stream on success, NULL on error.
- */
-extern struct bt_ctf_stream *bt_ctf_trace_create_stream(
-               struct bt_ctf_trace *trace,
-               struct bt_ctf_stream_class *stream_class);
-
 /*
  * bt_ctf_trace_set_environment_field: sets an environment field to the
  *     trace.
@@ -264,6 +249,17 @@ extern int bt_ctf_trace_get_stream_class_count(struct bt_ctf_trace *trace);
 extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class(
                struct bt_ctf_trace *trace, int index);
 
+/*
+ * bt_ctf_trace_get_stream_class_by_id: get a trace's stream class by ID.
+ *
+ * @param trace Trace instance.
+ * @param index ID of the stream class in the given trace.
+ *
+ * Return a stream class on success, NULL on error.
+ */
+extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_id(
+               struct bt_ctf_trace *trace, uint32_t id);
+
 /*
  * bt_ctf_trace_get_clock_by_name: get a trace's clock by name
  *
@@ -342,25 +338,6 @@ extern struct bt_ctf_field_type *bt_ctf_trace_get_packet_header_type(
 extern int bt_ctf_trace_set_packet_header_type(struct bt_ctf_trace *trace,
                struct bt_ctf_field_type *packet_header_type);
 
-/*
- * bt_ctf_trace_get and bt_ctf_trace_put: increment and decrement the
- * trace's reference count.
- *
- * You may also use bt_ctf_get() and bt_ctf_put() with trace objects.
- *
- * These functions ensure that the trace won't be destroyed while it
- * is in use. The same number of get and put (plus one extra put to
- * release the initial reference done at creation) have to be done to
- * destroy a trace.
- *
- * When the trace's reference count is decremented to 0 by a
- * bt_ctf_trace_put, the trace is freed.
- *
- * @param trace Trace instance.
- */
-extern void bt_ctf_trace_get(struct bt_ctf_trace *trace);
-extern void bt_ctf_trace_put(struct bt_ctf_trace *trace);
-
 #ifdef __cplusplus
 }
 #endif
This page took 0.025291 seconds and 4 git commands to generate.