apt @VERSION@
|
00001 // -*- mode: cpp; mode: fold -*- 00002 // Description /*{{{*/ 00003 // $Id: vendorlist.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $ 00004 /* ###################################################################### 00005 00006 VendorList - Manage a list of vendors 00007 00008 The Vendor List class provides access to a list of vendors and 00009 attributes associated with them, read from a configuration file. 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 #include <apt-pkg/macros.h> 00021 00022 using std::string; 00023 using std::vector; 00024 00025 00026 class __deprecated pkgVendorList 00027 { 00028 protected: 00029 vector<Vendor const *> VendorList; 00030 00031 bool CreateList(Configuration& Cnf); 00032 const Vendor* LookupFingerprint(string Fingerprint); 00033 00034 public: 00035 typedef vector<Vendor const *>::const_iterator const_iterator; 00036 bool ReadMainList(); 00037 bool Read(string File); 00038 00039 // List accessors 00040 inline const_iterator begin() const {return VendorList.begin();}; 00041 inline const_iterator end() const {return VendorList.end();}; 00042 inline unsigned int size() const {return VendorList.size();}; 00043 inline bool empty() const {return VendorList.empty();}; 00044 00045 const Vendor* FindVendor(const vector<string> GPGVOutput); 00046 00047 ~pkgVendorList(); 00048 }; 00049 00050 #endif