diff options
author | Andre Heinecke <[email protected]> | 2016-02-22 18:07:41 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-02-22 18:07:41 +0000 |
commit | 433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785 (patch) | |
tree | 48029996a5cb1d65bba513e53da21fd48c3ea00e /lang/cpp/src/util.h | |
parent | Initial checkin of gpgmepp sources (diff) | |
download | gpgme-433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785.tar.gz gpgme-433bb8e84b2d1e50b5c5b9f7f2006b60cd7d7785.zip |
Remove feature check ifdefs
* lang/cpp/src/assuanresult.cpp,
lang/cpp/src/callbacks.cpp,
lang/cpp/src/configuration.cpp,
lang/cpp/src/context.cpp,
lang/cpp/src/context_glib.cpp,
lang/cpp/src/context_qt.cpp,
lang/cpp/src/context_vanilla.cpp,
lang/cpp/src/data.cpp,
lang/cpp/src/decryptionresult.cpp,
lang/cpp/src/defaultassuantransaction.cpp,
lang/cpp/src/editinteractor.cpp,
lang/cpp/src/encryptionresult.cpp,
lang/cpp/src/engineinfo.cpp,
lang/cpp/src/eventloopinteractor.cpp,
lang/cpp/src/global.h,
lang/cpp/src/gpgagentgetinfoassuantransaction.cpp,
lang/cpp/src/importresult.cpp,
lang/cpp/src/interfaces/assuantransaction.h,
lang/cpp/src/key.cpp,
lang/cpp/src/keygenerationresult.cpp,
lang/cpp/src/keylistresult.cpp,
lang/cpp/src/scdgetinfoassuantransaction.cpp,
lang/cpp/src/signingresult.cpp,
lang/cpp/src/trustitem.cpp,
lang/cpp/src/util.h,
lang/cpp/src/verificationresult.cpp,
lang/cpp/src/vfsmountresult.cpp: Remove feature checks.
Diffstat (limited to '')
-rw-r--r-- | lang/cpp/src/util.h | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/lang/cpp/src/util.h b/lang/cpp/src/util.h index ed526e13..8ccb0bf5 100644 --- a/lang/cpp/src/util.h +++ b/lang/cpp/src/util.h @@ -68,18 +68,10 @@ static inline gpgme_keylist_mode_t add_to_gpgme_keylist_mode_t(unsigned int oldm oldmode |= GPGME_KEYLIST_MODE_SIGS; } if (newmodes & GpgME::SignatureNotations) { -#ifdef HAVE_GPGME_KEYLIST_MODE_SIG_NOTATIONS oldmode |= GPGME_KEYLIST_MODE_SIG_NOTATIONS; -#elif !defined(NDEBUG) - ;//std::cerr << "GpgME: ignoring SignatureNotations keylist flag (gpgme too old)." << std::endl; -#endif } if (newmodes & GpgME::Ephemeral) { -#ifdef HAVE_GPGME_KEYLIST_MODE_EPHEMERAL oldmode |= GPGME_KEYLIST_MODE_EPHEMERAL; -#elif !defined(NDEBUG) - ;//std::cerr << "GpgME: ignoring Ephemeral keylist flag (gpgme too old)." << std::endl; -#endif } if (newmodes & GpgME::Validate) { oldmode |= GPGME_KEYLIST_MODE_VALIDATE; @@ -105,28 +97,20 @@ static inline unsigned int convert_from_gpgme_keylist_mode_t(unsigned int mode) if (mode & GPGME_KEYLIST_MODE_SIGS) { result |= GpgME::Signatures; } -#ifdef HAVE_GPGME_KEYLIST_MODE_SIG_NOTATIONS if (mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS) { result |= GpgME::SignatureNotations; } -#endif -#ifdef HAVE_GPGME_KEYLIST_MODE_EPHEMERAL if (mode & GPGME_KEYLIST_MODE_EPHEMERAL) { result |= GpgME::Ephemeral; } -#endif if (mode & GPGME_KEYLIST_MODE_VALIDATE) { result |= GpgME::Validate; } #ifndef NDEBUG if (mode & ~(GPGME_KEYLIST_MODE_LOCAL | GPGME_KEYLIST_MODE_EXTERN | -#ifdef HAVE_GPGME_KEYLIST_MODE_SIG_NOTATIONS GPGME_KEYLIST_MODE_SIG_NOTATIONS | -#endif -#ifdef HAVE_GPGME_KEYLIST_MODE_EPHEMERAL GPGME_KEYLIST_MODE_EPHEMERAL | -#endif GPGME_KEYLIST_MODE_VALIDATE | GPGME_KEYLIST_MODE_SIGS)) { //std::cerr << "GpgME: WARNING: gpgme_get_keylist_mode() returned an unknown flag!" << std::endl; @@ -137,43 +121,26 @@ static inline unsigned int convert_from_gpgme_keylist_mode_t(unsigned int mode) static inline GpgME::Notation::Flags convert_from_gpgme_sig_notation_flags_t(unsigned int flags) { -#ifdef HAVE_GPGME_SIG_NOTATION_FLAGS_T unsigned int result = 0; -#ifdef HAVE_GPGME_SIG_NOTATION_HUMAN_READABLE if (flags & GPGME_SIG_NOTATION_HUMAN_READABLE) { result |= GpgME::Notation::HumanReadable ; } -#endif -#ifdef HAVE_GPGME_SIG_NOTATION_CRITICAL if (flags & GPGME_SIG_NOTATION_CRITICAL) { result |= GpgME::Notation::Critical ; } -#endif return static_cast<GpgME::Notation::Flags>(result); -#else - return GpgME::Notation::NoFlags; -#endif } -#ifdef HAVE_GPGME_SIG_NOTATION_FLAGS_T + static inline gpgme_sig_notation_flags_t add_to_gpgme_sig_notation_flags_t(unsigned int oldflags, unsigned int newflags) { unsigned int result = oldflags; if (newflags & GpgME::Notation::HumanReadable) { -#ifdef HAVE_GPGME_SIG_NOTATION_HUMAN_READABLE result |= GPGME_SIG_NOTATION_HUMAN_READABLE; -#elif !defined(NDEBUG) - //std::cerr << "GpgME::Context: ignoring HumanReadable signature notation flag (gpgme too old)" << std::endl; -#endif } if (newflags & GpgME::Notation::Critical) { -#ifdef HAVE_GPGME_SIG_NOTATION_CRITICAL result |= GPGME_SIG_NOTATION_CRITICAL; -#elif !defined(NDEBUG) - //std::cerr << "GpgME::Context: ignoring Critical signature notation flag (gpgme too old)" << std::endl; -#endif } return static_cast<gpgme_sig_notation_flags_t>(result); } -#endif #endif // __GPGMEPP_UTIL_H__ |