]> git.saurik.com Git - apt.git/blame_incremental - apt-pkg/vendor.cc
* move upgrade releated code into upgrade.{cc,h}
[apt.git] / apt-pkg / vendor.cc
... / ...
CommitLineData
1#include<config.h>
2
3#include <iostream>
4#include <apt-pkg/error.h>
5#include <apt-pkg/vendor.h>
6#include <apt-pkg/configuration.h>
7
8Vendor::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
25const std::string Vendor::LookupFingerprint(std::string Print) const
26{
27 std::map<std::string,std::string>::const_iterator Elt = Fingerprints.find(Print);
28 if (Elt == Fingerprints.end())
29 return "";
30 else
31 return (*Elt).second;
32}
33
34bool Vendor::CheckDist(std::string Dist)
35{
36 return true;
37}