More feature selectors
authorMatthias Kalle Dalheimer <kalle@kdab.net>
Thu, 21 Mar 2002 13:14:20 +0000 (13:14 +0000)
committerMatthias Kalle Dalheimer <kalle@kdab.net>
Thu, 21 Mar 2002 13:14:20 +0000 (13:14 +0000)
Plugin says which features it supports

gpgmeplug/cryptplug.h
gpgmeplug/gpgmeplug.c

index ce2e75a..ed936f7 100644 (file)
@@ -161,14 +161,25 @@ typedef char bool;
 */
 
 
-// dummy values:
 typedef enum {
-  CryptPlugFeat_undef             = 0,
-
-  CryptPlugFeat_SignMessages      = 1,
-  CryptPlugFeat_VerifySignatures  = 2,
-  CryptPlugFeat_EncryptMessages   = 3,
-  CryptPlugFeat_DecryptMessages   = 4   // more to follow ...
+  Feature_undef             = 0,
+
+  Feature_SignMessages      = 1,
+  Feature_VerifySignatures  = 2,
+  Feature_EncryptMessages   = 3,
+  Feature_DecryptMessages   = 4,
+  Feature_SendCertificates  = 5,
+  Feature_WarnSignCertificateExpiry = 6,
+  Feature_WarnSignEmailNotInCertificate = 7,
+  Feature_PinEntrySettings  = 8,
+  Feature_StoreMessagesWithSigs = 9,
+  Feature_EncryptionCRLs    = 10,
+  Feature_WarnEncryptCertificateExpiry = 11,
+  Feature_WarnEncryptEmailNotInCertificate = 12,
+  Feature_StoreMessagesEncrypted = 13,
+  Feature_CheckCertificatePath = 14,
+  Feature_CertificateDirectoryService = 15,
+  Feature_CRLDirectoryService = 16
 } Feature;
 
 // dummy values
index 8a7772b..474e439 100644 (file)
@@ -228,14 +228,27 @@ void deinitialize()
 
 bool hasFeature( Feature flag )
 {
+    // our own plugins are supposed to support everything
   switch ( flag ) {
-    case CryptPlugFeat_SignMessages:              return true;
-    case CryptPlugFeat_VerifySignatures:          return true;
-    case CryptPlugFeat_EncryptMessages:           return true;
-    case CryptPlugFeat_DecryptMessages:           return true;
-    // undefined or not yet implemented:
-    case CryptPlugFeat_undef:                     return false;
-    default:                                      return false;
+  case Feature_SignMessages:              return true;
+  case Feature_VerifySignatures:          return true;
+  case Feature_EncryptMessages:           return true;
+  case Feature_DecryptMessages:           return true;
+  case Feature_SendCertificates:          return true;
+  case Feature_WarnSignCertificateExpiry: return true;
+  case Feature_WarnSignEmailNotInCertificate: return true;
+  case Feature_PinEntrySettings:          return true;
+  case Feature_StoreMessagesWithSigs:     return true;
+  case Feature_EncryptionCRLs:            return true;
+  case Feature_WarnEncryptCertificateExpiry: return true;
+  case Feature_WarnEncryptEmailNotInCertificate: return true;
+  case Feature_StoreMessagesEncrypted:    return true;
+  case Feature_CheckCertificatePath:      return true;
+  case Feature_CertificateDirectoryService: return true;
+  case Feature_CRLDirectoryService:       return true;
+      // undefined or not yet implemented:
+  case Feature_undef:                     return false;
+  default:                                      return false;
   }
 }