Lines Matching refs:nsIndex

49             entry->nsIndex = item.nsIndex;  in populateBlobIndices()
78 && (item.nsIndex == e.nsIndex) in eraseOrphanDataBlobs()
82 p.eraseItem(item.nsIndex, item.datatype, item.key, item.chunkIndex); in eraseOrphanDataBlobs()
148 esp_err_t Storage::findItem(uint8_t nsIndex, ItemType datatype, const char* key, Page* &page, Item&… in findItem() argument
152 auto err = it->findItem(nsIndex, datatype, key, itemIndex, item, chunkIdx, chunkStart); in findItem()
161 esp_err_t Storage::writeMultiPageBlob(uint8_t nsIndex, const char* key, const void* data, size_t da… in writeMultiPageBlob() argument
211 err = page.writeItem(nsIndex, ItemType::BLOB_DATA, key, in writeMultiPageBlob()
247 … err = getCurrentPage().writeItem(nsIndex, ItemType::BLOB_IDX, key, item.data, sizeof(item.data)); in writeMultiPageBlob()
257 it->mPage->eraseItem(nsIndex, ItemType::BLOB_DATA, key, ii++); in writeMultiPageBlob()
264 esp_err_t Storage::writeItem(uint8_t nsIndex, ItemType datatype, const char* key, const void* data,… in writeItem() argument
275 err = findItem(nsIndex, ItemType::BLOB_IDX, key, findPage, item); in writeItem()
277 err = findItem(nsIndex, datatype, key, findPage, item); in writeItem()
291 if (cmpMultiPageBlob(nsIndex, key, data, dataSize) == ESP_OK) { in writeItem()
297 ESP_ERROR_CHECK(findItem(nsIndex, datatype, key, findPage, item)); in writeItem()
308 err = writeMultiPageBlob(nsIndex, key, data, dataSize, nextStart); in writeItem()
319 err = eraseMultiPageBlob(nsIndex, key, prevStart); in writeItem()
331 err = findItem(nsIndex, datatype, key, findPage, item); in writeItem()
341 findPage->cmpItem(nsIndex, datatype, key, data, dataSize) == ESP_OK) { in writeItem()
346 err = page.writeItem(nsIndex, datatype, key, data, dataSize); in writeItem()
359 err = getCurrentPage().writeItem(nsIndex, datatype, key, data, dataSize); in writeItem()
374 ESP_ERROR_CHECK(findItem(nsIndex, datatype, key, findPage, item)); in writeItem()
376 err = findPage->eraseItem(nsIndex, datatype, key); in writeItem()
390 esp_err_t Storage::createOrOpenNamespace(const char* nsName, bool canCreate, uint8_t& nsIndex) in createOrOpenNamespace() argument
419 nsIndex = ns; in createOrOpenNamespace()
432 nsIndex = it->mIndex; in createOrOpenNamespace()
437 esp_err_t Storage::readMultiPageBlob(uint8_t nsIndex, const char* key, void* data, size_t dataSize) in readMultiPageBlob() argument
443 auto err = findItem(nsIndex, ItemType::BLOB_IDX, key, findPage, item); in readMultiPageBlob()
456 …err = findItem(nsIndex, ItemType::BLOB_DATA, key, findPage, item, static_cast<uint8_t> (chunkStart… in readMultiPageBlob()
463 …err = findPage->readItem(nsIndex, ItemType::BLOB_DATA, key, static_cast<uint8_t*>(data) + offset, … in readMultiPageBlob()
474 eraseMultiPageBlob(nsIndex, key); // cleanup if a chunk is not found in readMultiPageBlob()
479 esp_err_t Storage::cmpMultiPageBlob(uint8_t nsIndex, const char* key, const void* data, size_t data… in cmpMultiPageBlob() argument
485 auto err = findItem(nsIndex, ItemType::BLOB_IDX, key, findPage, item); in cmpMultiPageBlob()
501 …err = findItem(nsIndex, ItemType::BLOB_DATA, key, findPage, item, static_cast<uint8_t> (chunkStart… in cmpMultiPageBlob()
508 …err = findPage->cmpItem(nsIndex, ItemType::BLOB_DATA, key, static_cast<const uint8_t*>(data) + off… in cmpMultiPageBlob()
521 esp_err_t Storage::readItem(uint8_t nsIndex, ItemType datatype, const char* key, void* data, size_t… in readItem() argument
530 auto err = readMultiPageBlob(nsIndex, key, data, dataSize); in readItem()
536 auto err = findItem(nsIndex, datatype, key, findPage, item); in readItem()
540 return findPage->readItem(nsIndex, datatype, key, data, dataSize); in readItem()
544 esp_err_t Storage::eraseMultiPageBlob(uint8_t nsIndex, const char* key, VerOffset chunkStart) in eraseMultiPageBlob() argument
552 …auto err = findItem(nsIndex, ItemType::BLOB_IDX, key, findPage, item, Page::CHUNK_ANY, chunkStart); in eraseMultiPageBlob()
557 err = findPage->eraseItem(nsIndex, ItemType::BLOB_IDX, key, Page::CHUNK_ANY, chunkStart); in eraseMultiPageBlob()
572 …err = findItem(nsIndex, ItemType::BLOB_DATA, key, findPage, item, static_cast<uint8_t> (chunkStart… in eraseMultiPageBlob()
579 …err = findPage->eraseItem(nsIndex, ItemType::BLOB_DATA, key, static_cast<uint8_t> (chunkStart) + c… in eraseMultiPageBlob()
589 esp_err_t Storage::eraseItem(uint8_t nsIndex, ItemType datatype, const char* key) in eraseItem() argument
596 return eraseMultiPageBlob(nsIndex, key); in eraseItem()
601 auto err = findItem(nsIndex, datatype, key, findPage, item); in eraseItem()
607 return eraseMultiPageBlob(nsIndex, key); in eraseItem()
610 return findPage->eraseItem(nsIndex, datatype, key); in eraseItem()
613 esp_err_t Storage::eraseNamespace(uint8_t nsIndex) in eraseNamespace() argument
621 auto err = it->eraseItem(nsIndex, ItemType::ANY, nullptr); in eraseNamespace()
634 esp_err_t Storage::getItemDataSize(uint8_t nsIndex, ItemType datatype, const char* key, size_t& dat… in getItemDataSize() argument
642 auto err = findItem(nsIndex, datatype, key, findPage, item); in getItemDataSize()
647 err = findItem(nsIndex, ItemType::BLOB_IDX, key, findPage, item); in getItemDataSize()
677 …keyrepr << static_cast<unsigned>(item.nsIndex) << "_" << static_cast<unsigned>(item.datatype) << "… in debugCheck()
699 esp_err_t Storage::calcEntriesInNamespace(uint8_t nsIndex, size_t& usedEntries) in calcEntriesInNamespace() argument
711 auto err = it->findItem(nsIndex, ItemType::ANY, nullptr, itemIndex, item); in calcEntriesInNamespace()
733 if(item.nsIndex == name.mIndex) { in fillEntryInfo()
744 it->nsIndex = Page::NS_ANY; in findEntry()
748 if(createOrOpenNamespace(namespace_name, false, it->nsIndex) != ESP_OK) { in findEntry()
758 return (item.nsIndex != 0 && in isIterableItem()
777 err = page->findItem(it->nsIndex, (ItemType)it->type, nullptr, it->entryIndex, item); in nextEntry()