[tracker/binary-log-2: 37/42] libtracker-db: Support reading timestamps from journal



commit 39a2475a0fc3b7f7d0ad7b26d6c8a7155e345e63
Author: Jürg Billeter <j bitron ch>
Date:   Fri Jan 8 14:13:34 2010 +0100

    libtracker-db: Support reading timestamps from journal

 src/libtracker-db/tracker-db-journal.c |    8 +++++++-
 src/libtracker-db/tracker-db-journal.h |    1 +
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index f55869f..0c70232 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -63,7 +63,7 @@ static struct {
 	const gchar *entry_begin;
 	const gchar *entry_end;
 	guint32 amount_of_triples;
-	time_t time;
+	gint64 time;
 	TrackerDBJournalEntryType type;
 	const gchar *uri;
 	guint32 s_id;
@@ -890,6 +890,12 @@ tracker_db_journal_reader_next (GError **error)
 	return FALSE;
 }
 
+gint64
+tracker_db_journal_reader_get_time (void)
+{
+	return reader.time;
+}
+
 gboolean
 tracker_db_journal_reader_get_resource (guint32      *id,
                                         const gchar **uri)
diff --git a/src/libtracker-db/tracker-db-journal.h b/src/libtracker-db/tracker-db-journal.h
index 3034234..568f556 100644
--- a/src/libtracker-db/tracker-db-journal.h
+++ b/src/libtracker-db/tracker-db-journal.h
@@ -82,6 +82,7 @@ TrackerDBJournalEntryType
              tracker_db_journal_reader_get_type              (void);
 
 gboolean     tracker_db_journal_reader_next                  (GError      **error);
+gint64       tracker_db_journal_reader_get_time              (void);
 gboolean     tracker_db_journal_reader_get_resource          (guint32      *id,
                                                               const gchar **uri);
 gboolean     tracker_db_journal_reader_get_statement         (guint32      *s_id,



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