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 ce2e75a25fd4166caa6b24fff3ecdb7d6acc0294..ed936f7e7792bd48a2d412342e900b050f29280b 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 8a7772bf6bc40e91e056da7c70baf2b21f141c80..474e439d60a2a0c7b79ccd79ab679720ce887f25 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;
   }
 }