[tracker/wip/carlosg/domain-ontologies: 89/124] tracker-store: Make DBus unique name purely dependent on the domain



commit eab91a0341d539eee41249f201f27773a99aed4f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jun 19 15:27:33 2017 +0200

    tracker-store: Make DBus unique name purely dependent on the domain
    
    i.e. just remove the ontology name from there. We do add the ".Tracker1"
    suffix though, just so Tracker gets its own namespace dependent on it, eg:
    org.gnome.Photos.Tracker1
    org.gnome.Photos.Tracker1.Miner.Files
    org.gnome.Photos.Tracker1.Miner.Extract

 src/tracker-store/tracker-dbus.vala |   24 ++++++++----------------
 src/tracker-store/tracker-main.vala |    2 +-
 2 files changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/src/tracker-store/tracker-dbus.vala b/src/tracker-store/tracker-dbus.vala
index ef6e709..1a44a97 100644
--- a/src/tracker-store/tracker-dbus.vala
+++ b/src/tracker-store/tracker-dbus.vala
@@ -77,25 +77,17 @@ public class Tracker.DBus {
                }
        }
 
-       public static bool register_names (string? domain, string? ontology_name) {
-               /* Register the service name for org.freedesktop.Tracker */
-               
+       public static bool register_names (string? domain) {
+               string service_name;
+
                if (domain != null) {
-                       if (ontology_name != null) {
-                               if (!dbus_register_service (domain+"."+ontology_name)) {
-                                       return false;
-                               }
-                       } else {
-                               if (!dbus_register_service (domain)) {
-                                       return false;
-                               }
-                       }
+                       service_name = domain;
                } else {
-                       if (!dbus_register_service (SERVICE)) {
-                               return false;
-                       }
+                       /* Register the service name for org.freedesktop.Tracker */
+                       service_name = SERVICE;
                }
-               return true;
+
+               return dbus_register_service (service_name);
        }
 
        public static bool init (Tracker.Config config_p) {
diff --git a/src/tracker-store/tracker-main.vala b/src/tracker-store/tracker-main.vala
index 9682589..3051d76 100644
--- a/src/tracker-store/tracker-main.vala
+++ b/src/tracker-store/tracker-main.vala
@@ -300,7 +300,7 @@ License which can be viewed at:
                        return 1;
                }
 
-               if (!Tracker.DBus.register_names (domain, ontology_name)) {
+               if (!Tracker.DBus.register_names (domain)) {
                        return 1;
                }
 


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