diff options
author | Dan Winship <danw@src.gnome.org> | 2001-09-19 04:03:10 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-09-19 04:03:10 +0800 |
commit | b4c31f5153efd4a7aa58bd1ebd3319297e528f42 (patch) | |
tree | b1a3f33fab0a8ed4a278107b5267239ff6533298 /camel/camel-medium.c | |
parent | bb51b55bcc64b0342db45e389342b129a20b8a2a (diff) | |
download | gsoc2013-evolution-b4c31f5153efd4a7aa58bd1ebd3319297e528f42.tar.gz gsoc2013-evolution-b4c31f5153efd4a7aa58bd1ebd3319297e528f42.tar.zst gsoc2013-evolution-b4c31f5153efd4a7aa58bd1ebd3319297e528f42.zip |
Virtualize this.
* camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
this.
* camel-medium.c (is_offline): A medium is offline if its content
object is offline.
* camel-multipart.c (is_offline): A multipart is offline if any of
its subparts are offline.
svn path=/trunk/; revision=12948
Diffstat (limited to 'camel/camel-medium.c')
-rw-r--r-- | camel/camel-medium.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/camel/camel-medium.c b/camel/camel-medium.c index 818df69493..95480754a0 100644 --- a/camel/camel-medium.c +++ b/camel/camel-medium.c @@ -40,6 +40,7 @@ static CamelDataWrapperClass *parent_class = NULL; /* Returns the class for a CamelMedium */ #define CM_CLASS(so) CAMEL_MEDIUM_CLASS (CAMEL_OBJECT_GET_CLASS(so)) +static gboolean is_offline (CamelDataWrapper *data_wrapper); static void add_header (CamelMedium *medium, const gchar *header_name, const void *header_value); static void set_header (CamelMedium *medium, const gchar *header_name, const void *header_value); @@ -56,13 +57,14 @@ static void set_content_object (CamelMedium *medium, static void camel_medium_class_init (CamelMediumClass *camel_medium_class) { - /* - * CamelDataWrapperClass *camel_data_wrapper_class = - * CAMEL_DATA_WRAPPER_CLASS (camel_medium_class); - */ + CamelDataWrapperClass *camel_data_wrapper_class = + CAMEL_DATA_WRAPPER_CLASS (camel_medium_class); parent_class = CAMEL_DATA_WRAPPER_CLASS (camel_type_get_global_classfuncs (camel_data_wrapper_get_type ())); + /* virtual method overload */ + camel_data_wrapper_class->is_offline = is_offline; + /* virtual method definition */ camel_medium_class->add_header = add_header; camel_medium_class->set_header = set_header; @@ -112,6 +114,13 @@ camel_medium_get_type (void) return camel_medium_type; } +static gboolean +is_offline (CamelDataWrapper *data_wrapper) +{ + return parent_class->is_offline (data_wrapper) || + camel_data_wrapper_is_offline (CAMEL_MEDIUM (data_wrapper)->content); +} + static void add_header (CamelMedium *medium, const gchar *header_name, const void *header_value) |