25 std::string MetaKeyFilename;
27 unsigned long long Size;
30 enum APT_HIDDEN TriState {
31 TRI_YES, TRI_DONTCARE, TRI_NO, TRI_UNSET
34 enum class APT_HIDDEN Flag
42 std::vector <pkgIndexFile *> *Indexes;
56 signed short DefaultPin;
57 std::string ReleaseNotes;
60 bool SupportsAcquireByHash;
61 std::map<std::string, checkSum *> Entries;
62 TriState LoadedSuccessfully;
66 std::string GetURI()
const;
67 std::string GetDist()
const;
68 const char* GetType()
const;
69 TriState GetTrusted()
const;
70 std::string GetSignedBy()
const;
72 std::string GetOrigin()
const;
73 std::string GetLabel()
const;
74 std::string GetVersion()
const;
75 std::string GetCodename()
const;
76 std::string GetSuite()
const;
77 std::string GetReleaseNotes()
const;
78 signed short GetDefaultPin()
const;
79 bool GetSupportsAcquireByHash()
const;
80 time_t GetValidUntil()
const;
81 time_t GetDate()
const;
82 virtual time_t GetNotBefore()
const = 0;
83#ifdef APT_COMPILING_APT
84 bool HasFlag(Flag flag)
const;
86 void SetFlag(Flag flag) APT_HIDDEN;
88 std::string GetExpectedDist()
const;
89 bool CheckDist(std::string
const &MaybeDist)
const;
92 virtual std::string Describe()
const;
93 virtual std::string ArchiveURI(std::string
const& File)
const = 0;
94 virtual bool GetIndexes(
pkgAcquire *Owner,
bool const &GetAll=
false) = 0;
95 virtual std::vector<IndexTarget> GetIndexTargets()
const = 0;
96 virtual std::vector<pkgIndexFile *> *GetIndexFiles() = 0;
97 virtual bool IsTrusted()
const = 0;
98 virtual bool Load(std::string
const &Filename, std::string *
const ErrorText) = 0;
99 bool Load(std::string *
const ErrorText);
103 void swapLoad(
metaIndex *
const OldMetaIndex);
106 checkSum *Lookup(std::string
const &MetaKey)
const;
108 bool Exists(std::string
const &MetaKey)
const;
109 std::vector<std::string> MetaKeys()
const;
110 TriState GetLoadedSuccessfully()
const;
113 virtual pkgCache::RlsFileIterator FindInCache(
pkgCache &Cache,
bool const ModifyCheck)
const;
117 metaIndex(std::string
const &
URI, std::string
const &Dist,
118 char const *
const Type);
121 virtual bool IsArchitectureSupported(std::string
const &arch)
const;
122 virtual bool IsArchitectureAllSupportedFor(
IndexTarget const &target)
const;
123 virtual bool HasSupportForComponent(std::string
const &component)
const;
125#ifdef APT_COMPILING_APT
126 bool IsTrustedSet() {
return Trusted == TRI_YES; }