vendor_build.h 933 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <cstdint>
  3. #include <span>
  4. #include "../../../middleware/content/packages/reader/reader.h"
  5. namespace sunrise::client::content::vendors {
  6. /**
  7. * Extracts the vendor catalog from the installed packages, once.
  8. * The whole index is read. A definition is read only when asked for, as each is over 100 KiB.
  9. * @param source Package directory and borrowed block keys.
  10. * @param scratch Lock-owned block storage shared with the other content passes.
  11. * @param definitionHashes Vendor definition hashes to read definitions for.
  12. * @return True when State already holds the catalog or a full pass publishes it.
  13. */
  14. [[nodiscard]] bool build(const middleware::content::packages::reader::Source& source,
  15. middleware::content::packages::reader::Scratch& scratch,
  16. std::span<const std::uint32_t> definitionHashes) noexcept;
  17. } // namespace sunrise::client::content::vendors