[tracker/miner-flickr: 24/24] tracker-miner-flickr: Switch writeback to use TrackerClient
- From: Adrien Bustany <abustany src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-flickr: 24/24] tracker-miner-flickr: Switch writeback to use TrackerClient
- Date: Fri, 2 Apr 2010 13:21:04 +0000 (UTC)
commit dee458ca6548d2cb50364dd479396890e5acf922
Author: Adrien Bustany <abustany gnome org>
Date: Fri Mar 26 14:43:33 2010 -0300
tracker-miner-flickr: Switch writeback to use TrackerClient
Writeback functions won't make it into TrackerMiner, so use a traditional
TrackerClient to connect to the writeback signals.
src/miners/flickr/tracker-miner-flickr.vala | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/miners/flickr/tracker-miner-flickr.vala b/src/miners/flickr/tracker-miner-flickr.vala
index 5ac4645..c69993e 100644
--- a/src/miners/flickr/tracker-miner-flickr.vala
+++ b/src/miners/flickr/tracker-miner-flickr.vala
@@ -67,6 +67,9 @@ public class MinerFlickr : Tracker.MinerWeb {
private QueryQueue query_queue;
private static MainLoop main_loop;
+ /* Needed to connect to the writeback signal */
+ private Tracker.Client tracker_client;
+
private Rest.Proxy rest;
/* Only used during association phase */
@@ -78,7 +81,6 @@ public class MinerFlickr : Tracker.MinerWeb {
construct {
set ("name", MINER_NAME);
- set ("writeback-enabled", true);
set ("associated", false);
set ("status", "Idle");
set ("progress", 1.0);
@@ -87,6 +89,9 @@ public class MinerFlickr : Tracker.MinerWeb {
query_queue = new QueryQueue (this);
+ tracker_client = new Tracker.Client (0, -1);
+ tracker_client.writeback_connect (writeback);
+
this.notify["associated"].connect (association_status_changed);
}
@@ -677,7 +682,7 @@ public class MinerFlickr : Tracker.MinerWeb {
set ("associated", false);
}
- public override void writeback (HashTable properties)
+ public void writeback (HashTable properties)
{
List<weak string> uris = (List<weak string>)properties.get_keys ();
weak string[] rdf_classes;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]