lib: Reset libbabeltrace2 to SONANE 0
[babeltrace.git] / include / babeltrace / ctf-writer / fields-internal.h
index 64d33a9a60734021116d6bc87d63085d1bf7a101..e56c4f30178d6917f3c5e831e328c92fa7f96251 100644 (file)
@@ -2,8 +2,6 @@
 #define BABELTRACE_CTF_WRITER_FIELDS_INTERNAL_H
 
 /*
- * Babeltrace - CTF writer: Event Fields
- *
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
 
 #include <babeltrace/assert-pre-internal.h>
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/babeltrace.h>
 #include <babeltrace/common-internal.h>
 #include <babeltrace/ctf-writer/field-types-internal.h>
 #include <babeltrace/ctf-writer/fields.h>
-#include <babeltrace/ctf-writer/serialize-internal.h>
 #include <babeltrace/ctf-writer/utils-internal.h>
-#include <babeltrace/object-internal.h>
+#include <babeltrace/ctf-writer/object-internal.h>
+#include <babeltrace/ctfser-internal.h>
 #include <babeltrace/types.h>
 #include <glib.h>
 #include <inttypes.h>
@@ -81,7 +78,7 @@ struct bt_ctf_field_common_methods {
 };
 
 struct bt_ctf_field_common {
-       struct bt_object base;
+       struct bt_ctf_object base;
        struct bt_ctf_field_type_common *type;
        struct bt_ctf_field_common_methods *methods;
        bool payload_set;
@@ -168,7 +165,7 @@ struct bt_ctf_field_common *bt_ctf_field_common_copy(struct bt_ctf_field_common
 BT_HIDDEN
 int bt_ctf_field_common_structure_initialize(struct bt_ctf_field_common *field,
                struct bt_ctf_field_type_common *type,
-               bool is_shared, bt_object_release_func release_func,
+               bool is_shared, bt_ctf_object_release_func release_func,
                struct bt_ctf_field_common_methods *methods,
                bt_ctf_field_common_create_func field_create_func,
                GDestroyNotify field_release_func);
@@ -176,7 +173,7 @@ int bt_ctf_field_common_structure_initialize(struct bt_ctf_field_common *field,
 BT_HIDDEN
 int bt_ctf_field_common_array_initialize(struct bt_ctf_field_common *field,
                struct bt_ctf_field_type_common *type,
-               bool is_shared, bt_object_release_func release_func,
+               bool is_shared, bt_ctf_object_release_func release_func,
                struct bt_ctf_field_common_methods *methods,
                bt_ctf_field_common_create_func field_create_func,
                GDestroyNotify field_destroy_func);
@@ -184,14 +181,14 @@ int bt_ctf_field_common_array_initialize(struct bt_ctf_field_common *field,
 BT_HIDDEN
 int bt_ctf_field_common_sequence_initialize(struct bt_ctf_field_common *field,
                struct bt_ctf_field_type_common *type,
-               bool is_shared, bt_object_release_func release_func,
+               bool is_shared, bt_ctf_object_release_func release_func,
                struct bt_ctf_field_common_methods *methods,
                GDestroyNotify field_destroy_func);
 
 BT_HIDDEN
 int bt_ctf_field_common_variant_initialize(struct bt_ctf_field_common *field,
                struct bt_ctf_field_type_common *type,
-               bool is_shared, bt_object_release_func release_func,
+               bool is_shared, bt_ctf_object_release_func release_func,
                struct bt_ctf_field_common_methods *methods,
                bt_ctf_field_common_create_func field_create_func,
                GDestroyNotify field_release_func);
@@ -199,7 +196,7 @@ int bt_ctf_field_common_variant_initialize(struct bt_ctf_field_common *field,
 BT_HIDDEN
 int bt_ctf_field_common_string_initialize(struct bt_ctf_field_common *field,
                struct bt_ctf_field_type_common *type,
-               bool is_shared, bt_object_release_func release_func,
+               bool is_shared, bt_ctf_object_release_func release_func,
                struct bt_ctf_field_common_methods *methods);
 
 BT_HIDDEN
@@ -350,14 +347,14 @@ end:
 static inline
 void bt_ctf_field_common_initialize(struct bt_ctf_field_common *field,
                struct bt_ctf_field_type_common *ft, bool is_shared,
-               bt_object_release_func release_func,
+               bt_ctf_object_release_func release_func,
                struct bt_ctf_field_common_methods *methods)
 {
        BT_ASSERT(field);
        BT_ASSERT(ft);
-       bt_object_init(&field->base, is_shared, release_func);
+       bt_ctf_object_init(&field->base, is_shared, release_func);
        field->methods = methods;
-       field->type = bt_get(ft);
+       field->type = (void *) bt_ctf_object_get_ref(ft);
 }
 
 static inline
@@ -698,7 +695,7 @@ void bt_ctf_field_common_finalize(struct bt_ctf_field_common *field)
 {
        BT_ASSERT(field);
        BT_LOGD_STR("Putting field's type.");
-       bt_put(field->type);
+       bt_ctf_object_put_ref(field->type);
 }
 
 static inline
@@ -834,7 +831,7 @@ struct bt_ctf_field_variant {
 
 BT_HIDDEN
 int bt_ctf_field_serialize_recursive(struct bt_ctf_field *field,
-               struct bt_ctf_stream_pos *pos,
+               struct bt_ctfser *ctfser,
                enum bt_ctf_byte_order native_byte_order);
 
 BT_HIDDEN
This page took 0.026654 seconds and 4 git commands to generate.