| 131 | } |
| 132 | |
| 133 | BNSharedCacheEntry EntryToApi(const CacheEntry& entry) |
| 134 | { |
| 135 | BNSharedCacheEntry apiEntry; |
| 136 | apiEntry.path = BNAllocString(entry.GetFilePath().c_str()); |
| 137 | apiEntry.name = BNAllocString(entry.GetFileName().c_str()); |
| 138 | apiEntry.entryType = EntryTypeToApi(entry.GetType()); |
| 139 | const auto& mappings = entry.GetMappings(); |
| 140 | apiEntry.mappingCount = mappings.size(); |
| 141 | apiEntry.mappings = new BNSharedCacheMappingInfo[mappings.size()]; |
| 142 | for (size_t i = 0; i < mappings.size(); i++) |
| 143 | apiEntry.mappings[i] = MappingToApi(mappings[i]); |
| 144 | return apiEntry; |
| 145 | } |
| 146 | |
| 147 | extern "C" |
| 148 | { |
no test coverage detected