debmetaindex.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. virtual vector <pkgIndexFile *> *GetIndexFiles();
  33. virtual bool IsTrusted() const;
  34. void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry);
  35. void PushSectionEntry(string const &Arch, const debSectionEntry *Entry);
  36. void PushSectionEntry(const debSectionEntry *Entry);
  37. };
  38. #endif