summaryrefslogtreecommitdiff
path: root/view/sharedcache/api/sharedcache.cpp
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-14 01:43:28 -0400
committerMason Reed <mason@vector35.com>2025-04-14 03:20:51 -0400
commitbf64859f5aa261fa8db7bfdd9af4f67826ff4e5b (patch)
treecc549d191d3b95fc48d9aa2d6316b70722a46759 /view/sharedcache/api/sharedcache.cpp
parentea47d4c85e78533ea7e88adc442159414feb3f7f (diff)
[SharedCache] Expose cache entry name in the API
Allows us to display the user friendly name of the cache entry in the triage view
Diffstat (limited to 'view/sharedcache/api/sharedcache.cpp')
-rw-r--r--view/sharedcache/api/sharedcache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/view/sharedcache/api/sharedcache.cpp b/view/sharedcache/api/sharedcache.cpp
index 922a7ff3..d1ec680d 100644
--- a/view/sharedcache/api/sharedcache.cpp
+++ b/view/sharedcache/api/sharedcache.cpp
@@ -78,6 +78,7 @@ BNSharedCacheEntry EntryToApi(const CacheEntry &entry)
{
BNSharedCacheEntry apiEntry {};
apiEntry.path = BNAllocString(entry.path.c_str());
+ apiEntry.name = BNAllocString(entry.name.c_str());
apiEntry.entryType = entry.entryType;
const auto &mappings = entry.mappings;
apiEntry.mappingCount = mappings.size();
@@ -92,6 +93,7 @@ CacheEntry EntryFromApi(BNSharedCacheEntry apiEntry)
{
CacheEntry entry {};
entry.path = apiEntry.path;
+ entry.name = apiEntry.name;
entry.entryType = apiEntry.entryType;
entry.mappings.reserve(apiEntry.mappingCount);
for (size_t i = 0; i < apiEntry.mappingCount; i++)