debmetaindex.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // ijones, walters
  2. #ifndef PKGLIB_DEBMETAINDEX_H
  3. #define PKGLIB_DEBMETAINDEX_H
  4. #include <apt-pkg/metaindex.h>
  5. #include <apt-pkg/sourcelist.h>
  6. #include <map>
  7. class debReleaseIndex : public metaIndex {
  8. public:
  9. class debSectionEntry
  10. {
  11. public:
  12. debSectionEntry (string const &Section, bool const &IsSrc);
  13. string const Section;
  14. bool const IsSrc;
  15. };
  16. private:
  17. std::map<string, vector<debSectionEntry const*> > ArchEntries;
  18. public:
  19. debReleaseIndex(string const &URI, string const &Dist);
  20. ~debReleaseIndex();
  21. virtual string ArchiveURI(string const &File) const {return URI + File;};
  22. virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
  23. vector <struct IndexTarget *>* ComputeIndexTargets() const;
  24. string Info(const char *Type, string const &Section, string const &Arch="") const;
  25. string MetaIndexInfo(const char *Type) const;
  26. string MetaIndexFile(const char *Types) const;
  27. string MetaIndexURI(const char *Type) const;
  28. string IndexURI(const char *Type, string const &Section, string const &Arch="native") const;
  29. string IndexURISuffix(const char *Type, string const &Section, string const &Arch="native") const;
  30. string SourceIndexURI(const char *Type, const string &Section) const;
  31. string SourceIndexURISuffix(const char *Type, const string &Section) const;
  32. string TranslationIndexURI(const char *Type, const string &Section) const;
  33. string TranslationIndexURISuffix(const char *Type, const string &Section) const;
  34. virtual vector <pkgIndexFile *> *GetIndexFiles();
  35. virtual bool IsTrusted() const;
  36. void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry);
  37. void PushSectionEntry(string const &Arch, const debSectionEntry *Entry);
  38. void PushSectionEntry(const debSectionEntry *Entry);
  39. };
  40. #endif