12#include "kleo_export.h"
27enum CryptoMessageFormat {
29 InlineOpenPGPFormat = 1,
30 OpenPGPMIMEFormat = 2,
32 SMIMEOpaqueFormat = 8,
33 AnyOpenPGP = InlineOpenPGPFormat | OpenPGPMIMEFormat,
34 AnySMIME = SMIMEOpaqueFormat | SMIMEFormat,
35 AutoFormat = AnyOpenPGP | AnySMIME
39KLEO_EXPORT
QString cryptoMessageFormatToLabel(CryptoMessageFormat f);
41KLEO_EXPORT
const char *cryptoMessageFormatToString(CryptoMessageFormat f);
42KLEO_EXPORT
QStringList cryptoMessageFormatsToStringList(
unsigned int f);
43KLEO_EXPORT CryptoMessageFormat stringToCryptoMessageFormat(
const QString &s);
44KLEO_EXPORT
unsigned int stringListToCryptoMessageFormats(
const QStringList &sl);
46enum Action {
Conflict, DoIt, DontDoIt, Ask, AskOpportunistic, Impossible };
48enum EncryptionPreference {
50 UnknownPreference = 0,
53 AlwaysEncryptIfPossible = 3,
54 AlwaysAskForEncryption = 4,
55 AskWheneverPossible = 5,
56 MaxEncryptionPreference = AskWheneverPossible
60KLEO_EXPORT
QString encryptionPreferenceToLabel(EncryptionPreference pref);
61KLEO_EXPORT
const char *encryptionPreferenceToString(EncryptionPreference pref);
62KLEO_EXPORT EncryptionPreference stringToEncryptionPreference(
const QString &str);
64enum SigningPreference {
66 UnknownSigningPreference = 0,
69 AlwaysSignIfPossible = 3,
70 AlwaysAskForSigning = 4,
71 AskSigningWheneverPossible = 5,
72 MaxSigningPreference = AskSigningWheneverPossible
76KLEO_EXPORT
QString signingPreferenceToLabel(SigningPreference pref);
77KLEO_EXPORT
const char *signingPreferenceToString(SigningPreference pref);
78KLEO_EXPORT SigningPreference stringToSigningPreference(
const QString &str);
80enum TrustLevel { Level0, Level1, Level2, Level3, Level4 };
82KLEO_EXPORT TrustLevel trustLevel(
const GpgME::Key &key);
83KLEO_EXPORT TrustLevel trustLevel(
const GpgME::UserID &uid);