summaryrefslogtreecommitdiff
path: root/apt-pkg/indexrecords.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/indexrecords.cc')
-rw-r--r--apt-pkg/indexrecords.cc24
1 files changed, 21 insertions, 3 deletions
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 8c1e2229b..bf1901e11 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -253,12 +253,30 @@ bool indexRecords::parseSumData(const char *&Start, const char *End, /*{{{*/
return true;
}
/*}}}*/
-indexRecords::indexRecords()
+
+APT_PURE bool indexRecords::IsAlwaysTrusted() const
+{
+ if (Trusted == ALWAYS_TRUSTED)
+ return true;
+ return false;
+}
+APT_PURE bool indexRecords::IsNeverTrusted() const
+{
+ if (Trusted == NEVER_TRUSTED)
+ return true;
+ return false;
+}
+void indexRecords::SetTrusted(bool const Trusted)
{
+ if (Trusted == true)
+ this->Trusted = ALWAYS_TRUSTED;
+ else
+ this->Trusted = NEVER_TRUSTED;
}
-indexRecords::indexRecords(const string ExpectedDist) :
- ExpectedDist(ExpectedDist), ValidUntil(0), SupportsAcquireByHash(false)
+indexRecords::indexRecords(const string &ExpectedDist) :
+ Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
+ SupportsAcquireByHash(false)
{
}