[gvfs/wip/oholy/gtask: 7/10] gvfsdaemondbus: Port to GTask



commit da1b43a81e61ce2f1ed939194d3081dfbc98235f
Author: Ondrej Holy <oholy redhat com>
Date:   Tue Jun 14 17:09:44 2016 +0200

    gvfsdaemondbus: Port to GTask
    
    GSimpleAsyncResult is deprecated in favour of GTask and should be replaced.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747412

 client/gvfsdaemondbus.c |   32 --------------------------------
 client/gvfsdaemondbus.h |    6 ------
 2 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c
index 0bf47b1..e12d293 100644
--- a/client/gvfsdaemondbus.c
+++ b/client/gvfsdaemondbus.c
@@ -609,30 +609,6 @@ _g_dbus_connection_get_sync (const char *dbus_id,
   return connection;
 }
 
-/**
- * _g_simple_async_result_complete_with_cancellable:
- * @result: the result
- * @cancellable: a cancellable to check
- *
- * If @cancellable is cancelled, sets @result into the cancelled error
- * state. Then calls g_simple_async_result_complete().
- * This function is useful to ensure that @result is properly set into
- * an error state on cancellation.
- **/
-void
-_g_simple_async_result_complete_with_cancellable (GSimpleAsyncResult *result,
-                                                  GCancellable       *cancellable)
-{
-  if (cancellable &&
-      g_cancellable_is_cancelled (cancellable))
-    g_simple_async_result_set_error (result,
-                                     G_IO_ERROR,
-                                     G_IO_ERROR_CANCELLED,
-                                     "%s", _("Operation was cancelled"));
-
-  g_simple_async_result_complete (result);
-}
-
 void
 _g_propagate_error_stripped (GError **dest, GError *src)
 {
@@ -640,11 +616,3 @@ _g_propagate_error_stripped (GError **dest, GError *src)
   if (dest && *dest)
     g_dbus_error_strip_remote_error (*dest);
 }
-
-void
-_g_simple_async_result_take_error_stripped (GSimpleAsyncResult *simple,
-                                            GError *error)
-{
-  g_dbus_error_strip_remote_error (error);
-  g_simple_async_result_take_error (simple, error);
-}
diff --git a/client/gvfsdaemondbus.h b/client/gvfsdaemondbus.h
index bd02d41..70237dc 100644
--- a/client/gvfsdaemondbus.h
+++ b/client/gvfsdaemondbus.h
@@ -55,12 +55,6 @@ void            _g_dbus_connection_get_for_async        (const char
                                                          GVfsAsyncDBusCallback           callback,
                                                          gpointer                        callback_data,
                                                          GCancellable                   *cancellable);
-void        _g_simple_async_result_complete_with_cancellable
-                                                        (GSimpleAsyncResult             *result,
-                                                         GCancellable                   *cancellable);
-void            _g_simple_async_result_take_error_stripped
-                                                        (GSimpleAsyncResult             *simple,
-                                                         GError                         *error);
 
 gulong          _g_dbus_async_subscribe_cancellable     (GDBusConnection                *connection,
                                                          GCancellable                   *cancellable);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]