From 0ec067b187158f7fa90fb40c58d70ffb339e15b7 Mon Sep 17 00:00:00 2001 From: Benjamin Wrensch Date: Wed, 31 Jan 2024 16:09:07 +0100 Subject: [PATCH] [add] (api) retrieve entities/resources by uuid --- iolite_c_api/iolite_api.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/iolite_c_api/iolite_api.h b/iolite_c_api/iolite_api.h index fadb244..014969f 100644 --- a/iolite_c_api/iolite_api.h +++ b/iolite_c_api/iolite_api.h @@ -2033,11 +2033,17 @@ struct io_entity_i // NOLINT // Gets the name of the given entity. const char* (*get_name)(io_ref_t entity); + // Gets the UUID of the given entity. + io_uint64_t (*get_uuid)(io_ref_t entity); + // Returns the linear memory containing all the names for all active entities. io_name_t* (*get_name_memory)(); // Finds the first entity with the given name. io_ref_t (*find_first_entity_with_name)(const char* name); + // Finds the first entity with the given UUID. + io_ref_t (*find_entity_with_uuid)(io_uint64_t uuid); + // Finds all entities with the given name. void (*find_entities_with_name)(const char* name, io_ref_t* entities, io_uint32_t* entities_length); @@ -2540,6 +2546,11 @@ typedef struct // Commits any changes and reloads the internals of the resource. void (*commit_changes)(io_ref_t component); + // Finds the first resource with the given name. + io_ref_t (*find_first_resource_with_name)(const char* name); + // Finds the first resource with the given name. + io_ref_t (*find_resource_with_uuid)(io_uint64_t uuid); + // Returns the number of active resources. io_uint32_t (*get_num_active_resources)(); @@ -2550,6 +2561,9 @@ typedef struct // Returns the name of the resource. const char* (*get_name)(io_ref_t resource); + // Returns the UUID of the resource. + io_uint64_t (*get_uuid)(io_ref_t resource); + // Returns the linear memory containing all the names for all active // resources. io_name_t* (*get_name_memory)();