]> git.saurik.com Git - apt.git/blame - apt-pkg/vendorlist.h
Merge branch 'debian/sid' into debian/experimental
[apt.git] / apt-pkg / vendorlist.h
CommitLineData
b3d44315
MV
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>
82b6682a 18#include <apt-pkg/macros.h>
b3d44315 19
a4f6bdc8 20#ifndef APT_8_CLEANER_HEADERS
b9dadc24
DK
21#include <apt-pkg/vendor.h>
22#include <apt-pkg/configuration.h>
a4f6bdc8
DK
23using std::string;
24using std::vector;
25#endif
26
472ff00e
DK
27class Vendor;
28class Configuration;
29
453b82a3 30class APT_DEPRECATED pkgVendorList
b3d44315
MV
31{
32 protected:
8f3ba4e8 33 std::vector<Vendor const *> VendorList;
b3d44315
MV
34
35 bool CreateList(Configuration& Cnf);
8f3ba4e8 36 const Vendor* LookupFingerprint(std::string Fingerprint);
b3d44315
MV
37
38 public:
8f3ba4e8 39 typedef std::vector<Vendor const *>::const_iterator const_iterator;
b3d44315 40 bool ReadMainList();
8f3ba4e8 41 bool Read(std::string File);
b3d44315
MV
42
43 // List accessors
44 inline const_iterator begin() const {return VendorList.begin();};
45 inline const_iterator end() const {return VendorList.end();};
46 inline unsigned int size() const {return VendorList.size();};
47 inline bool empty() const {return VendorList.empty();};
48
8f3ba4e8 49 const Vendor* FindVendor(const std::vector<std::string> GPGVOutput);
b3d44315
MV
50
51 ~pkgVendorList();
52};
53
54#endif