diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 01:32:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:05 +0800 |
commit | cab6eac8f14974ea1c2fedaf9143e98cf630c489 (patch) | |
tree | 38cd8e6e510b6c461f7537c64aea88a11c385f4f /em-format/e-mail-parser-secure-button.c | |
parent | 3ae26f0ab68776e230a2be58939e5bf69c8fa2d5 (diff) | |
download | gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.gz gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.zst gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.zip |
Convert EMailParserExtension to an abstract class.
With the previous changes, all parser extensions derive from
GObjectClass and implement the EMailParserExtensionInterface.
Simplify things further by making EMailParserExtension an abstract base
class so parser extensions are now just direct subclasses and need not
bother with implementing GObject interfaces.
Diffstat (limited to 'em-format/e-mail-parser-secure-button.c')
-rw-r--r-- | em-format/e-mail-parser-secure-button.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/em-format/e-mail-parser-secure-button.c b/em-format/e-mail-parser-secure-button.c index ca38021388..c590fba426 100644 --- a/em-format/e-mail-parser-secure-button.c +++ b/em-format/e-mail-parser-secure-button.c @@ -29,24 +29,13 @@ #include <camel/camel.h> -typedef struct _EMailParserSecureButton { - GObject parent; -} EMailParserSecureButton; +typedef EMailParserExtension EMailParserSecureButton; +typedef EMailParserExtensionClass EMailParserSecureButtonClass; -typedef struct _EMailParserSecureButtonClass { - GObjectClass parent_class; -} EMailParserSecureButtonClass; - -static void e_mail_parser_parser_extension_interface_init (EMailParserExtensionInterface *iface); - -G_DEFINE_TYPE_EXTENDED ( +G_DEFINE_TYPE ( EMailParserSecureButton, e_mail_parser_secure_button, - G_TYPE_OBJECT, - 0, - G_IMPLEMENT_INTERFACE ( - E_TYPE_MAIL_PARSER_EXTENSION, - e_mail_parser_parser_extension_interface_init)) + E_TYPE_MAIL_PARSER_EXTENSION) static const gchar *parser_mime_types[] = { "application/vnd.evolution.widget.secure-button", @@ -76,19 +65,13 @@ empe_secure_button_parse (EMailParserExtension *extension, } static void -e_mail_parser_secure_button_class_init (EMailParserSecureButtonClass *class) +e_mail_parser_secure_button_class_init (EMailParserExtensionClass *class) { + class->mime_types = parser_mime_types; + class->parse = empe_secure_button_parse; } static void -e_mail_parser_parser_extension_interface_init (EMailParserExtensionInterface *iface) +e_mail_parser_secure_button_init (EMailParserExtension *extension) { - iface->mime_types = parser_mime_types; - iface->parse = empe_secure_button_parse; -} - -static void -e_mail_parser_secure_button_init (EMailParserSecureButton *parser) -{ - } |