doc/api/libbabeltrace2/DoxygenLayout.xml: use `topics` tab
[babeltrace.git] / src / ctf-writer / trace.h
index ca6328fba7973be40a36a352212b4809545d53f7..29df2f4290eee5de3c53274f44bfeadb2ec21184 100644 (file)
@@ -1,39 +1,20 @@
-#ifndef BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H
-#define BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H
-
 /*
- * Copyright 2014 EfficiOS Inc.
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
+ * SPDX-License-Identifier: MIT
  *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright 2014 EfficiOS Inc.
  *
  * The Common Trace Format (CTF) Specification is available at
  * http://www.efficios.com/ctf
  */
 
+#ifndef BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H
+#define BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H
+
 #include "common/macros.h"
-#include "compat/uuid.h"
-#include <babeltrace2/ctf-writer/field-types.h>
-#include <babeltrace2/ctf-writer/fields.h>
-#include <babeltrace2/ctf-writer/trace.h>
-#include <babeltrace2/types.h>
+#include "common/uuid.h"
+#include <babeltrace2-ctf-writer/field-types.h>
+#include <babeltrace2-ctf-writer/fields.h>
+#include <babeltrace2-ctf-writer/trace.h>
 #include <glib.h>
 #include <sys/types.h>
 
@@ -49,8 +30,8 @@ struct bt_ctf_trace_common {
        struct bt_ctf_object base;
        GString *name;
        int frozen;
-       unsigned char uuid[BABELTRACE_UUID_LEN];
-       bt_bool uuid_set;
+       bt_uuid_t uuid;
+       bt_ctf_bool uuid_set;
        enum bt_ctf_byte_order native_byte_order;
        struct bt_ctf_private_value *environment;
        GPtrArray *clock_classes; /* Array of pointers to bt_ctf_clock_class */
@@ -66,15 +47,12 @@ struct bt_ctf_trace_common {
        int valid;
 };
 
-BT_HIDDEN
-bt_bool bt_ctf_trace_common_has_clock_class(struct bt_ctf_trace_common *trace,
+bt_ctf_bool bt_ctf_trace_common_has_clock_class(struct bt_ctf_trace_common *trace,
                struct bt_ctf_clock_class *clock_class);
 
-BT_HIDDEN
 int bt_ctf_trace_common_initialize(struct bt_ctf_trace_common *trace,
                bt_ctf_object_release_func release_func);
 
-BT_HIDDEN
 void bt_ctf_trace_common_finalize(struct bt_ctf_trace_common *trace);
 
 static inline
@@ -84,28 +62,23 @@ const char *bt_ctf_trace_common_get_name(struct bt_ctf_trace_common *trace)
        return trace->name ? trace->name->str : NULL;
 }
 
-BT_HIDDEN
 int bt_ctf_trace_common_set_name(struct bt_ctf_trace_common *trace, const char *name);
 
 static inline
-const unsigned char *bt_ctf_trace_common_get_uuid(struct bt_ctf_trace_common *trace)
+const uint8_t *bt_ctf_trace_common_get_uuid(struct bt_ctf_trace_common *trace)
 {
        BT_CTF_ASSERT_PRE_NON_NULL(trace, "Trace");
        return trace->uuid_set ? trace->uuid : NULL;
 }
 
-BT_HIDDEN
-int bt_ctf_trace_common_set_uuid(struct bt_ctf_trace_common *trace, const unsigned char *uuid);
+int bt_ctf_trace_common_set_uuid(struct bt_ctf_trace_common *trace, const uint8_t *uuid);
 
-BT_HIDDEN
 int bt_ctf_trace_common_set_environment_field(struct bt_ctf_trace_common *trace,
                const char *name, struct bt_ctf_private_value *value);
 
-BT_HIDDEN
 int bt_ctf_trace_common_set_environment_field_string(struct bt_ctf_trace_common *trace,
                const char *name, const char *value);
 
-BT_HIDDEN
 int bt_ctf_trace_common_set_environment_field_integer(struct bt_ctf_trace_common *trace,
                const char *name, int64_t value);
 
@@ -117,7 +90,7 @@ int64_t bt_ctf_trace_common_get_environment_field_count(
 
        BT_CTF_ASSERT_PRE_NON_NULL(trace, "Trace");
        ret = bt_ctf_attributes_get_count(trace->environment);
-       BT_ASSERT(ret >= 0);
+       BT_ASSERT_DBG(ret >= 0);
        return ret;
 }
 
@@ -150,7 +123,6 @@ bt_ctf_trace_common_borrow_environment_field_value_by_name(
                name);
 }
 
