use forward declaration in headers if possible instead of includes
[ntk/apt.git] / apt-pkg / vendorlist.h
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
6 VendorList - Manage a list of vendors
7
8 The Vendor List class provides access to a list of vendors and
9 attributes associated with them, read from a configuration file.
10
11 ##################################################################### */
12 /*}}}*/
13 #ifndef PKGLIB_VENDORLIST_H
14 #define PKGLIB_VENDORLIST_H
15
16 #include <string>
17 #include <vector>
18 #include <apt-pkg/macros.h>
19
20 class Vendor;
21 class Configuration;
22
23 class __deprecated pkgVendorList
24 {
25 protected:
26 std::vector<Vendor const *> VendorList;
27
28 bool CreateList(Configuration& Cnf);
29 const Vendor* LookupFingerprint(std::string Fingerprint);
30
31 public:
32 typedef std::vector<Vendor const *>::const_iterator const_iterator;
33 bool ReadMainList();
34 bool Read(std::string File);
35
36 // List accessors
37 inline const_iterator begin() const {return VendorList.begin();};
38 inline const_iterator end() const {return VendorList.end();};
39 inline unsigned int size() const {return VendorList.size();};
40 inline bool empty() const {return VendorList.empty();};
41
42 const Vendor* FindVendor(const std::vector<std::string> GPGVOutput);
43
44 ~pkgVendorList();
45 };
46
47 #endif