[the-board] [tb] Add introspectable wrapper for g_file_load_contents_finish()



commit 812dfe0d5e25db55dea9628d8f51ac64dcaf2bbf
Author: Lucas Rocha <lucasr gnome org>
Date:   Tue Apr 12 22:50:18 2011 +0100

    [tb] Add introspectable wrapper for g_file_load_contents_finish()

 src/tb/tb-gio-util.c |   12 ++++++++++++
 src/tb/tb-gio-util.h |    4 ++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/tb/tb-gio-util.c b/src/tb/tb-gio-util.c
index d1cfb43..0ad355c 100644
--- a/src/tb/tb-gio-util.c
+++ b/src/tb/tb-gio-util.c
@@ -24,6 +24,18 @@ tb_g_file_replace_contents_async(GFile *file,
                                 callback, NULL);
 }
 
+char *
+tb_g_file_load_contents_finish(GFile        *file,
+                               GAsyncResult *result,
+                               GError      **error)
+{
+    char *contents;
+
+    g_file_load_contents_finish (file, result, &contents, NULL, NULL, error);
+
+    return contents;
+}
+
 typedef struct {
   GFile *file;
 } DeleteData;
diff --git a/src/tb/tb-gio-util.h b/src/tb/tb-gio-util.h
index da7b6a2..341a0b7 100644
--- a/src/tb/tb-gio-util.h
+++ b/src/tb/tb-gio-util.h
@@ -9,6 +9,10 @@ void     tb_g_file_replace_contents_async(GFile               *file,
                                           GCancellable        *cancellable,
                                           GAsyncReadyCallback  callback);
 
+char    *tb_g_file_load_contents_finish  (GFile               *file,
+                                          GAsyncResult        *result,
+                                          GError             **error);
+
 void     tb_g_file_delete_async          (GFile               *file,
                                           GCancellable        *cancellable,
                                           GAsyncReadyCallback  callback,



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