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