Unify reference counting using a common bt_object base
[babeltrace.git] / include / babeltrace / ctf-ir / event-fields-internal.h
index 9f2670d2d58bd81e7302939c40b3e123e6f11f1e..4dea4a7988e133f2a16ef17a5b49d7ba21542caf 100644 (file)
@@ -4,7 +4,7 @@
 /*
  * BabelTrace - CTF Writer: Event Fields internal
  *
- * Copyright 2013 EfficiOS Inc.
+ * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * SOFTWARE.
  */
 
-#include <babeltrace/ctf-writer/ref-internal.h>
 #include <babeltrace/ctf-writer/event-fields.h>
+#include <babeltrace/object-internal.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/ctf/types.h>
 #include <glib.h>
 
 struct bt_ctf_field {
-       struct bt_ctf_ref ref_count;
+       struct bt_object base;
        struct bt_ctf_field_type *type;
        int payload_set;
 };
@@ -90,9 +90,14 @@ BT_HIDDEN
 int bt_ctf_field_structure_set_field(struct bt_ctf_field *structure,
                const char *name, struct bt_ctf_field *value);
 
+/* Validate that the field's payload is set (returns 0 if set). */
 BT_HIDDEN
 int bt_ctf_field_validate(struct bt_ctf_field *field);
 
+/* Mark field payload as unset. */
+BT_HIDDEN
+int bt_ctf_field_reset(struct bt_ctf_field *field);
+
 BT_HIDDEN
 int bt_ctf_field_serialize(struct bt_ctf_field *field,
                struct ctf_stream_pos *pos);
This page took 0.024687 seconds and 4 git commands to generate.