Commit dd4fec2f authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Isaque Galdino de Araujo

tracker: Use private store

(through tracker_sparql_connection_local_new)

This enables use of Tracker as a library instead of a service, making
bijiben keep a private store, isolated from anything else. This data is
stored in $XDG_CACHE_HOME/bijiben/tracker.
parent e794adcb
Pipeline #33944 passed with stage
in 6 minutes and 38 seconds
......@@ -25,8 +25,7 @@
"--talk-name=org.gnome.evolution.dataserver.AddressBook9",
"--talk-name=org.gnome.evolution.dataserver.Calendar7",
"--talk-name=org.gnome.evolution.dataserver.Sources5",
"--talk-name=org.gnome.evolution.dataserver.Subprocess.Backend.*",
"--talk-name=org.freedesktop.Tracker1"
"--talk-name=org.gnome.evolution.dataserver.Subprocess.Backend.*"
],
"build-options" : {
"cflags" : "-O2 -g",
......
......@@ -423,8 +423,19 @@ bijiben_shell_search_provider_app_init (BijibenShellSearchProviderApp *self)
char *storage_path;
GFile *storage;
GdkRGBA color = { 0, 0, 0, 0 };
self->connection = tracker_sparql_connection_get (NULL, &error);
g_autofree char *filename = NULL;
g_autoptr (GFile) data_location = NULL;
filename = g_build_filename (g_get_user_cache_dir (),
g_get_application_name (),
"tracker",
NULL);
data_location = g_file_new_for_path (filename);
self->connection = tracker_sparql_connection_local_new (TRACKER_SPARQL_CONNECTION_FLAGS_READONLY,
data_location,
NULL, NULL, NULL,
&error);
if (error)
{
......
......@@ -218,10 +218,21 @@ biji_manager_initable_init (GInitable *initable,
GError *local_error = NULL;
GoaClient *client;
ESourceRegistry *registry;
g_autofree char *filename = NULL;
g_autoptr (GFile) data_location = NULL;
filename = g_build_filename (g_get_user_cache_dir (),
g_get_application_name (),
"tracker",
NULL);
data_location = g_file_new_for_path (filename);
/* If tracker fails for some reason,
* do not attempt anything */
self->connection = tracker_sparql_connection_get (NULL, &local_error);
self->connection = tracker_sparql_connection_local_new (TRACKER_SPARQL_CONNECTION_FLAGS_NONE,
data_location,
NULL, NULL, NULL,
&local_error);
if (local_error)
{
......
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