]> git.saurik.com Git - apt-legacy.git/blame - apt-pkg/vendorlist.h
Drastic, sweeping modifications to support iPhone 1.2.0/2.0.
[apt-legacy.git] / apt-pkg / vendorlist.h
CommitLineData
da6ee469
JF
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/vendor.h>
19#include <apt-pkg/configuration.h>
20
21using std::string;
22using std::vector;
23
24#ifdef __GNUG__
25#pragma interface "apt-pkg/vendorlist.h"
26#endif
27
28class pkgVendorList
29{
30 protected:
31 vector<Vendor const *> VendorList;
32
33 bool CreateList(Configuration& Cnf);
34 const Vendor* LookupFingerprint(string Fingerprint);
35
36 public:
37 typedef vector<Vendor const *>::const_iterator const_iterator;
38 bool ReadMainList();
39 bool Read(string File);
40
41 // List accessors
42 inline const_iterator begin() const {return VendorList.begin();};
43 inline const_iterator end() const {return VendorList.end();};
44 inline unsigned int size() const {return VendorList.size();};
45 inline bool empty() const {return VendorList.empty();};
46
47 const Vendor* FindVendor(const vector<string> GPGVOutput);
48
49 ~pkgVendorList();
50};
51
52#endif