apt
@VERSION@
|
00001 // ijones, walters 00002 #ifndef PKGLIB_DEBMETAINDEX_H 00003 #define PKGLIB_DEBMETAINDEX_H 00004 00005 #include <apt-pkg/metaindex.h> 00006 00007 #include <map> 00008 #include <string> 00009 #include <vector> 00010 00011 #ifndef APT_8_CLEANER_HEADERS 00012 #include <apt-pkg/sourcelist.h> 00013 #endif 00014 00015 class debReleaseIndex : public metaIndex { 00016 public: 00017 00018 class debSectionEntry 00019 { 00020 public: 00021 debSectionEntry (std::string const &Section, bool const &IsSrc); 00022 std::string const Section; 00023 bool const IsSrc; 00024 }; 00025 00026 private: 00028 void *d; 00029 std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries; 00030 enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; 00031 00032 public: 00033 00034 debReleaseIndex(std::string const &URI, std::string const &Dist); 00035 debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted); 00036 virtual ~debReleaseIndex(); 00037 00038 virtual std::string ArchiveURI(std::string const &File) const {return URI + File;}; 00039 virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const; 00040 std::vector <struct IndexTarget *>* ComputeIndexTargets() const; 00041 std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const; 00042 std::string MetaIndexInfo(const char *Type) const; 00043 std::string MetaIndexFile(const char *Types) const; 00044 std::string MetaIndexURI(const char *Type) const; 00045 std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const; 00046 std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const; 00047 std::string SourceIndexURI(const char *Type, const std::string &Section) const; 00048 std::string SourceIndexURISuffix(const char *Type, const std::string &Section) const; 00049 std::string TranslationIndexURI(const char *Type, const std::string &Section) const; 00050 std::string TranslationIndexURISuffix(const char *Type, const std::string &Section) const; 00051 virtual std::vector <pkgIndexFile *> *GetIndexFiles(); 00052 00053 void SetTrusted(bool const Trusted); 00054 virtual bool IsTrusted() const; 00055 00056 void PushSectionEntry(std::vector<std::string> const &Archs, const debSectionEntry *Entry); 00057 void PushSectionEntry(std::string const &Arch, const debSectionEntry *Entry); 00058 void PushSectionEntry(const debSectionEntry *Entry); 00059 }; 00060 00061 #endif