[tracker/direct-access-refactor] squash



commit 3b8f693e302e80423b359e802777c2c3c86da281
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Jul 19 12:20:56 2010 +0200

    squash

 src/libtracker-bus/tracker-bus-array-cursor.vala |   74 +++++++++++-----------
 1 files changed, 36 insertions(+), 38 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus-array-cursor.vala b/src/libtracker-bus/tracker-bus-array-cursor.vala
index 97b9f31..d82b5cd 100644
--- a/src/libtracker-bus/tracker-bus-array-cursor.vala
+++ b/src/libtracker-bus/tracker-bus-array-cursor.vala
@@ -17,54 +17,52 @@
  * Boston, MA  02110-1301, USA.
  */
 
-namespace Tracker.Bus {
-	public class ArrayCursor : Tracker.Sparql.Cursor {
-		int rows;
-		int current_row;
-		char **results;
-		int cols;
+internal class Tracker.Bus.ArrayCursor : Tracker.Sparql.Cursor {
+	int rows;
+	int current_row;
+	char **results;
+	int cols;
 
-		public ArrayCursor (owned char** mresults, int mrows, int mcols) {
-			rows = mrows;
-			cols = mcols;
-			results = mresults;
-		}
-
-		public override int n_columns { get { return cols; } }
+	public ArrayCursor (owned char** results, int rows, int cols) {
+		this.rows = rows;
+		this.cols = cols;
+		this.results = results;
+	}
 
-		public override unowned string? get_string (int column, out long length = null) {
-			char **row;
-			unowned string str;
+	public override int n_columns { get { return cols; } }
 
-			if (rows < 1) {
-				return null;
-			}
+	public override unowned string? get_string (int column, out long length = null) {
+		char **row;
+		unowned string str;
 
-			row = results + current_row;
-			str =  (string) row[column];
+		if (rows < 1) {
+			return null;
+		}
 
-			if ((&length) != null) {
-				length = str.length;
-			}
+		row = results + current_row;
+		str =  (string) row[column];
 
-			return str;
+		if (&length != null) {
+			length = str.length;
 		}
 
-		public override bool next (Cancellable? cancellable = null) throws GLib.Error {
-			if (current_row >= rows - 1) {
-				return false;
-			}
-			current_row++;
-			return true;
-		}
+		return str;
+	}
 
-		public override async bool next_async (Cancellable? cancellable = null) throws GLib.Error {
-			/* This cursor isn't blocking, it's fine to just call next here */
-			return next (cancellable);
+	public override bool next (Cancellable? cancellable = null) throws GLib.Error {
+		if (current_row >= rows - 1) {
+			return false;
 		}
+		current_row++;
+		return true;
+	}
 
-		public override void rewind () {
-			current_row = 0;
-		}
+	public override async bool next_async (Cancellable? cancellable = null) throws GLib.Error {
+		/* This cursor isn't blocking, it's fine to just call next here */
+		return next (cancellable);
+	}
+
+	public override void rewind () {
+		current_row = 0;
 	}
 }



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