we don't use strdup in mutt sources anymore, remove that compat file
[apps/madmutt.git] / crypt-mod.h
index dabf9a2..eb12b93 100644 (file)
@@ -1,19 +1,10 @@
 /*
+ * Copyright notice from original mutt:
  * Copyright (C) 2004 g10 Code GmbH
  *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- * 
- *     This program is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- * 
- *     You should have received a copy of the GNU General Public License
- *     along with this program; if not, write to the Free Software
- *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
  */
 
 #ifndef CRYPTOGRAPHY_H
@@ -34,8 +25,8 @@ typedef int (*crypt_func_valid_passphrase_t) (void);
 typedef int (*crypt_func_decrypt_mime_t) (FILE * a, FILE ** b,
                                           BODY * c, BODY ** d);
 
-typedef void (*crypt_func_application_handler_t) (BODY * m, STATE * s);
-typedef void (*crypt_func_encrypted_handler_t) (BODY * m, STATE * s);
+typedef int (*crypt_func_application_handler_t) (BODY * m, STATE * s);
+typedef int (*crypt_func_encrypted_handler_t) (BODY * m, STATE * s);
 
 typedef void (*crypt_func_pgp_invoke_getkeys_t) (ADDRESS * addr);
 typedef int (*crypt_func_pgp_check_traditional_t) (FILE * fp, BODY * b,
@@ -74,48 +65,35 @@ typedef void (*crypt_func_init_t) (void);
    A structure to keep all crypto module fucntions together.
  */
 typedef struct crypt_module_functions {
-  /* Common/General functions.  */
-  crypt_func_init_t init;
-  crypt_func_void_passphrase_t void_passphrase;
-  crypt_func_valid_passphrase_t valid_passphrase;
-  crypt_func_decrypt_mime_t decrypt_mime;
-  crypt_func_application_handler_t application_handler;
-  crypt_func_encrypted_handler_t encrypted_handler;
-  crypt_func_findkeys_t findkeys;
-  crypt_func_sign_message_t sign_message;
-  crypt_func_verify_one_t verify_one;
-  crypt_func_send_menu_t send_menu;
-
-  /* PGP specific functions.  */
-  crypt_func_pgp_encrypt_message_t pgp_encrypt_message;
-  crypt_func_pgp_make_key_attachment_t pgp_make_key_attachment;
-  crypt_func_pgp_check_traditional_t pgp_check_traditional;
-  crypt_func_pgp_traditional_encryptsign_t pgp_traditional_encryptsign;
-  crypt_func_pgp_invoke_getkeys_t pgp_invoke_getkeys;
-  crypt_func_pgp_invoke_import_t pgp_invoke_import;
-     
-     
-     
-     
-     
-     
-     
-     
-     
-     
-     
-     
-     
-     
-     crypt_func_pgp_extract_keys_from_attachment_list_t
-    pgp_extract_keys_from_attachment_list;
-
-  /* S/MIME specific functions.  */
-
-  crypt_func_smime_getkeys_t smime_getkeys;
-  crypt_func_smime_verify_sender_t smime_verify_sender;
-  crypt_func_smime_build_smime_entity_t smime_build_smime_entity;
-  crypt_func_smime_invoke_import_t smime_invoke_import;
+    /* Common/General functions.  */
+    crypt_func_init_t init;
+    crypt_func_void_passphrase_t void_passphrase;
+    crypt_func_valid_passphrase_t valid_passphrase;
+    crypt_func_decrypt_mime_t decrypt_mime;
+    crypt_func_application_handler_t application_handler;
+    crypt_func_encrypted_handler_t encrypted_handler;
+    crypt_func_findkeys_t findkeys;
+    crypt_func_sign_message_t sign_message;
+    crypt_func_verify_one_t verify_one;
+    crypt_func_send_menu_t send_menu;
+
+    /* PGP specific functions.  */
+    crypt_func_pgp_encrypt_message_t pgp_encrypt_message;
+    crypt_func_pgp_make_key_attachment_t pgp_make_key_attachment;
+    crypt_func_pgp_check_traditional_t pgp_check_traditional;
+    crypt_func_pgp_traditional_encryptsign_t pgp_traditional_encryptsign;
+    crypt_func_pgp_invoke_getkeys_t pgp_invoke_getkeys;
+    crypt_func_pgp_invoke_import_t pgp_invoke_import;
+
+    crypt_func_pgp_extract_keys_from_attachment_list_t
+        pgp_extract_keys_from_attachment_list;
+
+    /* S/MIME specific functions.  */
+
+    crypt_func_smime_getkeys_t smime_getkeys;
+    crypt_func_smime_verify_sender_t smime_verify_sender;
+    crypt_func_smime_build_smime_entity_t smime_build_smime_entity;
+    crypt_func_smime_invoke_import_t smime_invoke_import;
 } crypt_module_functions_t;