[libgit2-glib] Add GgitTransferProgress



commit 34e11b751abb3104aaf7fb42f0726e24e35d96bb
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Mar 20 11:24:45 2013 +0100

    Add GgitTransferProgress

 libgit2-glib/ggit-types.h |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h
index 4afe367..9ddb8d9 100644
--- a/libgit2-glib/ggit-types.h
+++ b/libgit2-glib/ggit-types.h
@@ -244,6 +244,19 @@ typedef struct _GgitSubmodule GgitSubmodule;
 typedef struct _GgitTag GgitTag;
 
 /**
+ * GgitTransferProgress:
+ *
+ * Represents transfering progress.
+ */
+typedef struct _GgitTransferProgress
+{
+       guint total_objects;
+       guint indexed_objects;
+       guint received_objects;
+       gsize received_bytes;
+} GgitTransferProgress;
+
+/**
  * GgitTree:
  *
  * Represents a tree object.
@@ -801,6 +814,18 @@ typedef gint (* GgitSubmoduleCallback) (GgitSubmodule *submodule,
                                         gpointer       user_data);
 
 /**
+ * GgitTransferProgressCallback:
+ * @stats: a #GgitTransferProgress.
+ * @user_data: (closure): user-supplied data.
+ *
+ * Progress callbacks during indexing.
+ *
+ * Returns: a value less than zero to cancel the transfer.
+ */
+typedef gint (* GgitTransferProgressCallback) (const GgitTransferProgress *stats,
+                                               gpointer                    user_data);
+
+/**
  * GgitTreeWalkCallback:
  * @root: the current (relative) root of the entry
  * @entry: the tree entry


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