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