vendorlist.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. class __deprecated pkgVendorList
  18. {
  19. protected:
  20. std::vector<Vendor const *> VendorList;
  21. bool CreateList(Configuration& Cnf);
  22. const Vendor* LookupFingerprint(std::string Fingerprint);
  23. public:
  24. typedef std::vector<Vendor const *>::const_iterator const_iterator;
  25. bool ReadMainList();
  26. bool Read(std::string File);
  27. // List accessors
  28. inline const_iterator begin() const {return VendorList.begin();};
  29. inline const_iterator end() const {return VendorList.end();};
  30. inline unsigned int size() const {return VendorList.size();};
  31. inline bool empty() const {return VendorList.empty();};
  32. const Vendor* FindVendor(const std::vector<std::string> GPGVOutput);
  33. ~pkgVendorList();
  34. };
  35. #endif