Commit d7076fff authored by Sam Thursfield's avatar Sam Thursfield

tracker_domain_ontology_get_domain() should return only the domain name

We should be consistent about what the name of a Tracker domain actually
is. In the domain rule we specify Domain=org.freedesktop (for the
default rule) or Domain=org.example.App (for a custom domain). But
internally tracker_domain_ontology_get_domain() would return
org.freedesktop.Tracker1 or org.example.App.Tracker1, i.e. the domain
name now has '.Tracker1' appended.

This does make sense in most cases, but it means there's no way to get
the actual name of the domain from a TrackerDomainOntology object. This
commit changes the existing function to not append '.Tracker1' in the
value it returns, which means that function can now be used to get the
base name of the domain. The assumption is that callers are normally
appending stuff to this base name anyway so it's not much extra effect
to also append the '.Tracker1' component if needed.

libtracker-common is internal to Tracker so this doesn't constitute a
public API break.
parent 8fb3232b
......@@ -454,9 +454,9 @@ tracker_domain_ontology_get_domain (TrackerDomainOntology *domain_ontology,
priv = tracker_domain_ontology_get_instance_private (domain_ontology);
if (suffix)
return g_strconcat (priv->domain, ".Tracker1.", suffix, NULL);
return g_strconcat (priv->domain, ".", suffix, NULL);
else
return g_strconcat (priv->domain, ".Tracker1", NULL);
return g_strconcat (priv->domain, NULL);
}
gboolean
......
......@@ -44,7 +44,7 @@
"\n" \
" http://www.gnu.org/licenses/gpl.txt\n"
#define DBUS_NAME_SUFFIX "Miner.Applications"
#define DBUS_NAME_SUFFIX "Tracker1.Miner.Applications"
#define DBUS_PATH "/org/freedesktop/Tracker1/Miner/Applications"
static GMainLoop *main_loop;
......
......@@ -52,7 +52,7 @@
#define SECONDS_PER_DAY 60 * 60 * 24
#define DBUS_NAME_SUFFIX "Miner.Files"
#define DBUS_NAME_SUFFIX "Tracker1.Miner.Files"
#define DBUS_PATH "/org/freedesktop/Tracker1/Miner/Files"
static GMainLoop *main_loop;
......
......@@ -29,7 +29,7 @@
#include "tracker-miner-rss.h"
#define DBUS_NAME_SUFFIX "Miner.RSS"
#define DBUS_NAME_SUFFIX "Tracker1.Miner.RSS"
#define DBUS_PATH "/org/freedesktop/Tracker1/Miner/RSS"
static gint verbosity = -1;
......
......@@ -60,7 +60,7 @@
"\n" \
" http://www.gnu.org/licenses/gpl.txt\n"
#define DBUS_NAME_SUFFIX "Miner.Extract"
#define DBUS_NAME_SUFFIX "Tracker1.Miner.Extract"
#define DBUS_PATH "/org/freedesktop/Tracker1/Miner/Extract"
static GMainLoop *main_loop;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment