diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-07 01:57:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:04 +0800 |
commit | 9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79 (patch) | |
tree | 8849353e617afe5207095fb6100a33e79989c9bc /em-format/e-mail-extension.h | |
parent | 3924dc759dbf38df0f9ff6941990dcf242478617 (diff) | |
download | gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.gz gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.bz2 gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.lz gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.xz gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.zst gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.zip |
EMailExtension: Replace mime_types() method with a string array.
In all implementations for EMailExtension, the MIME type list is a
static string array -- with the single exception of the text-highlight
module, where the MIME type list is dynamically assembled once.
Replace the mime_types() method with a "mime_types" string array in the
EMailExtensionInterface struct. Then the list of MIME types supported
by the class implementing the EMailExtensionInterface can be obtained
without requiring an instance of the class.
Diffstat (limited to 'em-format/e-mail-extension.h')
-rw-r--r-- | em-format/e-mail-extension.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/em-format/e-mail-extension.h b/em-format/e-mail-extension.h index 941638aed8..4050cce169 100644 --- a/em-format/e-mail-extension.h +++ b/em-format/e-mail-extension.h @@ -48,12 +48,13 @@ typedef struct _EMailExtensionInterface EMailExtensionInterface; struct _EMailExtensionInterface { GTypeInterface parent_interface; - const gchar ** (*mime_types) (EMailExtension *extension); + /* This is a NULL-terminated array of supported MIME types. + * The MIME types can be exact (e.g. "text/plain") or use a + * wildcard (e.g. "text/ *"). */ + const gchar **mime_types; }; -GType e_mail_extension_get_type (void); - -const gchar ** e_mail_extension_get_mime_types (EMailExtension *extension); +GType e_mail_extension_get_type (void) G_GNUC_CONST; G_END_DECLS |