Avoid unnecessary inclusions in public headers
[babeltrace.git] / include / babeltrace / ctf-ir / field-types.h
index 45e2836b9021d8d36da302537bc48602dbd4e9a6..69a89e5c8f00de0bd92f1be487d921d159e27214 100644 (file)
@@ -30,7 +30,9 @@
  * http://www.efficios.com/ctf
  */
 
+/* For bt_bool */
 #include <babeltrace/types.h>
+
 #include <stdint.h>
 #include <stddef.h>
 
@@ -492,6 +494,12 @@ enum bt_ctf_byte_order {
        /// Native (default) byte order.
        BT_CTF_BYTE_ORDER_NATIVE = 0,
 
+       /**
+       Unspecified byte order; the initial native byte order of a
+       \link ctfirtraceclass CTF IR trace class\endlink.
+       */
+       BT_CTF_BYTE_ORDER_UNSPECIFIED,
+
        /// Little-endian.
        BT_CTF_BYTE_ORDER_LITTLE_ENDIAN,
 
@@ -753,6 +761,9 @@ enum bt_ctf_integer_base {
        /// Unknown, used for errors.
        BT_CTF_INTEGER_BASE_UNKNOWN = -1,
 
+       /// Unspecified by the tracer.
+       BT_CTF_INTEGER_BASE_UNSPECIFIED = 0,
+
        /// Binary.
        BT_CTF_INTEGER_BASE_BINARY = 2,
 
@@ -825,7 +836,7 @@ extern int bt_ctf_field_type_integer_get_size(
        the integer fields described by a given integer field type.
 */
 extern int bt_ctf_field_type_integer_set_size(
-               struct bt_ctf_field_type *int_field_type, size_t size);
+               struct bt_ctf_field_type *int_field_type, unsigned int size);
 
 /**
 @brief  Returns whether or not the @intfields described by the @intft
@@ -890,8 +901,9 @@ extern int bt_ctf_field_type_integer_set_is_signed(
                                preferred display base.
 @returns                       Preferred display base of the integer
                                fields described by \p int_field_type,
-                               or #BT_CTF_INTEGER_BASE_UNKNOWN on
-                               error.
+                               #BT_CTF_INTEGER_BASE_UNSPECIFIED if
+                               not specified, or
+                               #BT_CTF_INTEGER_BASE_UNKNOWN on error.
 
 @prenotnull{int_field_type}
 @preisintft{int_field_type}
@@ -918,9 +930,9 @@ extern enum bt_ctf_integer_base bt_ctf_field_type_integer_get_base(
 @prenotnull{int_field_type}
 @preisintft{int_field_type}
 @prehot{int_field_type}
-@pre \p base is #BT_CTF_INTEGER_BASE_BINARY, #BT_CTF_INTEGER_BASE_OCTAL,
-       #BT_CTF_INTEGER_BASE_DECIMAL, or
-       #BT_CTF_INTEGER_BASE_HEXADECIMAL.
+@pre \p base is #BT_CTF_INTEGER_BASE_UNSPECIFIED,
+       #BT_CTF_INTEGER_BASE_BINARY, #BT_CTF_INTEGER_BASE_OCTAL,
+       #BT_CTF_INTEGER_BASE_DECIMAL, or #BT_CTF_INTEGER_BASE_HEXADECIMAL.
 @postrefcountsame{int_field_type}
 
 @sa bt_ctf_field_type_integer_get_base(): Returns the preferred display
@@ -1246,7 +1258,7 @@ An enumeration mapping has:
   value, both included in the range.
 
 You can add a mapping to an enumeration field type with
-bt_ctf_field_type_enumeration_add_mapping() or
+bt_ctf_field_type_enumeration_add_mapping_signed() or
 bt_ctf_field_type_enumeration_add_mapping_unsigned(), depending on the
 signedness of the wrapped @intft.
 
@@ -1573,10 +1585,13 @@ A mapping in \p enum_field_type can exist with the name \p name.
 @sa bt_ctf_field_type_enumeration_add_mapping_unsigned(): Adds an
        unsigned mapping to a given enumeration field type.
 */
-extern int bt_ctf_field_type_enumeration_add_mapping(
+extern int bt_ctf_field_type_enumeration_add_mapping_signed(
                struct bt_ctf_field_type *enum_field_type, const char *name,
                int64_t range_begin, int64_t range_end);
 
+/* Pre-2.0 CTF writer compatibility */
+#define bt_ctf_field_type_enumeration_add_mapping bt_ctf_field_type_enumeration_add_mapping_signed
+
 /**
 @brief Adds a mapping to the @enumft \p enum_field_type which maps
        the name \p name to the unsigned
@@ -1609,7 +1624,7 @@ A mapping in \p enum_field_type can exist with the name \p name.
 @pre \p range_end is greater than or equal to \p range_begin.
 @postrefcountsame{enum_field_type}
 
-@sa bt_ctf_field_type_enumeration_add_mapping(): Adds a signed
+@sa bt_ctf_field_type_enumeration_add_mapping_signed(): Adds a signed
        mapping to a given enumeration field type.
 */
 extern int bt_ctf_field_type_enumeration_add_mapping_unsigned(
This page took 0.024717 seconds and 4 git commands to generate.