diff options
author | Andre Heinecke <[email protected]> | 2016-04-11 15:02:04 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-04-11 15:06:14 +0000 |
commit | 1bb162a54ba480413c4da07f2578efe6860494c0 (patch) | |
tree | eccf5fe6a26088f8e510480c47cf993991cd247a /lang/cpp/src/key.h | |
parent | Cpp: Remove last usages of boost (diff) | |
download | gpgme-1bb162a54ba480413c4da07f2578efe6860494c0.tar.gz gpgme-1bb162a54ba480413c4da07f2578efe6860494c0.zip |
Cpp: Add string comparators for keys
* lang/cpp/src/global.h (GPGMEPP_MAKE_STRCMP): New.
(_gpgmepp_strcmp): NULL save wrapper around std::strcmp.
* lang/cpp/src/key.h: Add comparators for various attributes.
--
This was taken from libkleo predicates.h. Appears generally useful.
Diffstat (limited to 'lang/cpp/src/key.h')
-rw-r--r-- | lang/cpp/src/key.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index a87a35cf..30badeaa 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -353,4 +353,9 @@ GPGMEPP_MAKE_STD_SWAP_SPECIALIZATION(Subkey) GPGMEPP_MAKE_STD_SWAP_SPECIALIZATION(UserID) GPGMEPP_MAKE_STD_SWAP_SPECIALIZATION(UserID::Signature) +GPGMEPP_MAKE_STRCMP(ByFingerprint, .primaryFingerprint()); +GPGMEPP_MAKE_STRCMP(ByKeyID, .keyID()); +GPGMEPP_MAKE_STRCMP(ByShortKeyID, .shortKeyID()); +GPGMEPP_MAKE_STRCMP(ByChainID, .chainID()); + #endif // __GPGMEPP_KEY_H__ |