| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | /* GIO - GLib Input, Output and Streaming Library
 | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |  * Copyright (C) 2006-2007 Red Hat, Inc. | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2022-05-18 09:12:45 +01:00
										 |  |  |  * SPDX-License-Identifier: LGPL-2.1-or-later | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |  * 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: Alexander Larsson <alexl@redhat.com> | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-22 15:10:51 +00:00
										 |  |  | #include "config.h"
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | #include "gasyncresult.h"
 | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  | #include "gsimpleasyncresult.h"
 | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | #include "glibintl.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-28 12:39:07 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  | /**
 | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * GAsyncResult: | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * `GAsyncResult` provides a base class for implementing asynchronous function results. | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * Asynchronous operations are broken up into two separate operations | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * which are chained together by a `GAsyncReadyCallback`. To begin | 
					
						
							|  |  |  |  * an asynchronous operation, provide a `GAsyncReadyCallback` to the | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * asynchronous function. This callback will be triggered when the | 
					
						
							| 
									
										
										
										
											2017-06-16 14:47:33 +02:00
										 |  |  |  * operation has completed, and must be run in a later iteration of | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * the thread-default main context (see | 
					
						
							|  |  |  |  * [method@GLib.MainContext.push_thread_default]) from where the operation was | 
					
						
							|  |  |  |  * initiated. It will be passed a `GAsyncResult` instance filled with the | 
					
						
							|  |  |  |  * details of the operation's success or failure, the object the asynchronous | 
					
						
							|  |  |  |  * function was started for and any error codes returned. The asynchronous | 
					
						
							|  |  |  |  * callback function is then expected to call the corresponding `_finish()` | 
					
						
							| 
									
										
										
										
											2017-06-16 14:47:33 +02:00
										 |  |  |  * function, passing the object the function was called for, the | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * `GAsyncResult` instance, and (optionally) an @error to grab any | 
					
						
							| 
									
										
										
										
											2017-06-16 14:47:33 +02:00
										 |  |  |  * error conditions that may have occurred. | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * The `_finish()` function for an operation takes the generic result | 
					
						
							|  |  |  |  * (of type `GAsyncResult`) and returns the specific result that the | 
					
						
							| 
									
										
										
										
											2023-10-23 11:17:24 +01:00
										 |  |  |  * operation in question yields (e.g. a [class@Gio.FileEnumerator] for a | 
					
						
							| 
									
										
										
										
											2010-01-02 19:44:26 -05:00
										 |  |  |  * "enumerate children" operation). If the result or error status of the | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * operation is not needed, there is no need to call the `_finish()` | 
					
						
							| 
									
										
										
										
											2010-01-02 19:44:26 -05:00
										 |  |  |  * function; GIO will take care of cleaning up the result and error | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * information after the `GAsyncReadyCallback` returns. You can pass | 
					
						
							|  |  |  |  * `NULL` for the `GAsyncReadyCallback` if you don't need to take any | 
					
						
							| 
									
										
										
										
											2011-06-29 08:29:16 -04:00
										 |  |  |  * action at all after the operation completes. Applications may also | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * take a reference to the `GAsyncResult` and call `_finish()` later; | 
					
						
							|  |  |  |  * however, the `_finish()` function may be called at most once. | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * Example of a typical asynchronous operation flow: | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * | 
					
						
							|  |  |  |  * ```c | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * void _theoretical_frobnitz_async (Theoretical         *t, | 
					
						
							|  |  |  |  *                                   GCancellable        *c, | 
					
						
							| 
									
										
										
										
											2013-06-25 22:11:54 +02:00
										 |  |  |  *                                   GAsyncReadyCallback  cb, | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  *                                   gpointer             u); | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  * gboolean _theoretical_frobnitz_finish (Theoretical   *t, | 
					
						
							|  |  |  |  *                                        GAsyncResult  *res, | 
					
						
							|  |  |  |  *                                        GError       **e); | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * static void | 
					
						
							|  |  |  |  * frobnitz_result_func (GObject      *source_object, | 
					
						
							|  |  |  |  *			 GAsyncResult *res, | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  *			 gpointer      user_data) | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * { | 
					
						
							|  |  |  |  *   gboolean success = FALSE; | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  *   success = _theoretical_frobnitz_finish (source_object, res, NULL); | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  *   if (success) | 
					
						
							| 
									
										
										
										
											2008-02-06 10:26:53 +00:00
										 |  |  |  *     g_printf ("Hurray!\n"); | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  *   else | 
					
						
							| 
									
										
										
										
											2008-02-06 10:26:53 +00:00
										 |  |  |  *     g_printf ("Uh oh!\n"); | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2014-02-01 11:57:13 -05:00
										 |  |  |  *   ... | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * } | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * int main (int argc, void *argv[]) | 
					
						
							|  |  |  |  * { | 
					
						
							| 
									
										
										
										
											2014-02-01 11:57:13 -05:00
										 |  |  |  *    ... | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  *    _theoretical_frobnitz_async (theoretical_data, | 
					
						
							|  |  |  |  *                                 NULL, | 
					
						
							|  |  |  |  *                                 frobnitz_result_func, | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  *                                 NULL); | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2014-02-01 11:57:13 -05:00
										 |  |  |  *    ... | 
					
						
							| 
									
										
										
										
											2007-11-29 20:35:23 +00:00
										 |  |  |  * } | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * ``` | 
					
						
							| 
									
										
										
										
											2007-12-12 12:19:02 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * The callback for an asynchronous operation is called only once, and is | 
					
						
							|  |  |  |  * always called, even in the case of a cancelled operation. On cancellation | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * the result is a `G_IO_ERROR_CANCELLED` error. | 
					
						
							| 
									
										
										
										
											2011-11-21 09:19:56 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * ## I/O Priority | 
					
						
							| 
									
										
										
										
											2014-02-06 16:48:49 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2014-02-01 15:25:43 -05:00
										 |  |  |  * Many I/O-related asynchronous operations have a priority parameter, | 
					
						
							|  |  |  |  * which is used in certain cases to determine the order in which | 
					
						
							|  |  |  |  * operations are executed. They are not used to determine system-wide | 
					
						
							|  |  |  |  * I/O scheduling. Priorities are integers, with lower numbers indicating | 
					
						
							|  |  |  |  * higher priority. It is recommended to choose priorities between | 
					
						
							| 
									
										
										
										
											2023-09-25 21:14:29 -04:00
										 |  |  |  * `G_PRIORITY_LOW` and `G_PRIORITY_HIGH`, with `G_PRIORITY_DEFAULT` | 
					
						
							| 
									
										
										
										
											2014-02-06 16:48:49 -05:00
										 |  |  |  * as a default. | 
					
						
							| 
									
										
										
										
											2014-02-01 15:25:43 -05:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2007-11-27 14:00:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-01 10:42:58 +01:00
										 |  |  | typedef GAsyncResultIface GAsyncResultInterface; | 
					
						
							|  |  |  | G_DEFINE_INTERFACE (GAsyncResult, g_async_result, G_TYPE_OBJECT) | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | static void | 
					
						
							| 
									
										
										
										
											2009-12-01 10:42:58 +01:00
										 |  |  | g_async_result_default_init (GAsyncResultInterface *iface) | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * g_async_result_get_user_data: | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * @res: a [iface@Gio.AsyncResult]. | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * Gets the user data from a [iface@Gio.AsyncResult]. | 
					
						
							| 
									
										
										
										
											2010-01-02 19:35:08 -05:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2010-09-24 18:24:41 -03:00
										 |  |  |  * Returns: (transfer full): the user data for @res. | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  |  **/ | 
					
						
							|  |  |  | gpointer | 
					
						
							|  |  |  | g_async_result_get_user_data (GAsyncResult *res) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   GAsyncResultIface *iface; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   g_return_val_if_fail (G_IS_ASYNC_RESULT (res), NULL); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   iface = G_ASYNC_RESULT_GET_IFACE (res); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return (* iface->get_user_data) (res); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * g_async_result_get_source_object: | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * @res: a [iface@Gio.AsyncResult] | 
					
						
							| 
									
										
										
										
											2009-09-29 20:33:39 -04:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * Gets the source object from a [iface@Gio.AsyncResult]. | 
					
						
							| 
									
										
										
										
											2009-09-29 20:33:39 -04:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2014-11-16 12:16:23 -08:00
										 |  |  |  * Returns: (transfer full) (nullable): a new reference to the source | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  *    object for the @res, or `NULL` if there is none. | 
					
						
							| 
									
										
										
										
											2009-09-29 20:33:39 -04:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2007-11-26 16:13:05 +00:00
										 |  |  | GObject * | 
					
						
							|  |  |  | g_async_result_get_source_object (GAsyncResult *res) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   GAsyncResultIface *iface; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   g_return_val_if_fail (G_IS_ASYNC_RESULT (res), NULL); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   iface = G_ASYNC_RESULT_GET_IFACE (res); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return (* iface->get_source_object) (res); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * g_async_result_legacy_propagate_error: | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * @res: a [iface@Gio.AsyncResult] | 
					
						
							| 
									
										
										
										
											2012-09-23 02:18:56 -04:00
										 |  |  |  * @error: (out): a location to propagate the error to. | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * If @res is a [class@Gio.SimpleAsyncResult], this is equivalent to | 
					
						
							|  |  |  |  * [method@Gio.SimpleAsyncResult.propagate_error]. Otherwise it returns | 
					
						
							|  |  |  |  * `FALSE`. | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * This can be used for legacy error handling in async `*_finish()` | 
					
						
							|  |  |  |  * wrapper functions that traditionally handled [class@Gio.SimpleAsyncResult] | 
					
						
							| 
									
										
										
										
											2014-02-06 08:04:52 -05:00
										 |  |  |  * error returns themselves rather than calling into the virtual method. | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * This should not be used in new code; [iface@Gio.AsyncResult] errors that are | 
					
						
							| 
									
										
										
										
											2014-02-06 08:04:52 -05:00
										 |  |  |  * set by virtual methods should also be extracted by virtual methods, | 
					
						
							|  |  |  |  * to enable subclasses to chain up correctly. | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * Returns: `TRUE` if @error is has been filled in with an error from | 
					
						
							|  |  |  |  *   @res, `FALSE` if not. | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Since: 2.34 | 
					
						
							|  |  |  |  **/ | 
					
						
							|  |  |  | gboolean | 
					
						
							|  |  |  | g_async_result_legacy_propagate_error (GAsyncResult  *res, | 
					
						
							|  |  |  | 				       GError       **error) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   /* This doesn't use a vmethod, because it's only for code that used
 | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |    * to use `GSimpleAsyncResult`. (But it's a `GAsyncResult` method so | 
					
						
							|  |  |  |    * that callers don't need to worry about `GSimpleAsyncResult` | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  |    * deprecation warnings in the future.) | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-17 10:38:37 -04:00
										 |  |  |   G_GNUC_BEGIN_IGNORE_DEPRECATIONS | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  |   if (G_IS_SIMPLE_ASYNC_RESULT (res)) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       return g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), | 
					
						
							|  |  |  | 						    error); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   else | 
					
						
							|  |  |  |     return FALSE; | 
					
						
							| 
									
										
										
										
											2012-04-17 10:38:37 -04:00
										 |  |  |   G_GNUC_END_IGNORE_DEPRECATIONS | 
					
						
							| 
									
										
										
										
											2012-05-10 09:00:45 -04:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2012-05-10 11:09:52 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * g_async_result_is_tagged: | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * @res: a [iface@Gio.AsyncResult] | 
					
						
							| 
									
										
										
										
											2012-05-10 11:09:52 -04:00
										 |  |  |  * @source_tag: an application-defined tag | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2012-09-23 02:18:56 -04:00
										 |  |  |  * Checks if @res has the given @source_tag (generally a function | 
					
						
							|  |  |  |  * pointer indicating the function @res was created by). | 
					
						
							| 
									
										
										
										
											2012-05-10 11:09:52 -04:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-06-29 00:11:30 +05:30
										 |  |  |  * Returns: `TRUE` if @res has the indicated @source_tag, `FALSE` if | 
					
						
							| 
									
										
										
										
											2012-05-10 11:09:52 -04:00
										 |  |  |  *   not. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Since: 2.34 | 
					
						
							|  |  |  |  **/ | 
					
						
							|  |  |  | gboolean | 
					
						
							|  |  |  | g_async_result_is_tagged (GAsyncResult  *res, | 
					
						
							|  |  |  | 			  gpointer       source_tag) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   GAsyncResultIface *iface; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   iface = G_ASYNC_RESULT_GET_IFACE (res); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   if (!iface->is_tagged) | 
					
						
							|  |  |  |     return FALSE; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return (* iface->is_tagged) (res, source_tag); | 
					
						
							|  |  |  | } |