[libgsystem] GSSubprocess: Add missing cancellable argument



commit 0734be8c1211ba04ecdd14ff30b6c07dbf3b9a84
Author: Colin Walters <walters verbum org>
Date:   Thu Dec 20 20:48:35 2012 -0500

    GSSubprocess: Add missing cancellable argument
    
    It's a GInitable.

 gsystem-subprocess.c |   25 ++++++++++++++-----------
 gsystem-subprocess.h |   21 ++++++++++++---------
 2 files changed, 26 insertions(+), 20 deletions(-)
---
diff --git a/gsystem-subprocess.c b/gsystem-subprocess.c
index 694761c..b1980c0 100644
--- a/gsystem-subprocess.c
+++ b/gsystem-subprocess.c
@@ -462,10 +462,11 @@ initable_iface_init (GInitableIface *initable_iface)
  */
 GSSubprocess *
 gs_subprocess_new (GSSubprocessContext   *context,
-		  GError              **error)
+                   GCancellable          *cancellable,
+                   GError               **error)
 {
   return g_initable_new (GS_TYPE_SUBPROCESS,
-                         NULL, error,
+                         cancellable, error,
                          "context", context,
                          NULL);
 }
@@ -842,9 +843,10 @@ gs_subprocess_force_exit (GSSubprocess *self)
 
 GSSubprocess *
 gs_subprocess_new_simple_argl (GSSubprocessStreamDisposition stdout_disposition,
-			      GSSubprocessStreamDisposition stderr_disposition,
-			      GError                     **error,
-			      const gchar                 *first_arg,
+			      GSSubprocessStreamDisposition  stderr_disposition,
+                               GCancellable                 *cancellable,
+			      GError                       **error,
+			      const gchar                   *first_arg,
 			      ...)
 {
   va_list args;
@@ -854,7 +856,7 @@ gs_subprocess_new_simple_argl (GSSubprocessStreamDisposition stdout_disposition,
   va_start (args, first_arg);
   context = gs_subprocess_context_newa (first_arg, args);
   va_end (args);
-  result = gs_subprocess_new (context, error);
+  result = gs_subprocess_new (context, cancellable, error);
   g_object_unref (context);
   
   return result;
@@ -871,10 +873,11 @@ gs_subprocess_new_simple_argl (GSSubprocessStreamDisposition stdout_disposition,
  * stream dispositions.
  */
 GSSubprocess *
-gs_subprocess_new_simple_argv (gchar                      **argv,
-			      GSSubprocessStreamDisposition stdout_disposition,
-			      GSSubprocessStreamDisposition stderr_disposition,
-			      GError                     **error)
+gs_subprocess_new_simple_argv (gchar                       **argv,
+			      GSSubprocessStreamDisposition  stdout_disposition,
+			      GSSubprocessStreamDisposition  stderr_disposition,
+                               GCancellable                 *cancellable,
+			      GError                      **error)
 {
   GSSubprocessContext *context;
   GSSubprocess *result;
@@ -883,7 +886,7 @@ gs_subprocess_new_simple_argv (gchar                      **argv,
   gs_subprocess_context_set_stdout_disposition (context, stdout_disposition);
   gs_subprocess_context_set_stderr_disposition (context, stderr_disposition);
 
-  result = gs_subprocess_new (context, error);
+  result = gs_subprocess_new (context, cancellable, error);
   g_object_unref (context);
 
   return result;
diff --git a/gsystem-subprocess.h b/gsystem-subprocess.h
index 218f34a..7ca6417 100644
--- a/gsystem-subprocess.h
+++ b/gsystem-subprocess.h
@@ -36,6 +36,7 @@ GType            gs_subprocess_get_type (void) G_GNUC_CONST;
 /**** Core API ****/
 
 GSSubprocess *    gs_subprocess_new (GSSubprocessContext   *context,
+                                     GCancellable          *cancellable,
                                      GError               **error);
 
 GOutputStream *  gs_subprocess_get_stdin_pipe (GSSubprocess       *self);
@@ -71,15 +72,17 @@ void             gs_subprocess_force_exit (GSSubprocess       *self);
 
 /** High level helpers **/
 
-GSSubprocess *    gs_subprocess_new_simple_argl (GSSubprocessStreamDisposition stdout_disposition,
-					       GSSubprocessStreamDisposition stderr_disposition,
-					       GError                     **error,
-					       const char                  *first_arg,
-					       ...) G_GNUC_NULL_TERMINATED;
-GSSubprocess *    gs_subprocess_new_simple_argv (char                       **argv,
-					       GSSubprocessStreamDisposition stdout_disposition,
-					       GSSubprocessStreamDisposition stderr_disposition,
-					       GError                     **error);
+GSSubprocess *    gs_subprocess_new_simple_argl (GSSubprocessStreamDisposition   stdout_disposition,
+                                                 GSSubprocessStreamDisposition   stderr_disposition,
+                                                 GCancellable                   *cancellable,
+                                                 GError                        **error,
+                                                 const char                     *first_arg,
+                                                 ...) G_GNUC_NULL_TERMINATED;
+GSSubprocess *    gs_subprocess_new_simple_argv (char                         **argv,
+                                                 GSSubprocessStreamDisposition  stdout_disposition,
+                                                 GSSubprocessStreamDisposition  stderr_disposition,
+                                                 GCancellable                  *cancellable,
+                                                 GError                       **error);
 
 G_END_DECLS
 



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