Add a common, internal CTF serialization library; make CTF writer use it
[babeltrace.git] / include / babeltrace / ctf-writer / event-internal.h
index 3a06131b26066635a9f69c5fc4ea53a7b374de3e..7b6a5a67db85b0597bdeec68e8b7be17cefd1334 100644 (file)
@@ -2,8 +2,6 @@
 #define BABELTRACE_CTF_WRITER_EVENT_INTERNAL_H
 
 /*
- * BabelTrace - CTF Writer: Event
- *
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
 #include <babeltrace/ctf-writer/stream-internal.h>
 #include <babeltrace/ctf-writer/stream.h>
 #include <babeltrace/ctf-writer/validation-internal.h>
-#include <babeltrace/object-internal.h>
-#include <babeltrace/values.h>
+#include <babeltrace/ctf-writer/object-internal.h>
+#include <babeltrace/ctf-writer/values-internal.h>
+#include <babeltrace/ctfser-internal.h>
 
 struct bt_ctf_stream_class;
 struct bt_ctf_stream_pos;
 struct metadata_context;
 
 struct bt_ctf_event_common {
-       struct bt_object base;
+       struct bt_ctf_object base;
        struct bt_ctf_event_class_common *class;
        struct bt_ctf_field_wrapper *header_field;
        struct bt_ctf_field_common *stream_event_context_field;
@@ -95,7 +94,7 @@ BT_HIDDEN
 int bt_ctf_event_common_initialize(struct bt_ctf_event_common *event,
                struct bt_ctf_event_class_common *event_class,
                struct bt_ctf_clock_class *init_expected_clock_class,
-               bool is_shared_with_parent, bt_object_release_func release_func,
+               bool is_shared_with_parent, bt_ctf_object_release_func release_func,
                bt_ctf_validation_flag_copy_field_type_func field_type_copy_func,
                bool must_be_in_trace,
                int (*map_clock_classes_func)(struct bt_ctf_stream_class_common *stream_class,
@@ -195,7 +194,7 @@ end:
 }
 
 static inline
-void bt_ctf_event_common_finalize(struct bt_object *obj,
+void bt_ctf_event_common_finalize(struct bt_ctf_object *obj,
                void (*field_release_func)(void *),
                void (*header_field_release_func)(void *, struct bt_ctf_event_common *))
 {
@@ -238,7 +237,7 @@ void bt_ctf_event_common_finalize(struct bt_object *obj,
                 * common ancestor with it to guarantee they would both have the
                 * same lifetime.
                 */
-               bt_put(event->class);
+               bt_ctf_object_put_ref(event->class);
        }
 }
 
@@ -256,7 +255,7 @@ int bt_ctf_event_class_serialize(struct bt_ctf_event_class *event_class,
 
 BT_HIDDEN
 int bt_ctf_event_serialize(struct bt_ctf_event *event,
-               struct bt_ctf_stream_pos *pos,
+               struct bt_ctfser *pos,
                enum bt_ctf_byte_order native_byte_order);
 
 static inline
This page took 0.024833 seconds and 4 git commands to generate.