diff options
author | Not Zed <NotZed@Ximian.com> | 2004-01-30 11:10:14 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-01-30 11:10:14 +0800 |
commit | dab1c82a2155a56ae2444108b4182bb7c19d4889 (patch) | |
tree | 5cb774b3d6440f04e94727a5ca00043a3b2e2c77 /mail/em-format.h | |
parent | 78e3e48c9bd23c0cddae422cbb6012edab243665 (diff) | |
download | gsoc2013-evolution-dab1c82a2155a56ae2444108b4182bb7c19d4889.tar.gz gsoc2013-evolution-dab1c82a2155a56ae2444108b4182bb7c19d4889.tar.zst gsoc2013-evolution-dab1c82a2155a56ae2444108b4182bb7c19d4889.zip |
** See bug #53558 (plus other fixes/cleanups)
2004-01-30 Not Zed <NotZed@Ximian.com>
** See bug #53558 (plus other fixes/cleanups)
* em-format.c (emf_format_secure): default implementation, handle
output of inner part, but dont output any sign/encrypt info.
(emf_multipart_signed, emf_multipart_encrypted): replaced with
implementations from em-format-html.c, which now call
em_format_format_secure to output guts.
(emf_class_init): hook-up virtual method format_secure.
* em-format.[ch]: add a virtual method for outputing secured
parts. Moved all validity stuff from em-format-html.[ch] to here.
* mail-component.c (impl_createControls): set the session
interactive too.
* em-format-html-display.c: make smime stuff dependent on
HAVE_NSS.
(efhd_multipart_signed, efhd_application_xpkcs7mime): removed, now
handled by root class.
(efhd_output_secure): renamed to efhd_format_secure, and use
EMFormat::format_secure to kick off.
(efhd_class_init): setup format_secure virtual method.
* em-format-html.c (efh_multipart_encrypted): We need to handle
this here so we can properly keep track of the ciphervalidity
stuff. Also do it directly using the context, not
multipartencrypted part.
(efh_multipart_signed): with unsupported signature format, format
as multipart/mixed, not as an attachment.
(efh_multipart_signed): make the smime stuff optional.
(efh_multipart_signed, efh_multipart_encrypted): Moved to
em-format.c.
(efh_application_xpkcs7mime): moved to em-format.c
(efh_output_secure): renamed to efh_format_secure, linked into
virtual method. call parent class to do the validation foo then
output the info if needed.
(efh_format_message): fixed access to validity stuff to parent
object.
(efh_class_init): hook up format_secure virtual method.
(*): removed some now-unused headers.
svn path=/trunk/; revision=24531
Diffstat (limited to 'mail/em-format.h')
-rw-r--r-- | mail/em-format.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mail/em-format.h b/mail/em-format.h index a5fd08f55c..323c28865a 100644 --- a/mail/em-format.h +++ b/mail/em-format.h @@ -37,6 +37,7 @@ struct _CamelSession; struct _CamelURL; struct _CamelDataWrapper; struct _CamelMimeMessage; +struct _CamelCipherValidity; typedef struct _EMFormat EMFormat; typedef struct _EMFormatClass EMFormatClass; @@ -114,6 +115,10 @@ struct _EMFormat { const char *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */ + /* for validity enveloping */ + struct _CamelCipherValidity *valid; + struct _CamelCipherValidity *valid_parent; + /* for forcing inlining */ GHashTable *inline_table; @@ -153,6 +158,8 @@ struct _EMFormatClass { void (*format_message)(EMFormat *, struct _CamelStream *, struct _CamelMedium *); /* use for unparsable content */ void (*format_source)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *); + /* for outputing secure(d) content */ + void (*format_secure)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *, struct _CamelCipherValidity *); /* returns true if the formatter is still busy with pending stuff */ gboolean (*busy)(EMFormat *); @@ -212,6 +219,7 @@ void em_format_pull_level(EMFormat *emf); #define em_format_format_attachment(emf, stream, msg, type, info) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment((emf), (stream), (msg), (type), (info)) #define em_format_format_message(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_message((emf), (stream), (msg)) #define em_format_format_source(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_source((emf), (stream), (msg)) +#define em_format_format_secure(emf, stream, msg, valid) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_secure((emf), (stream), (msg), (valid)) #define em_format_busy(emf) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->busy((emf)) |