1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Authors: Jeffrey Stedfast <fejj@ximian.com>
5 * Copyright 2002 Ximian, Inc. (www.ximian.com)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
24 #ifndef __CAMEL_MULTIPART_ENCRYPTED_H__
25 #define __CAMEL_MULTIPART_ENCRYPTED_H__
30 #endif /* __cplusplus */
32 #include <camel/camel-multipart.h>
33 #include <camel/camel-cipher-context.h>
35 #define CAMEL_MULTIPART_ENCRYPTED_TYPE (camel_multipart_encrypted_get_type ())
36 #define CAMEL_MULTIPART_ENCRYPTED(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncrypted))
37 #define CAMEL_MULTIPART_ENCRYPTED_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_ENCRYPTED_TYPE, CamelMultipartEncryptedClass))
38 #define CAMEL_IS_MULTIPART_ENCRYPTED(o) (CAMEL_CHECK_TYPE((o), CAMEL_MULTIPART_ENCRYPTED_TYPE))
40 typedef struct _CamelMultipartEncrypted CamelMultipartEncrypted;
41 typedef struct _CamelMultipartEncryptedClass CamelMultipartEncryptedClass;
43 /* 'handy' enums for getting the internal parts of the multipart */
45 CAMEL_MULTIPART_ENCRYPTED_VERSION,
46 CAMEL_MULTIPART_ENCRYPTED_CONTENT,
49 struct _CamelMultipartEncrypted {
50 CamelMultipart parent_object;
52 CamelMimePart *version;
53 CamelMimePart *content;
54 CamelMimePart *decrypted;
60 struct _CamelMultipartEncryptedClass {
61 CamelMultipartClass parent_class;
66 CamelType camel_multipart_encrypted_get_type (void);
69 CamelMultipartEncrypted *camel_multipart_encrypted_new (void);
71 int camel_multipart_encrypted_encrypt (CamelMultipartEncrypted *mpe, CamelMimePart *content,
72 CamelCipherContext *cipher, const char *userid,
73 GPtrArray *recipients, CamelException *ex);
75 CamelMimePart *camel_multipart_encrypted_decrypt (CamelMultipartEncrypted *mpe,
76 CamelCipherContext *cipher,
81 #endif /* __cplusplus */
83 #endif /* __CAMEL_MULTIPART_ENCRYPTED_H__ */