lib: make bt_value_map_foreach_entry_{const_}func() return a status code
[babeltrace.git] / include / babeltrace2 / value-const.h
index 0001ddd8d1e33e0a39e2621fb51f19aae489df58..f42f60d80e98e7cfe03d88e2b68a0fbe72718a5c 100644 (file)
@@ -164,11 +164,22 @@ bt_bool bt_value_map_is_empty(const bt_value *map_obj)
 extern const bt_value *bt_value_map_borrow_entry_value_const(
                const bt_value *map_obj, const char *key);
 
-typedef bt_bool (* bt_value_map_foreach_entry_const_func)(const char *key,
-               const bt_value *object, void *data);
+typedef enum bt_value_map_foreach_entry_const_func_status {
+       BT_VALUE_MAP_FOREACH_ENTRY_CONST_FUNC_STATUS_OK                 = __BT_FUNC_STATUS_OK,
+       BT_VALUE_MAP_FOREACH_ENTRY_CONST_FUNC_STATUS_ERROR              = __BT_FUNC_STATUS_ERROR,
+       BT_VALUE_MAP_FOREACH_ENTRY_CONST_FUNC_STATUS_MEMORY_ERROR       = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_VALUE_MAP_FOREACH_ENTRY_CONST_FUNC_STATUS_INTERRUPT          = __BT_FUNC_STATUS_INTERRUPTED,
+} bt_value_map_foreach_entry_const_func_status;
+
+typedef bt_value_map_foreach_entry_const_func_status
+               (* bt_value_map_foreach_entry_const_func)(const char *key,
+                       const bt_value *object, void *data);
 
 typedef enum bt_value_map_foreach_entry_const_status {
        BT_VALUE_MAP_FOREACH_ENTRY_CONST_STATUS_OK              = __BT_FUNC_STATUS_OK,
+       BT_VALUE_MAP_FOREACH_ENTRY_CONST_STATUS_ERROR           = __BT_FUNC_STATUS_ERROR,
+       BT_VALUE_MAP_FOREACH_ENTRY_CONST_STATUS_MEMORY_ERROR    = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_VALUE_MAP_FOREACH_ENTRY_CONST_STATUS_USER_ERROR      = __BT_FUNC_STATUS_USER_ERROR,
        BT_VALUE_MAP_FOREACH_ENTRY_CONST_STATUS_INTERRUPTED     = __BT_FUNC_STATUS_INTERRUPTED,
 } bt_value_map_foreach_entry_const_status;
 
This page took 0.022907 seconds and 4 git commands to generate.