Changeset View
Changeset View
Standalone View
Standalone View
src/utils/gnupg-helper.h
Show All 29 Lines | 1 | /* -*- mode: c++; c-basic-offset:4 -*- | |||
---|---|---|---|---|---|
30 | your version. | 30 | your version. | ||
31 | */ | 31 | */ | ||
32 | 32 | | |||
33 | #ifndef __KLEOPATRA_GNUPGHELPER_H__ | 33 | #ifndef __KLEOPATRA_GNUPGHELPER_H__ | ||
34 | #define __KLEOPATRA_GNUPGHELPER_H__ | 34 | #define __KLEOPATRA_GNUPGHELPER_H__ | ||
35 | 35 | | |||
36 | #include <gpgme++/engineinfo.h> | 36 | #include <gpgme++/engineinfo.h> | ||
37 | 37 | | |||
38 | /* Support compilation with GPGME older than 1.9. */ | ||||
39 | #include <gpgme++/gpgmepp_version.h> | ||||
40 | #if GPGMEPP_VERSION >= 0x10900 | ||||
41 | # define GPGME_HAS_KEY_IS_DEVS | ||||
42 | #endif | ||||
43 | | ||||
44 | /* Does the given object comply with DE_VS? This macro can be used to | ||||
45 | ensure that we can still build against older versions of GPGME | ||||
46 | without cluttering the code with preprocessor conditionals. */ | ||||
47 | #ifdef GPGME_HAS_KEY_IS_DEVS | ||||
48 | # define IS_DE_VS(x) (x).isDeVs() | ||||
49 | #else | ||||
50 | # define IS_DE_VS(x) 0 | ||||
51 | #endif | ||||
52 | | ||||
38 | class QString; | 53 | class QString; | ||
39 | class QStringList; | 54 | class QStringList; | ||
40 | 55 | | |||
41 | namespace Kleo | 56 | namespace Kleo | ||
42 | { | 57 | { | ||
43 | 58 | | |||
44 | QString gnupgHomeDirectory(); | 59 | QString gnupgHomeDirectory(); | ||
45 | 60 | | |||
46 | QString gpgConfPath(); | 61 | QString gpgConfPath(); | ||
47 | QString gpgSmPath(); | 62 | QString gpgSmPath(); | ||
48 | QString gpgPath(); | 63 | QString gpgPath(); | ||
49 | 64 | | |||
50 | QString gpgConfListDir(const char *which); | 65 | QString gpgConfListDir(const char *which); | ||
51 | QString gpg4winInstallPath(); | 66 | QString gpg4winInstallPath(); | ||
52 | QString gpg4winVersion(); | 67 | QString gpg4winVersion(); | ||
53 | QString gnupgInstallPath(); | 68 | QString gnupgInstallPath(); | ||
54 | const QString& paperKeyInstallPath(); | 69 | const QString& paperKeyInstallPath(); | ||
55 | 70 | | |||
56 | QStringList gnupgFileWhitelist(); | 71 | QStringList gnupgFileWhitelist(); | ||
57 | 72 | | |||
58 | int makeGnuPGError(int code); | 73 | int makeGnuPGError(int code); | ||
59 | 74 | | |||
60 | bool engineIsVersion(int major, int minor, int patch, GpgME::Engine = GpgME::GpgConfEngine); | 75 | bool engineIsVersion(int major, int minor, int patch, GpgME::Engine = GpgME::GpgConfEngine); | ||
61 | bool haveKeyserverConfigured(); | 76 | bool haveKeyserverConfigured(); | ||
77 | bool gpgComplianceP(const char *mode); | ||||
62 | } | 78 | } | ||
63 | 79 | | |||
64 | #endif // __KLEOPATRA_GNUPGHELPER_H__ | 80 | #endif // __KLEOPATRA_GNUPGHELPER_H__ |