[tracker/wip/sam/resource: 8/9] libtracker-sparql: More namespace-manager stuff



commit 32dfd50fbaad29fade02f2ff9bc0a24504e48dae
Author: Sam Thursfield <sam afuera me uk>
Date:   Fri Apr 8 22:41:45 2016 +0100

    libtracker-sparql: More namespace-manager stuff

 src/libtracker-sparql/tracker-namespace-manager.c |   21 +++++++++++++++++----
 src/libtracker-sparql/tracker-namespace-manager.h |    9 ++-------
 2 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-namespace-manager.c 
b/src/libtracker-sparql/tracker-namespace-manager.c
index d7f580d..4755253 100644
--- a/src/libtracker-sparql/tracker-namespace-manager.c
+++ b/src/libtracker-sparql/tracker-namespace-manager.c
@@ -26,7 +26,12 @@
 
 #include "tracker-namespace-manager.h"
 
+struct _TrackerNamespaceManager {
+       GObject *parent;
+};
+
 typedef struct {
+       char *foo;
 } TrackerNamespaceManagerPrivate;
 
 G_DEFINE_TYPE_WITH_PRIVATE (TrackerNamespaceManager, tracker_namespace_manager, G_TYPE_OBJECT);
@@ -68,9 +73,9 @@ tracker_namespace_manager_init (TrackerNamespaceManager *self)
 static void
 finalize (GObject *object)
 {
-       TrackerNamespaceManagerPrivate *priv = GET_PRIVATE (self);
+       TrackerNamespaceManagerPrivate *priv;
 
-       priv = GET_PRIV (object);
+       priv = GET_PRIVATE (TRACKER_NAMESPACE_MANAGER (object));
 
        (G_OBJECT_CLASS (tracker_namespace_manager_parent_class)->finalize) (object);
 }
@@ -78,7 +83,7 @@ finalize (GObject *object)
 TrackerNamespaceManager *
 tracker_namespace_manager_new ()
 {
-       TrackerNamespaceManager *namespace;
+       TrackerNamespaceManager *namespace_manager;
 
        namespace_manager = g_object_new (TRACKER_TYPE_NAMESPACE_MANAGER, NULL);
 }
@@ -86,7 +91,7 @@ tracker_namespace_manager_new ()
 TrackerNamespaceManager *
 tracker_namespace_manager_get_default ()
 {
-       static volatile TrackerNamespaceManager *default_namespace_manager__volatile;
+       static TrackerNamespaceManager * volatile default_namespace_manager__volatile;
 
        if (g_once_init_enter (&default_namespace_manager__volatile)) {
                TrackerNamespaceManager *manager = tracker_namespace_manager_new();
@@ -98,3 +103,11 @@ tracker_namespace_manager_get_default ()
 
        return default_namespace_manager__volatile;
 }
+
+char *
+tracker_namespace_manager_expand_uri (TrackerNamespaceManager *self,
+                                      const char *short_uri)
+{
+       /* FIXME: stub */
+       return g_strdup (short_uri);
+}
diff --git a/src/libtracker-sparql/tracker-namespace-manager.h 
b/src/libtracker-sparql/tracker-namespace-manager.h
index d92e87b..8c97a8b 100644
--- a/src/libtracker-sparql/tracker-namespace-manager.h
+++ b/src/libtracker-sparql/tracker-namespace-manager.h
@@ -31,15 +31,10 @@ G_BEGIN_DECLS
 #define TRACKER_TYPE_NAMESPACE_MANAGER (tracker_namespace_manager_get_type())
 G_DECLARE_FINAL_TYPE (TrackerNamespaceManager, tracker_namespace_manager, TRACKER, NAMESPACE_MANAGER, 
GObject);
 
-struct _TrackerNamespaceManagerClass
-{
-       GObjectClass parent_class;
-};
-
-GType             tracker_namespace_manager_get_type      (void) G_GNUC_CONST;
-
 TrackerNamespaceManager *tracker_namespace_manager_get_default ();
 
+char *tracker_namespace_manager_expand_uri (TrackerNamespaceManager *self, const char *short_uri);
+
 G_END_DECLS
 
 #endif /* __LIBTRACKER_SPARQL_NAMESPACE_MANAGER_H__ */


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