]> git.saurik.com Git - apt.git/blob - apt-pkg/vendor.cc
* apt-pkg/orderlist.cc:
[apt.git] / apt-pkg / vendor.cc
1 #include <iostream>
2 #include <apt-pkg/error.h>
3 #include <apt-pkg/vendor.h>
4 #include <apt-pkg/configuration.h>
5
6 Vendor::Vendor(std::string VendorID,
7 std::string Origin,
8 std::vector<struct Vendor::Fingerprint *> *FingerprintList)
9 {
10 this->VendorID = VendorID;
11 this->Origin = Origin;
12 for (std::vector<struct Vendor::Fingerprint *>::iterator I = FingerprintList->begin();
13 I != FingerprintList->end(); I++)
14 {
15 if (_config->FindB("Debug::Vendor", false))
16 std::cerr << "Vendor \"" << VendorID << "\": Mapping \""
17 << (*I)->Print << "\" to \"" << (*I)->Description << '"' << std::endl;
18 Fingerprints[(*I)->Print] = (*I)->Description;
19 }
20 delete FingerprintList;
21 }
22
23 const string Vendor::LookupFingerprint(string Print) const
24 {
25 std::map<string,string>::const_iterator Elt = Fingerprints.find(Print);
26 if (Elt == Fingerprints.end())
27 return "";
28 else
29 return (*Elt).second;
30 }
31
32 bool Vendor::CheckDist(string Dist)
33 {
34 return true;
35 }