You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 lines
2.3 KiB

  1. #ifndef PKGLIB_DEBMETAINDEX_H
  2. #define PKGLIB_DEBMETAINDEX_H
  3. #include <apt-pkg/metaindex.h>
  4. #include <apt-pkg/macros.h>
  5. #include <map>
  6. #include <string>
  7. #include <vector>
  8. #ifndef APT_8_CLEANER_HEADERS
  9. #include <apt-pkg/sourcelist.h>
  10. #endif
  11. #ifndef APT_10_CLEANER_HEADERS
  12. #include <apt-pkg/init.h>
  13. #endif
  14. class pkgAcquire;
  15. class pkgIndexFile;
  16. class IndexTarget;
  17. class pkgCacheGenerator;
  18. class OpProgress;
  19. class debReleaseIndexPrivate;
  20. class APT_HIDDEN debReleaseIndex : public metaIndex
  21. {
  22. debReleaseIndexPrivate * const d;
  23. APT_HIDDEN bool parseSumData(const char *&Start, const char *End, std::string &Name,
  24. std::string &Hash, unsigned long long &Size);
  25. public:
  26. APT_HIDDEN std::string MetaIndexInfo(const char *Type) const;
  27. APT_HIDDEN std::string MetaIndexFile(const char *Types) const;
  28. APT_HIDDEN std::string MetaIndexURI(const char *Type) const;
  29. debReleaseIndex(std::string const &URI, std::string const &Dist);
  30. debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted);
  31. virtual ~debReleaseIndex();
  32. virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE {return URI + File;};
  33. virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) APT_OVERRIDE;
  34. virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE;
  35. virtual std::string Describe() const APT_OVERRIDE;
  36. virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const APT_OVERRIDE;
  37. virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
  38. virtual bool Load(std::string const &Filename, std::string * const ErrorText) APT_OVERRIDE;
  39. virtual metaIndex * UnloadedClone() const APT_OVERRIDE;
  40. virtual std::vector <pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE;
  41. bool SetTrusted(TriState const Trusted);
  42. bool SetCheckValidUntil(TriState const Trusted);
  43. bool SetValidUntilMin(time_t const Valid);
  44. bool SetValidUntilMax(time_t const Valid);
  45. bool SetSignedBy(std::string const &SignedBy);
  46. virtual bool IsTrusted() const APT_OVERRIDE;
  47. void AddComponent(std::string const &sourcesEntry,
  48. bool const isSrc, std::string const &Name,
  49. std::vector<std::string> const &Targets,
  50. std::vector<std::string> const &Architectures,
  51. std::vector<std::string> Languages,
  52. bool const usePDiffs, std::string const &useByHash);
  53. };
  54. #endif