diff options
| author | Andre Heinecke <[email protected]> | 2018-02-16 11:58:54 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2018-02-16 12:00:49 +0000 | 
| commit | 7f9d5c6cd204bfd84ea477b284df795b1dadb1af (patch) | |
| tree | f0db6da93e3442f4c76095feb610375cf2309873 /lang/cpp/src/key.h | |
| parent | tests: Fix previous commit (diff) | |
| download | gpgme-7f9d5c6cd204bfd84ea477b284df795b1dadb1af.tar.gz gpgme-7f9d5c6cd204bfd84ea477b284df795b1dadb1af.zip | |
cpp: Add shorthand for key locate
* lang/cpp/src/key.cpp (Key::locate): New static helper.
* lang/cpp/src/key.h: Update accordingly.
Diffstat (limited to '')
| -rw-r--r-- | lang/cpp/src/key.h | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index 829bd266..c3c711c1 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -164,6 +164,20 @@ public:       * @returns a possible error.       **/      Error addUid(const char *uid); + +    /** +     * @brief try to locate the best pgp key for a given mailbox. +     * +     * Boils down to gpg --locate-key <mbox> +     * This may take some time if remote sources are also +     * used. +     * +     * @param mbox should be a mail address does not need to be normalized. +     * +     * @returns The best key for a mailbox or a null key. +     */ +    static Key locate(const char *mbox); +  private:      gpgme_key_t impl() const      { | 
