diff options
Diffstat (limited to 'lang/cpp/src')
-rw-r--r-- | lang/cpp/src/tofuinfo.cpp | 30 | ||||
-rw-r--r-- | lang/cpp/src/tofuinfo.h | 13 |
2 files changed, 35 insertions, 8 deletions
diff --git a/lang/cpp/src/tofuinfo.cpp b/lang/cpp/src/tofuinfo.cpp index ade262bb..bb67fc8c 100644 --- a/lang/cpp/src/tofuinfo.cpp +++ b/lang/cpp/src/tofuinfo.cpp @@ -123,14 +123,29 @@ unsigned short GpgME::TofuInfo::signCount() const return isNull() ? 0 : d->mInfo->signcount; } -unsigned long GpgME::TofuInfo::firstSeen() const +unsigned short GpgME::TofuInfo::encrCount() const { - return isNull() ? 0 : d->mInfo->firstseen; + return isNull() ? 0 : d->mInfo->encrcount; } -unsigned long GpgME::TofuInfo::lastSeen() const +unsigned long GpgME::TofuInfo::signFirst() const { - return isNull() ? 0 : d->mInfo->lastseen; + return isNull() ? 0 : d->mInfo->signfirst; +} + +unsigned long GpgME::TofuInfo::signLast() const +{ + return isNull() ? 0 : d->mInfo->signlast; +} + +unsigned long GpgME::TofuInfo::encrFirst() const +{ + return isNull() ? 0 : d->mInfo->encrfirst; +} + +unsigned long GpgME::TofuInfo::encrLast() const +{ + return isNull() ? 0 : d->mInfo->encrlast; } std::ostream &GpgME::operator<<(std::ostream &os, const GpgME::TofuInfo &info) @@ -141,8 +156,11 @@ std::ostream &GpgME::operator<<(std::ostream &os, const GpgME::TofuInfo &info) << "\n validity: " << info.validity() << "\n policy: " << info.policy() << "\n signcount: "<< info.signCount() - << "\n firstseen: "<< info.firstSeen() - << "\n lastseen: " << info.lastSeen() + << "\n signfirst: "<< info.signFirst() + << "\n signlast: " << info.signLast() + << "\n encrcount: "<< info.encrCount() + << "\n encrfirst: "<< info.encrFirst() + << "\n encrlast: " << info.encrLast() << '\n'; } return os << ")"; diff --git a/lang/cpp/src/tofuinfo.h b/lang/cpp/src/tofuinfo.h index eb5dbcc5..ec253e96 100644 --- a/lang/cpp/src/tofuinfo.h +++ b/lang/cpp/src/tofuinfo.h @@ -93,11 +93,20 @@ public: /* Number of signatures seen for this binding. Capped at USHRT_MAX. */ unsigned short signCount() const; + /* Number of encryption done to this binding. Capped at USHRT_MAX. */ + unsigned short encrCount() const; + /** Number of seconds since epoch when the first message was verified */ - unsigned long firstSeen() const; + unsigned long signFirst() const; /** Number of seconds since epoch when the last message was verified */ - unsigned long lastSeen() const; + unsigned long signLast() const; + + /** Number of seconds since epoch when the first message was encrypted */ + unsigned long encrFirst() const; + + /** Number of seconds since epoch when the last message was encrypted */ + unsigned long encrLast() const; /* If non-NULL a human readable string summarizing the TOFU data. */ const char *description() const; |