metaindex.h 1.0 KB

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