diff options
author | Andre Heinecke <[email protected]> | 2018-04-19 08:44:01 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2018-04-19 08:46:34 +0000 |
commit | 0adaf7bafd352f1c3a1e797493780150e3bb0adc (patch) | |
tree | 5d6ebe94de32a44eb1f8e4ffe2532a49a698fb0f /lang/cpp/src/key.h | |
parent | core: Remove leftover debug output. (diff) | |
download | gpgme-0adaf7bafd352f1c3a1e797493780150e3bb0adc.tar.gz gpgme-0adaf7bafd352f1c3a1e797493780150e3bb0adc.zip |
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.
Diffstat (limited to 'lang/cpp/src/key.h')
-rw-r--r-- | lang/cpp/src/key.h | 21 |
1 files changed, 21 insertions, 0 deletions
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 { |