File: vendorlist.h

package info (click to toggle)
apt 1.0.9.8.4
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 15,080 kB
  • ctags: 5,307
  • sloc: cpp: 50,972; sh: 12,111; xml: 4,130; makefile: 855; perl: 209; python: 28
file content (54 lines) | stat: -rw-r--r-- 1,493 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: vendorlist.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################

   VendorList - Manage a list of vendors
   
   The Vendor List class provides access to a list of vendors and
   attributes associated with them, read from a configuration file.
   
   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_VENDORLIST_H
#define PKGLIB_VENDORLIST_H

#include <string>
#include <vector>
#include <apt-pkg/macros.h>

#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/vendor.h>
#include <apt-pkg/configuration.h>
using std::string;
using std::vector;
#endif

class Vendor;
class Configuration;

class APT_DEPRECATED pkgVendorList
{
   protected:
   std::vector<Vendor const *> VendorList;

   bool CreateList(Configuration& Cnf);
   const Vendor* LookupFingerprint(std::string Fingerprint);

   public:
   typedef std::vector<Vendor const *>::const_iterator const_iterator;
   bool ReadMainList();
   bool Read(std::string File);

   // List accessors
   inline const_iterator begin() const {return VendorList.begin();};
   inline const_iterator end() const {return VendorList.end();};
   inline unsigned int size() const {return VendorList.size();};
   inline bool empty() const {return VendorList.empty();};

   const Vendor* FindVendor(const std::vector<std::string> GPGVOutput);

   ~pkgVendorList();
};

#endif