00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef PKGLIB_VENDORLIST_H
00014 #define PKGLIB_VENDORLIST_H
00015
00016 #include <string>
00017 #include <vector>
00018 #include <apt-pkg/vendor.h>
00019 #include <apt-pkg/configuration.h>
00020
00021 using std::string;
00022 using std::vector;
00023
00024
00025 class pkgVendorList
00026 {
00027 protected:
00028 vector<Vendor const *> VendorList;
00029
00030 bool CreateList(Configuration& Cnf);
00031 const Vendor* LookupFingerprint(string Fingerprint);
00032
00033 public:
00034 typedef vector<Vendor const *>::const_iterator const_iterator;
00035 bool ReadMainList();
00036 bool Read(string File);
00037
00038
00039 inline const_iterator begin() const {return VendorList.begin();};
00040 inline const_iterator end() const {return VendorList.end();};
00041 inline unsigned int size() const {return VendorList.size();};
00042 inline bool empty() const {return VendorList.empty();};
00043
00044 const Vendor* FindVendor(const vector<string> GPGVOutput);
00045
00046 ~pkgVendorList();
00047 };
00048
00049 #endif