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



commit d5471e8078bb357d07ce02ff1bb36d7e7b33afa8
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 9eef1be..69227f7 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;
@@ -891,6 +891,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]