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