vendorlist.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: vendorlist.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $
  4. /* ######################################################################
  5. VendorList - Manage a list of vendors
  6. The Vendor List class provides access to a list of vendors and
  7. attributes associated with them, read from a configuration file.
  8. ##################################################################### */
  9. /*}}}*/
  10. #ifndef PKGLIB_VENDORLIST_H
  11. #define PKGLIB_VENDORLIST_H
  12. #include <string>
  13. #include <vector>
  14. #include <apt-pkg/vendor.h>
  15. #include <apt-pkg/configuration.h>
  16. #include <apt-pkg/macros.h>
  17. using std::string;
  18. using std::vector;
  19. class __deprecated pkgVendorList
  20. {
  21. protected:
  22. vector<Vendor const *> VendorList;
  23. bool CreateList(Configuration& Cnf);
  24. const Vendor* LookupFingerprint(string Fingerprint);
  25. public:
  26. typedef vector<Vendor const *>::const_iterator const_iterator;
  27. bool ReadMainList();
  28. bool Read(string File);
  29. // List accessors
  30. inline const_iterator begin() const {return VendorList.begin();};
  31. inline const_iterator end() const {return VendorList.end();};
  32. inline unsigned int size() const {return VendorList.size();};
  33. inline bool empty() const {return VendorList.empty();};
  34. const Vendor* FindVendor(const vector<string> GPGVOutput);
  35. ~pkgVendorList();
  36. };
  37. #endif