Lines Matching defs:header
47 bool LoadedIdmap::Lookup(const IdmapEntry_header* header, uint16_t input_entry_id,
49 if (input_entry_id < dtohs(header->entry_id_offset)) {
54 input_entry_id -= dtohs(header->entry_id_offset);
55 if (input_entry_id >= dtohs(header->entry_count)) {
60 uint32_t result = dtohl(header->entries[input_entry_id]);
74 LOG(ERROR) << "Idmap header is not word aligned.";
79 LOG(ERROR) << "Idmap header is too small.";
83 const Idmap_header* header = reinterpret_cast<const Idmap_header*>(data.data());
84 if (dtohl(header->magic) != kIdmapMagic) {
86 dtohl(header->magic), kIdmapMagic);
90 if (dtohl(header->version) != kIdmapCurrentVersion) {
94 dtohl(header->version), kIdmapCurrentVersion);
98 if (!is_valid_package_id(dtohs(header->target_package_id))) {
100 dtohs(header->target_package_id));
104 if (dtohs(header->type_count) > 255) {
106 (int)dtohs(header->type_count));
112 LoadedIdmap::LoadedIdmap(const Idmap_header* header) : header_(header) {
124 const Idmap_header* header = reinterpret_cast<const Idmap_header*>(idmap_data.data());
127 std::unique_ptr<LoadedIdmap> loaded_idmap = std::unique_ptr<LoadedIdmap>(new LoadedIdmap(header));
129 const uint8_t* data_ptr = reinterpret_cast<const uint8_t*>(idmap_data.data()) + sizeof(*header);
130 size_t data_size = idmap_data.size() - sizeof(*header);
148 // Make sure there is enough space for the entries declared in the header.
170 if (type_maps_encountered != static_cast<size_t>(dtohs(header->type_count))) {
172 << (int)dtohs(header->type_count);