/* class-wide constants */
private const string TRACKER_SERVICE = "org.freedesktop.Tracker1";
private const string RESOURCES_PATH = "/org/freedesktop/Tracker1/Resources";
- private const string MINER_SERVICE = "org.freedesktop.Tracker1.Miner.Files";
- private const string MINER_PATH = "/org/freedesktop/Tracker1/Miner/Files";
public ArrayList<string> create_classes { get; set; }
private const string TEMP_ID = "x";
private const string QUERY_ID = "_:" + TEMP_ID;
+ private const string MINER_SERVICE = "org.freedesktop.Tracker1.Miner.Files.Index";
+ private const string MINER_PATH = "/org/freedesktop/Tracker1/Miner/Files/Index";
+
// We need to add the size in the miner's graph so that the miner will
// update it and correct a (possibly wrong) size we got via CreateItem
// (DLNA requirement 7.3.128.7)
(this.get_resource_id_query ());
this.id = ids[0,0];
+ } else {
+ var file = File.new_for_uri (this.uri);
+ if (file.is_native () &&
+ file.query_exists ()) {
+ MinerFilesIndexIface miner = Bus.get_proxy_sync
+ (BusType.SESSION,
+ MINER_SERVICE,
+ MINER_PATH,
+ DBusProxyFlags.DO_NOT_LOAD_PROPERTIES);
+ miner.index_file (this.uri);
+ }
}
debug ("Created item in Tracker store with ID '%s'", this.id);
public abstract async HashTable<string,string>[,] sparql_update_blank
(string query) throws IOError;
}
+
+[DBus (name = "org.freedesktop.Tracker1.Miner.Files.Index")]
+public interface Rygel.Tracker.MinerFilesIndexIface: DBusProxy {
+ public abstract async void index_file (string uri) throws IOError;
+}