apt  1.5
vendorlist.h
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/macros.h>
00019 
00020 #ifndef APT_8_CLEANER_HEADERS
00021 #include <apt-pkg/vendor.h>
00022 #include <apt-pkg/configuration.h>
00023 using std::string;
00024 using std::vector;
00025 #endif
00026 
00027 class Vendor;
00028 class Configuration;
00029 
00030 class __deprecated pkgVendorList
00031 {
00032    protected:
00033    std::vector<Vendor const *> VendorList;
00034 
00035    bool CreateList(Configuration& Cnf);
00036    const Vendor* LookupFingerprint(std::string Fingerprint);
00037 
00038    public:
00039    typedef std::vector<Vendor const *>::const_iterator const_iterator;
00040    bool ReadMainList();
00041    bool Read(std::string File);
00042 
00043    // List accessors
00044    inline const_iterator begin() const {return VendorList.begin();};
00045    inline const_iterator end() const {return VendorList.end();};
00046    inline unsigned int size() const {return VendorList.size();};
00047    inline bool empty() const {return VendorList.empty();};
00048 
00049    const Vendor* FindVendor(const std::vector<std::string> GPGVOutput);
00050 
00051    ~pkgVendorList();
00052 };
00053 
00054 #endif