diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 1999-11-17 22:39:25 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 1999-11-17 22:39:25 +0800 |
commit | ca7044930f42a698fd88f914c2512a20e2eeaae9 (patch) | |
tree | 522962a77005d741097713e87de1d50353b17768 /camel/camel-data-wrapper.c | |
parent | 16de3313b700cb56ab9e829d1e9b7e7d2c81241b (diff) | |
download | gsoc2013-evolution-ca7044930f42a698fd88f914c2512a20e2eeaae9.tar.gz gsoc2013-evolution-ca7044930f42a698fd88f914c2512a20e2eeaae9.tar.zst gsoc2013-evolution-ca7044930f42a698fd88f914c2512a20e2eeaae9.zip |
Added streaming capability to CamelDataWrapper. This makes it possible, for
example, to build multipart messages out of files that are on disk without
loading them in memory.
svn path=/trunk/; revision=1394
Diffstat (limited to 'camel/camel-data-wrapper.c')
-rw-r--r-- | camel/camel-data-wrapper.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c index 35d34051de..5c5ac86eef 100644 --- a/camel/camel-data-wrapper.c +++ b/camel/camel-data-wrapper.c @@ -41,6 +41,7 @@ static void _set_mime_type (CamelDataWrapper *data_wrapper, gchar *mime_type); static gchar *_get_mime_type (CamelDataWrapper *data_wrapper); static GMimeContentField *_get_mime_type_field (CamelDataWrapper *data_wrapper); static void _set_mime_type_field (CamelDataWrapper *data_wrapper, GMimeContentField *mime_type); +static CamelStream *_get_stream (CamelDataWrapper *data_wrapper); static void _finalize (GtkObject *object); static void @@ -57,6 +58,7 @@ camel_data_wrapper_class_init (CamelDataWrapperClass *camel_data_wrapper_class) camel_data_wrapper_class->get_mime_type = _get_mime_type; camel_data_wrapper_class->get_mime_type_field = _get_mime_type_field; camel_data_wrapper_class->set_mime_type_field = _set_mime_type_field; + camel_data_wrapper_class->get_stream = _get_stream; /* virtual method overload */ gtk_object_class->finalize = _finalize; @@ -236,4 +238,15 @@ camel_data_wrapper_set_mime_type_field (CamelDataWrapper *data_wrapper, GMimeCon CDW_CLASS(data_wrapper)->set_mime_type_field (data_wrapper, mime_type); } +static CamelStream * +_get_stream (CamelDataWrapper *data_wrapper) +{ + /* This needs to be implemented in subclasses. */ + return NULL; +} +CamelStream * +camel_data_wrapper_get_stream (CamelDataWrapper *data_wrapper) +{ + CDW_CLASS(data_wrapper)->get_stream (data_wrapper); +} |