]>
git.saurik.com Git - apt.git/blob - apt-pkg/metaindex.h
ae73c27ddbda7dff9c48acd788b74aaf83a1d344
1 #ifndef PKGLIB_METAINDEX_H
2 #define PKGLIB_METAINDEX_H
4 #include <apt-pkg/indexfile.h>
5 #include <apt-pkg/init.h>
12 #ifndef APT_10_CLEANER_HEADERS
13 #include <apt-pkg/pkgcache.h>
14 class pkgCacheGenerator
;
17 #ifndef APT_8_CLEANER_HEADERS
18 #include <apt-pkg/srcrecords.h>
19 #include <apt-pkg/pkgrecords.h>
20 #include <apt-pkg/vendor.h>
29 std::vector
<pkgIndexFile
*> *Indexes
;
38 virtual std::string
GetURI() const {return URI
;}
39 virtual std::string
GetDist() const {return Dist
;}
40 virtual const char* GetType() const {return Type
;}
42 // interface to to query it
43 #if APT_PKG_ABI >= 413
44 // returns the path of the local file (or "" if its not available)
45 virtual std::string
LocalFileName() const {return "";};
47 std::string
LocalFileName() const;
50 // Interface for acquire
51 virtual std::string
ArchiveURI(std::string
const& File
) const = 0;
52 virtual bool GetIndexes(pkgAcquire
*Owner
, bool const &GetAll
=false) const = 0;
53 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles() = 0;
54 virtual bool IsTrusted() const = 0;
56 metaIndex(std::string
const &URI
, std::string
const &Dist
,
57 char const * const Type
)
58 : Indexes(NULL
), Type(Type
), URI(URI
), Dist(Dist
), Trusted(false)
67 for (std::vector
<pkgIndexFile
*>::iterator I
= (*Indexes
).begin();
68 I
!= (*Indexes
).end(); ++I
)