From 0adaf7bafd352f1c3a1e797493780150e3bb0adc Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Thu, 19 Apr 2018 10:44:01 +0200 Subject: cpp: Add origin and last_update * NEWS: mention interface change. * lang/cpp/src/key.cpp (Key::origin, Key::lastUpdate): New. * lang/cpp/src/key.h (Key::Origin): New enum. --- lang/cpp/src/key.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lang/cpp/src/key.h') diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index c3c711c1..07ddc256 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -178,6 +178,27 @@ public: */ static Key locate(const char *mbox); + /* @enum Origin + * @brief The Origin of the key. */ + enum Origin : unsigned int { + OriginUnknown = 0, + OriginKS = 1, + OriginDane = 3, + OriginWKD = 4, + OriginURL = 5, + OriginFile = 6, + OriginSelf = 7, + OriginOther = 31, + }; + /*! Get the origin of the key. + * + * @returns the Origin. */ + Origin origin() const; + + /*! Get the last update time. + * + * @returns the last update time. */ + time_t lastUpdate() const; private: gpgme_key_t impl() const { -- cgit v1.2.3