]> git.saurik.com Git - apt.git/blame - apt-pkg/vendor.cc
Merge remote-tracking branch 'mvo/bugfix/apt-get-source-unauthenticated-warning'...
[apt.git] / apt-pkg / vendor.cc
CommitLineData
ea542140
DK
1#include<config.h>
2
b3d44315
MV
3#include <apt-pkg/vendor.h>
4#include <apt-pkg/configuration.h>
5
453b82a3
DK
6#include <iostream>
7#include <map>
8#include <string>
9#include <utility>
10#include <vector>
11
b3d44315
MV
12Vendor::Vendor(std::string VendorID,
13 std::string Origin,
14 std::vector<struct Vendor::Fingerprint *> *FingerprintList)
15{
16 this->VendorID = VendorID;
17 this->Origin = Origin;
18 for (std::vector<struct Vendor::Fingerprint *>::iterator I = FingerprintList->begin();
69c2ecbd 19 I != FingerprintList->end(); ++I)
b3d44315
MV
20 {
21 if (_config->FindB("Debug::Vendor", false))
22 std::cerr << "Vendor \"" << VendorID << "\": Mapping \""
23 << (*I)->Print << "\" to \"" << (*I)->Description << '"' << std::endl;
24 Fingerprints[(*I)->Print] = (*I)->Description;
25 }
26 delete FingerprintList;
27}
28
8f3ba4e8 29const std::string Vendor::LookupFingerprint(std::string Print) const
b3d44315 30{
8f3ba4e8 31 std::map<std::string,std::string>::const_iterator Elt = Fingerprints.find(Print);
b3d44315
MV
32 if (Elt == Fingerprints.end())
33 return "";
34 else
35 return (*Elt).second;
36}
37
a02db58f 38APT_CONST bool Vendor::CheckDist(std::string /*Dist*/)
b3d44315
MV
39{
40 return true;
41}