224367a9dab28cbc677be04efb3f94df6f615877
[apps/madmutt.git] / crypt-gpgme.h
1 /* 
2  * Copyright (C) 2004 g10 Code GmbH
3  *
4  *     This program is free software; you can redistribute it and/or modify
5  *     it under the terms of the GNU General Public License as published by
6  *     the Free Software Foundation; either version 2 of the License, or
7  *     (at your option) any later version.
8  * 
9  *     This program is distributed in the hope that it will be useful,
10  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *     GNU General Public License for more details.
13  * 
14  *     You should have received a copy of the GNU General Public License
15  *     along with this program; if not, write to the Free Software
16  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
17  */
18
19 #ifndef CRYPT_GPGME_H
20 #define CRYPT_GPGME_H
21
22 #include "mutt_crypt.h"
23
24 void pgp_gpgme_init (void);
25 void smime_gpgme_init (void);
26
27 char *pgp_gpgme_findkeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc);
28 char *smime_gpgme_findkeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc);
29
30 BODY *pgp_gpgme_encrypt_message (BODY * a, char *keylist, int sign);
31 BODY *smime_gpgme_build_smime_entity (BODY * a, char *keylist);
32
33 int pgp_gpgme_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b,
34                             BODY ** cur);
35 int smime_gpgme_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b,
36                               BODY ** cur);
37
38 int pgp_gpgme_check_traditional (FILE * fp, BODY * b, int tagged_only);
39
40 void pgp_gpgme_application_handler (BODY * m, STATE * s);
41 void smime_gpgme_application_handler (BODY * a, STATE * s);
42 void pgp_gpgme_encrypted_handler (BODY * a, STATE * s);
43
44 BODY *pgp_gpgme_make_key_attachment (char *tempf);
45
46 BODY *pgp_gpgme_sign_message (BODY * a);
47 BODY *smime_gpgme_sign_message (BODY * a);
48
49 int pgp_gpgme_verify_one (BODY * sigbdy, STATE * s, const char *tempfile);
50 int smime_gpgme_verify_one (BODY * sigbdy, STATE * s, const char *tempfile);
51
52 int pgp_gpgme_send_menu (HEADER * msg, int *redraw);
53 int smime_gpgme_send_menu (HEADER * msg, int *redraw);
54
55 #endif