metaindex.h 945 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef PKGLIB_METAINDEX_H
  2. #define PKGLIB_METAINDEX_H
  3. #include <string>
  4. #include <apt-pkg/pkgcache.h>
  5. #include <apt-pkg/srcrecords.h>
  6. #include <apt-pkg/pkgrecords.h>
  7. #include <apt-pkg/indexfile.h>
  8. #include <apt-pkg/vendor.h>
  9. using std::string;
  10. class pkgAcquire;
  11. class pkgCacheGenerator;
  12. class OpProgress;
  13. class metaIndex
  14. {
  15. protected:
  16. vector <pkgIndexFile *> *Indexes;
  17. const char *Type;
  18. string URI;
  19. string Dist;
  20. bool Trusted;
  21. public:
  22. // Various accessors
  23. virtual string GetURI() const {return URI;}
  24. virtual string GetDist() const {return Dist;}
  25. virtual const char* GetType() const {return Type;}
  26. // Interface for acquire
  27. virtual string ArchiveURI(string /*File*/) const = 0;
  28. virtual bool GetIndexes(pkgAcquire *Owner, bool GetAll=false) const = 0;
  29. virtual vector<pkgIndexFile *> *GetIndexFiles() = 0;
  30. virtual bool IsTrusted() const = 0;
  31. virtual ~metaIndex() {};
  32. };
  33. #endif