summaryrefslogtreecommitdiff
path: root/apt-pkg/vendorlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/vendorlist.h')
-rw-r--r--apt-pkg/vendorlist.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/apt-pkg/vendorlist.h b/apt-pkg/vendorlist.h
new file mode 100644
index 000000000..7f96fc766
--- /dev/null
+++ b/apt-pkg/vendorlist.h
@@ -0,0 +1,52 @@
+// -*- 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/vendor.h>
+#include <apt-pkg/configuration.h>
+
+using std::string;
+using std::vector;
+
+#ifdef __GNUG__
+#pragma interface "apt-pkg/vendorlist.h"
+#endif
+
+class pkgVendorList
+{
+ protected:
+ vector<Vendor const *> VendorList;
+
+ bool CreateList(Configuration& Cnf);
+ const Vendor* LookupFingerprint(string Fingerprint);
+
+ public:
+ typedef vector<Vendor const *>::const_iterator const_iterator;
+ bool ReadMainList();
+ bool Read(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 vector<string> GPGVOutput);
+
+ ~pkgVendorList();
+};
+
+#endif