| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | /* GIO - GLib Input, Output and Streaming Library
 | 
					
						
							|  |  |  |  *  | 
					
						
							|  |  |  |  * Copyright (C) 2006-2007 Red Hat, Inc. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This library is free software; you can redistribute it and/or | 
					
						
							|  |  |  |  * modify it under the terms of the GNU Lesser General Public | 
					
						
							|  |  |  |  * License as published by the Free Software Foundation; either | 
					
						
							| 
									
										
										
										
											2017-05-27 18:21:30 +02:00
										 |  |  |  * version 2.1 of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * This library is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
					
						
							|  |  |  |  * Lesser General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU Lesser General | 
					
						
							| 
									
										
										
										
											2014-01-23 12:58:29 +01:00
										 |  |  |  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Author: Christian Kellner <gicmo@gnome.org>  | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-22 15:10:51 +00:00
										 |  |  | #include "config.h"
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | #include "gfilteroutputstream.h"
 | 
					
						
							|  |  |  | #include "goutputstream.h"
 | 
					
						
							|  |  |  | #include "glibintl.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-28 12:39:07 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * SECTION:gfilteroutputstream | 
					
						
							|  |  |  |  * @short_description: Filter Output Stream | 
					
						
							| 
									
										
										
										
											2008-02-21 18:20:17 +00:00
										 |  |  |  * @include: gio/gio.h | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2010-08-13 16:04:04 -04:00
										 |  |  |  * Base class for output stream implementations that perform some | 
					
						
							|  |  |  |  * kind of filtering operation on a base stream. Typical examples | 
					
						
							|  |  |  |  * of filtering operations are character set conversion, compression | 
					
						
							|  |  |  |  * and byte order flipping. | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | enum { | 
					
						
							|  |  |  |   PROP_0, | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |   PROP_BASE_STREAM, | 
					
						
							|  |  |  |   PROP_CLOSE_BASE | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void     g_filter_output_stream_set_property (GObject      *object, | 
					
						
							|  |  |  |                                                      guint         prop_id, | 
					
						
							|  |  |  |                                                      const GValue *value, | 
					
						
							|  |  |  |                                                      GParamSpec   *pspec); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void     g_filter_output_stream_get_property (GObject    *object, | 
					
						
							|  |  |  |                                                      guint       prop_id, | 
					
						
							|  |  |  |                                                      GValue     *value, | 
					
						
							|  |  |  |                                                      GParamSpec *pspec); | 
					
						
							|  |  |  | static void     g_filter_output_stream_dispose      (GObject *object); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static gssize   g_filter_output_stream_write        (GOutputStream *stream, | 
					
						
							|  |  |  |                                                      const void    *buffer, | 
					
						
							|  |  |  |                                                      gsize          count, | 
					
						
							|  |  |  |                                                      GCancellable  *cancellable, | 
					
						
							|  |  |  |                                                      GError       **error); | 
					
						
							|  |  |  | static gboolean g_filter_output_stream_flush        (GOutputStream    *stream, | 
					
						
							|  |  |  |                                                      GCancellable  *cancellable, | 
					
						
							|  |  |  |                                                      GError          **error); | 
					
						
							|  |  |  | static gboolean g_filter_output_stream_close        (GOutputStream  *stream, | 
					
						
							|  |  |  |                                                      GCancellable   *cancellable, | 
					
						
							|  |  |  |                                                      GError        **error); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  | typedef struct | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   gboolean close_base; | 
					
						
							|  |  |  | } GFilterOutputStreamPrivate; | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-11 00:29:58 +01:00
										 |  |  | G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GFilterOutputStream, g_filter_output_stream, G_TYPE_OUTPUT_STREAM) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | static void | 
					
						
							|  |  |  | g_filter_output_stream_class_init (GFilterOutputStreamClass *klass) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   GObjectClass *object_class; | 
					
						
							|  |  |  |   GOutputStreamClass *ostream_class; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   object_class = G_OBJECT_CLASS (klass); | 
					
						
							|  |  |  |   object_class->get_property = g_filter_output_stream_get_property; | 
					
						
							|  |  |  |   object_class->set_property = g_filter_output_stream_set_property; | 
					
						
							|  |  |  |   object_class->dispose      = g_filter_output_stream_dispose; | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |   ostream_class = G_OUTPUT_STREAM_CLASS (klass); | 
					
						
							| 
									
										
										
										
											2007-12-05 10:38:03 +00:00
										 |  |  |   ostream_class->write_fn = g_filter_output_stream_write; | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |   ostream_class->flush = g_filter_output_stream_flush; | 
					
						
							| 
									
										
										
										
											2007-12-05 10:38:03 +00:00
										 |  |  |   ostream_class->close_fn = g_filter_output_stream_close; | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   g_object_class_install_property (object_class, | 
					
						
							|  |  |  |                                    PROP_BASE_STREAM, | 
					
						
							|  |  |  |                                    g_param_spec_object ("base-stream", | 
					
						
							|  |  |  |                                                          P_("The Filter Base Stream"), | 
					
						
							| 
									
										
										
										
											2009-02-06 14:08:19 +00:00
										 |  |  |                                                          P_("The underlying base stream on which the io ops will be done."), | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |                                                          G_TYPE_OUTPUT_STREAM, | 
					
						
							|  |  |  |                                                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |  | 
					
						
							|  |  |  |                                                          G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB)); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |   g_object_class_install_property (object_class, | 
					
						
							|  |  |  |                                    PROP_CLOSE_BASE, | 
					
						
							|  |  |  |                                    g_param_spec_boolean ("close-base-stream", | 
					
						
							|  |  |  |                                                          P_("Close Base Stream"), | 
					
						
							| 
									
										
										
										
											2009-02-06 14:08:19 +00:00
										 |  |  |                                                          P_("If the base stream should be closed when the filter stream is closed."), | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |                                                          TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | | 
					
						
							|  |  |  |                                                          G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB)); | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void | 
					
						
							| 
									
										
										
										
											2007-11-29 07:17:59 +00:00
										 |  |  | g_filter_output_stream_set_property (GObject      *object, | 
					
						
							|  |  |  |                                      guint         prop_id, | 
					
						
							|  |  |  |                                      const GValue *value, | 
					
						
							|  |  |  |                                      GParamSpec   *pspec) | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | { | 
					
						
							|  |  |  |   GFilterOutputStream *filter_stream; | 
					
						
							|  |  |  |   GObject *obj; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   filter_stream = G_FILTER_OUTPUT_STREAM (object); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   switch (prop_id)  | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |     case PROP_BASE_STREAM: | 
					
						
							|  |  |  |       obj = g_value_dup_object (value); | 
					
						
							|  |  |  |       filter_stream->base_stream = G_OUTPUT_STREAM (obj); | 
					
						
							|  |  |  |       break; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |     case PROP_CLOSE_BASE: | 
					
						
							|  |  |  |       g_filter_output_stream_set_close_base_stream (filter_stream, | 
					
						
							|  |  |  |                                                     g_value_get_boolean (value)); | 
					
						
							|  |  |  |       break; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |     default: | 
					
						
							|  |  |  |       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | 
					
						
							|  |  |  |       break; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void | 
					
						
							|  |  |  | g_filter_output_stream_get_property (GObject    *object, | 
					
						
							|  |  |  |                                      guint       prop_id, | 
					
						
							|  |  |  |                                      GValue     *value, | 
					
						
							|  |  |  |                                      GParamSpec *pspec) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   GFilterOutputStream *filter_stream; | 
					
						
							| 
									
										
										
										
											2013-06-11 00:29:58 +01:00
										 |  |  |   GFilterOutputStreamPrivate *priv; | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   filter_stream = G_FILTER_OUTPUT_STREAM (object); | 
					
						
							| 
									
										
										
										
											2013-06-24 15:43:04 +01:00
										 |  |  |   priv = g_filter_output_stream_get_instance_private (filter_stream); | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   switch (prop_id) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |     case PROP_BASE_STREAM: | 
					
						
							|  |  |  |       g_value_set_object (value, filter_stream->base_stream); | 
					
						
							|  |  |  |       break; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |     case PROP_CLOSE_BASE: | 
					
						
							| 
									
										
										
										
											2013-06-11 00:29:58 +01:00
										 |  |  |       g_value_set_boolean (value, priv->close_base); | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |       break; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |     default: | 
					
						
							|  |  |  |       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | 
					
						
							|  |  |  |       break; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void | 
					
						
							|  |  |  | g_filter_output_stream_dispose (GObject *object) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2007-11-29 07:17:59 +00:00
										 |  |  |   GFilterOutputStream *stream; | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   stream = G_FILTER_OUTPUT_STREAM (object); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   G_OBJECT_CLASS (g_filter_output_stream_parent_class)->dispose (object); | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |   if (stream->base_stream) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       g_object_unref (stream->base_stream); | 
					
						
							|  |  |  |       stream->base_stream = NULL; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void | 
					
						
							|  |  |  | g_filter_output_stream_init (GFilterOutputStream *stream) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-28 06:01:13 +00:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * g_filter_output_stream_get_base_stream: | 
					
						
							|  |  |  |  * @stream: a #GFilterOutputStream. | 
					
						
							|  |  |  |  *  | 
					
						
							|  |  |  |  * Gets the base stream for the filter stream. | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2010-06-10 14:02:15 -04:00
										 |  |  |  * Returns: (transfer none): a #GOutputStream. | 
					
						
							| 
									
										
										
										
											2007-11-28 06:01:13 +00:00
										 |  |  |  **/ | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | GOutputStream * | 
					
						
							|  |  |  | g_filter_output_stream_get_base_stream (GFilterOutputStream *stream) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   g_return_val_if_fail (G_IS_FILTER_OUTPUT_STREAM (stream), NULL); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return stream->base_stream; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * g_filter_output_stream_get_close_base_stream: | 
					
						
							|  |  |  |  * @stream: a #GFilterOutputStream. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Returns whether the base stream will be closed when @stream is | 
					
						
							|  |  |  |  * closed. | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2014-02-19 19:35:23 -05:00
										 |  |  |  * Returns: %TRUE if the base stream will be closed. | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |  **/ | 
					
						
							|  |  |  | gboolean | 
					
						
							|  |  |  | g_filter_output_stream_get_close_base_stream (GFilterOutputStream *stream) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2013-06-11 00:29:58 +01:00
										 |  |  |   GFilterOutputStreamPrivate *priv; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |   g_return_val_if_fail (G_IS_FILTER_OUTPUT_STREAM (stream), FALSE); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-24 15:43:04 +01:00
										 |  |  |   priv = g_filter_output_stream_get_instance_private (stream); | 
					
						
							| 
									
										
										
										
											2013-06-11 00:29:58 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   return priv->close_base; | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * g_filter_output_stream_set_close_base_stream: | 
					
						
							|  |  |  |  * @stream: a #GFilterOutputStream. | 
					
						
							|  |  |  |  * @close_base: %TRUE to close the base stream. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Sets whether the base stream will be closed when @stream is closed. | 
					
						
							|  |  |  |  **/ | 
					
						
							|  |  |  | void | 
					
						
							|  |  |  | g_filter_output_stream_set_close_base_stream (GFilterOutputStream *stream, | 
					
						
							|  |  |  |                                               gboolean             close_base) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   GFilterOutputStreamPrivate *priv; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   g_return_if_fail (G_IS_FILTER_OUTPUT_STREAM (stream)); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   close_base = !!close_base; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-24 15:43:04 +01:00
										 |  |  |   priv = g_filter_output_stream_get_instance_private (stream); | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   if (priv->close_base != close_base) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       priv->close_base = close_base; | 
					
						
							|  |  |  |       g_object_notify (G_OBJECT (stream), "close-base-stream"); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | static gssize | 
					
						
							| 
									
										
										
										
											2007-11-29 07:17:59 +00:00
										 |  |  | g_filter_output_stream_write (GOutputStream  *stream, | 
					
						
							|  |  |  |                               const void     *buffer, | 
					
						
							|  |  |  |                               gsize           count, | 
					
						
							|  |  |  |                               GCancellable   *cancellable, | 
					
						
							|  |  |  |                               GError        **error) | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | { | 
					
						
							|  |  |  |   GFilterOutputStream *filter_stream; | 
					
						
							|  |  |  |   gssize nwritten; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   filter_stream = G_FILTER_OUTPUT_STREAM (stream); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   nwritten = g_output_stream_write (filter_stream->base_stream, | 
					
						
							|  |  |  |                                     buffer, | 
					
						
							|  |  |  |                                     count, | 
					
						
							|  |  |  |                                     cancellable, | 
					
						
							|  |  |  |                                     error); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return nwritten; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static gboolean | 
					
						
							| 
									
										
										
										
											2007-11-29 07:17:59 +00:00
										 |  |  | g_filter_output_stream_flush (GOutputStream  *stream, | 
					
						
							|  |  |  |                               GCancellable   *cancellable, | 
					
						
							|  |  |  |                               GError        **error) | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | { | 
					
						
							|  |  |  |   GFilterOutputStream *filter_stream; | 
					
						
							|  |  |  |   gboolean res; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   filter_stream = G_FILTER_OUTPUT_STREAM (stream); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   res = g_output_stream_flush (filter_stream->base_stream, | 
					
						
							|  |  |  |                                cancellable, | 
					
						
							|  |  |  |                                error); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static gboolean | 
					
						
							|  |  |  | g_filter_output_stream_close (GOutputStream  *stream, | 
					
						
							|  |  |  |                               GCancellable   *cancellable, | 
					
						
							|  |  |  |                               GError        **error) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2013-06-11 00:29:58 +01:00
										 |  |  |   GFilterOutputStream *filter_stream = G_FILTER_OUTPUT_STREAM (stream); | 
					
						
							| 
									
										
										
										
											2013-06-24 15:43:04 +01:00
										 |  |  |   GFilterOutputStreamPrivate *priv = g_filter_output_stream_get_instance_private (filter_stream); | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |   gboolean res = TRUE; | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-11 00:29:58 +01:00
										 |  |  |   if (priv->close_base) | 
					
						
							| 
									
										
										
										
											2009-01-21 14:09:56 +00:00
										 |  |  |     { | 
					
						
							|  |  |  |       res = g_output_stream_close (filter_stream->base_stream, | 
					
						
							|  |  |  |                                    cancellable, | 
					
						
							|  |  |  |                                    error); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   return res; | 
					
						
							|  |  |  | } |