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 /modules/vcard-inline | |
parent | 3ae26f0ab68776e230a2be58939e5bf69c8fa2d5 (diff) | |
download | gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.gz gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.bz2 gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.lz gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.xz 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 'modules/vcard-inline')
-rw-r--r-- | modules/vcard-inline/e-mail-parser-vcard-inline.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/modules/vcard-inline/e-mail-parser-vcard-inline.c b/modules/vcard-inline/e-mail-parser-vcard-inline.c index c3998c79f8..1328e5031a 100644 --- a/modules/vcard-inline/e-mail-parser-vcard-inline.c +++ b/modules/vcard-inline/e-mail-parser-vcard-inline.c @@ -48,24 +48,19 @@ #define d(x) -typedef GObject EMailParserVCardInline; -typedef GObjectClass EMailParserVCardInlineClass; +typedef EMailParserExtension EMailParserVCardInline; +typedef EMailParserExtensionClass EMailParserVCardInlineClass; typedef EExtension EMailParserVCardInlineLoader; typedef EExtensionClass EMailParserVCardInlineLoaderClass; GType e_mail_parser_vcard_inline_get_type (void); GType e_mail_parser_vcard_inline_loader_get_type (void); -static void e_mail_parser_parser_extension_interface_init (EMailParserExtensionInterface *iface); -G_DEFINE_DYNAMIC_TYPE_EXTENDED ( +G_DEFINE_DYNAMIC_TYPE ( EMailParserVCardInline, e_mail_parser_vcard_inline, - G_TYPE_OBJECT, - 0, - G_IMPLEMENT_INTERFACE_DYNAMIC ( - E_TYPE_MAIL_PARSER_EXTENSION, - e_mail_parser_parser_extension_interface_init)); + E_TYPE_MAIL_PARSER_EXTENSION) G_DEFINE_DYNAMIC_TYPE ( EMailParserVCardInlineLoader, @@ -381,26 +376,20 @@ empe_vcard_inline_get_flags (EMailParserExtension *extension) } static void -e_mail_parser_parser_extension_interface_init (EMailParserExtensionInterface *iface) -{ - iface->mime_types = parser_mime_types; - iface->parse = empe_vcard_inline_parse; - iface->get_flags = empe_vcard_inline_get_flags; -} - -static void -e_mail_parser_vcard_inline_class_init (EMailParserVCardInlineClass *class) +e_mail_parser_vcard_inline_class_init (EMailParserExtensionClass *class) { + class->mime_types = parser_mime_types; + class->parse = empe_vcard_inline_parse; + class->get_flags = empe_vcard_inline_get_flags; } static void -e_mail_parser_vcard_inline_class_finalize (EMailParserVCardInlineClass *class) +e_mail_parser_vcard_inline_class_finalize (EMailParserExtensionClass *class) { - } static void -e_mail_parser_vcard_inline_init (EMailParserVCardInline *self) +e_mail_parser_vcard_inline_init (EMailParserExtension *extension) { } |