-BT_HIDDEN
 int bt_ctf_trace_common_add_clock_class(struct bt_ctf_trace_common *trace,
                struct bt_ctf_clock_class *clock_class);
 
@@ -278,7 +250,6 @@ enum bt_ctf_byte_order bt_ctf_trace_common_get_native_byte_order(
        return trace->native_byte_order;
 }
 
-BT_HIDDEN
 int bt_ctf_trace_common_set_native_byte_order(struct bt_ctf_trace_common *trace,
                enum bt_ctf_byte_order byte_order, bool allow_unspecified);
 
@@ -290,7 +261,6 @@ struct bt_ctf_field_type_common *bt_ctf_trace_common_borrow_packet_header_field_
        return trace->packet_header_field_type;
 }
 
-BT_HIDDEN
 int bt_ctf_trace_common_set_packet_header_field_type(struct bt_ctf_trace_common *trace,
                struct bt_ctf_field_type_common *packet_header_field_type);
 
@@ -324,7 +294,6 @@ void bt_ctf_trace_common_freeze(struct bt_ctf_trace_common *trace)
        trace->frozen = 1;
 }
 
-BT_HIDDEN
 int bt_ctf_trace_common_add_stream_class(struct bt_ctf_trace_common *trace,
                struct bt_ctf_stream_class_common *stream_class,
                bt_ctf_validation_flag_copy_field_type_func copy_field_type_func,
@@ -348,44 +317,37 @@ struct bt_ctf_trace {
  *
  * Returns the metadata string on success, NULL on error.
  */
-BT_HIDDEN
 char *bt_ctf_trace_get_metadata_string(struct bt_ctf_trace *trace);
 
-BT_HIDDEN
 struct bt_ctf_trace *bt_ctf_trace_create(void);
 
-BT_HIDDEN
 int64_t bt_ctf_trace_get_clock_class_count(
                struct bt_ctf_trace *trace);
 
-BT_HIDDEN
 struct bt_ctf_clock_class *bt_ctf_trace_get_clock_class_by_index(
                struct bt_ctf_trace *trace, uint64_t index);
 
-BT_HIDDEN
 struct bt_ctf_clock_class *bt_ctf_trace_get_clock_class_by_name(
                struct bt_ctf_trace *trace, const char *name);
 
-BT_HIDDEN
 int bt_ctf_trace_add_clock_class(struct bt_ctf_trace *trace,
                struct bt_ctf_clock_class *clock_class);
 
-BT_HIDDEN
 int64_t bt_ctf_trace_get_environment_field_count(
                struct bt_ctf_trace *trace);
 
-BT_HIDDEN
 const char *bt_ctf_trace_get_environment_field_name_by_index(
                struct bt_ctf_trace *trace, uint64_t index);
 
-BT_HIDDEN
 struct bt_ctf_value *
 bt_ctf_trace_get_environment_field_value_by_index(struct bt_ctf_trace *trace,
                uint64_t index);
 
-BT_HIDDEN
 struct bt_ctf_value *
 bt_ctf_trace_get_environment_field_value_by_name(
                struct bt_ctf_trace *trace, const char *name);
 
+int bt_ctf_trace_visit(struct bt_ctf_trace *trace,
+               bt_ctf_visitor visitor, void *data);
+
 #endif /* BABELTRACE_CTF_WRITER_TRACE_INTERNAL_H */
This page took 0.025423 seconds and 4 git commands to generate.