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



commit 5de5c30053106239ea63d56223e3b610525497ec
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 16c2435..97cf4f4 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;
@@ -892,6 +892,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]