+ inline unsigned long WriteUniqString(const string &S) {return WriteUniqString(S.c_str(),S.length());};
+
+ void DropProgress() {Progress = 0;};
+ bool SelectFile(const string &File,const string &Site,pkgIndexFile const &Index,
+ unsigned long Flags = 0);
+ bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0);
+ inline pkgCache &GetCache() {return Cache;};
+ inline pkgCache::PkgFileIterator GetCurFile()
+ {return pkgCache::PkgFileIterator(Cache,CurrentFile);};
+
+ bool HasFileDeps() {return FoundFileDeps;};
+ bool MergeFileProvides(ListParser &List);
+ bool FinishCache(OpProgress *Progress);
+
+ static bool MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
+ MMap **OutMap = 0,bool AllowMem = false);
+ static bool MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap);
+ static DynamicMMap* CreateDynamicMMap(FileFd *CacheF, unsigned long Flags = 0);
+
+ void ReMap(void const * const oldMap, void const * const newMap);
+
+ pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress);
+ ~pkgCacheGenerator();
+};
+ /*}}}*/
+// This is the abstract package list parser class. /*{{{*/
+class pkgCacheGenerator::ListParser
+{
+ pkgCacheGenerator *Owner;
+ friend class pkgCacheGenerator;
+
+ // Some cache items
+ pkgCache::VerIterator OldDepVer;
+ map_ptrloc *OldDepLast;
+
+ // Flag file dependencies
+ bool FoundFileDeps;
+
+ protected:
+
+ inline unsigned long WriteUniqString(string S) {return Owner->WriteUniqString(S);};
+ inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);};
+ inline unsigned long WriteString(const string &S) {return Owner->WriteStringInMap(S);};
+ inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
+ bool NewDepends(pkgCache::VerIterator &Ver,const string &Package, const string &Arch,
+ const string &Version,unsigned int Op,
+ unsigned int Type);
+ bool NewProvides(pkgCache::VerIterator &Ver,const string &PkgName,
+ const string &PkgArch, const string &Version);