+ /*}}}*/
+// This is the abstract package list parser class. /*{{{*/
+class APT_HIDDEN pkgCacheListParser
+{
+ pkgCacheGenerator *Owner;
+ friend class pkgCacheGenerator;
+
+ // Some cache items
+ pkgCache::VerIterator OldDepVer;
+ map_pointer_t *OldDepLast;
+
+ void * const d;
+
+ protected:
+
+ inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, const char *S,unsigned int Size) {return Owner->StoreString(type, S, Size);};
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+ inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, APT::StringView S) {return Owner->StoreString(type, S);};
+#endif
+
+ inline map_stringitem_t WriteString(const std::string &S) {return Owner->WriteStringInMap(S);};
+ inline map_stringitem_t WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+ bool NewDepends(pkgCache::VerIterator &Ver,APT::StringView Package, APT::StringView Arch,
+ APT::StringView Version,uint8_t const Op,
+ uint8_t const Type);
+ bool NewProvides(pkgCache::VerIterator &Ver,APT::StringView PkgName,
+ APT::StringView PkgArch, APT::StringView Version,
+ uint8_t const Flags);
+ bool NewProvidesAllArch(pkgCache::VerIterator &Ver, APT::StringView Package,
+ APT::StringView Version, uint8_t const Flags);
+#endif
+ public:
+
+ // These all operate against the current section
+ virtual std::string Package() = 0;
+ virtual bool ArchitectureAll() = 0;
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+ virtual APT::StringView Architecture() = 0;
+ virtual APT::StringView Version() = 0;
+#endif
+ virtual bool NewVersion(pkgCache::VerIterator &Ver) = 0;
+ virtual std::vector<std::string> AvailableDescriptionLanguages() = 0;
+ virtual MD5SumValue Description_md5() = 0;
+ virtual unsigned short VersionHash() = 0;
+ /** compare currently parsed version with given version
+ *
+ * \param Hash of the currently parsed version
+ * \param Ver to compare with
+ */
+ virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
+ virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
+ pkgCache::VerIterator &Ver) = 0;
+ virtual map_filesize_t Offset() = 0;
+ virtual map_filesize_t Size() = 0;
+
+ virtual bool Step() = 0;
+
+ virtual bool CollectFileProvides(pkgCache &/*Cache*/,
+ pkgCache::VerIterator &/*Ver*/) {return true;};
+
+ pkgCacheListParser();
+ virtual ~pkgCacheListParser();
+};
+ /*}}}*/
+
+APT_DEPRECATED_MSG("Use pkgCacheGenerator::MakeStatusCache instead") bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
+ MMap **OutMap = 0,bool AllowMem = false);
+APT_DEPRECATED_MSG("Use pkgCacheGenerator::MakeOnlyStatusCache instead") bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap);