[tracker/wip/carlosg/namespace-api-updates: 3/4] portal: Move away from tracker_namespaces_manager_get_default()




commit 83fdc8c761af87c90b31957b1339dcac3fef3fe3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Nov 13 16:00:19 2021 +0100

    portal: Move away from tracker_namespaces_manager_get_default()
    
    This kludge is no longer necessary with the bus TrackerSparqlConnection
    implementing get_namespace_manager(). We can ask the connection being
    forwarded about its own namespaces now.

 src/portal/tracker-portal-endpoint.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/portal/tracker-portal-endpoint.c b/src/portal/tracker-portal-endpoint.c
index 5cce3c2c2..0b1dbd48c 100644
--- a/src/portal/tracker-portal-endpoint.c
+++ b/src/portal/tracker-portal-endpoint.c
@@ -92,16 +92,15 @@ tracker_portal_endpoint_filter_graph (TrackerEndpointDBus *endpoint_dbus,
                } else if (g_strcmp0 (graph_name, endpoint->graphs[i]) == 0) {
                        return FALSE;
                } else {
+                       TrackerSparqlConnection *connection;
                        TrackerNamespaceManager *namespaces;
                        gchar *expanded;
 
                        /* We may have been given a prefixed name instead of an
                         * URI, expand it in order to check with the given graph.
-                        *
-                        * FIXME: This is not going to work for prefixes outside
-                        * the well-known namespaces.
                         */
-                       namespaces = tracker_namespace_manager_get_default ();
+                       connection = tracker_endpoint_get_sparql_connection (TRACKER_ENDPOINT (endpoint));
+                       namespaces = tracker_sparql_connection_get_namespace_manager (connection);
                        expanded = tracker_namespace_manager_expand_uri (namespaces,
                                                                         endpoint->graphs[i]);
 


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