[tracker/class-signal: 14/39] tracker-store: Simplify tracker_events_* API, typo fix



commit 41626ce81bdd5425c1b69d344a70e337d0de5501
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Aug 19 13:59:49 2010 +0200

    tracker-store: Simplify tracker_events_* API, typo fix

 src/tracker-store/tracker-events.c    |   42 +-------------------------------
 src/tracker-store/tracker-events.h    |    8 ------
 src/tracker-store/tracker-resources.c |    6 ++--
 3 files changed, 5 insertions(+), 51 deletions(-)
---
diff --git a/src/tracker-store/tracker-events.c b/src/tracker-store/tracker-events.c
index daa8e04..f794be7 100644
--- a/src/tracker-store/tracker-events.c
+++ b/src/tracker-store/tracker-events.c
@@ -34,44 +34,6 @@ typedef struct {
 
 static EventsPrivate *private;
 
-void
-tracker_events_foreach_insert_of (TrackerClass        *class,
-                                  TrackerEventsForeach foreach,
-                                  gpointer             user_data)
-{
-	g_return_if_fail (class != NULL);
-	g_return_if_fail (foreach != NULL);
-
-	tracker_class_foreach_insert_event (class, foreach, user_data);
-}
-
-void
-tracker_events_foreach_delete_of (TrackerClass        *class,
-                                  TrackerEventsForeach foreach,
-                                  gpointer             user_data)
-{
-	g_return_if_fail (class != NULL);
-	g_return_if_fail (foreach != NULL);
-
-	tracker_class_foreach_delete_event (class, foreach, user_data);
-}
-
-gboolean
-tracker_events_class_has_deletes (TrackerClass *class)
-{
-	g_return_val_if_fail (class != NULL, FALSE);
-
-	return tracker_class_has_delete_events (class);
-}
-
-gboolean
-tracker_events_class_has_inserts (TrackerClass *class)
-{
-	g_return_val_if_fail (class != NULL, FALSE);
-
-	return tracker_class_has_insert_events (class);
-}
-
 static gboolean
 is_allowed (EventsPrivate *private, TrackerClass *rdf_class, gint class_id)
 {
@@ -119,7 +81,7 @@ tracker_events_add_insert (gint         graph_id,
 				TrackerClass *class;
 				class = tracker_ontologies_get_class_by_uri (uri);
 				if (class) {
-					tracker_class_add_delete_event (class,
+					tracker_class_add_insert_event (class,
 					                                subject_id,
 					                                pred_id,
 					                                object_id);
@@ -131,7 +93,7 @@ tracker_events_add_insert (gint         graph_id,
 
 		for (i = 0; i < rdf_types->len; i++) {
 			if (is_allowed (private, rdf_types->pdata[i], 0)) {
-				tracker_class_add_delete_event (rdf_types->pdata[i],
+				tracker_class_add_insert_event (rdf_types->pdata[i],
 				                                subject_id,
 				                                pred_id,
 				                                object_id);
diff --git a/src/tracker-store/tracker-events.h b/src/tracker-store/tracker-events.h
index 20f19db..75294e4 100644
--- a/src/tracker-store/tracker-events.h
+++ b/src/tracker-store/tracker-events.h
@@ -46,14 +46,6 @@ void       tracker_events_add_delete        (gint                      graph_id,
                                              gint                      object_id,
                                              const gchar              *object,
                                              GPtrArray                *rdf_types);
-void       tracker_events_foreach_delete_of (TrackerClass            *class,
-                                             TrackerEventsForeach     foreach,
-                                             gpointer                 user_data);
-void       tracker_events_foreach_insert_of (TrackerClass            *class,
-                                             TrackerEventsForeach     foreach,
-                                             gpointer                 user_data);
-gboolean   tracker_events_class_has_deletes (TrackerClass            *class);
-gboolean   tracker_events_class_has_inserts (TrackerClass            *class);
 void       tracker_events_classes_iter      (GHashTableIter           *iter);
 void       tracker_events_reset             (void);
 void       tracker_events_freeze            (void);
diff --git a/src/tracker-store/tracker-resources.c b/src/tracker-store/tracker-resources.c
index 6d47fb0..71aaa9f 100644
--- a/src/tracker-store/tracker-resources.c
+++ b/src/tracker-store/tracker-resources.c
@@ -549,7 +549,7 @@ static void
 emit_class_signal (TrackerResources *self,
                    TrackerClass     *class)
 {
-	if (tracker_events_class_has_inserts (class) || tracker_events_class_has_deletes (class)) {
+	if (tracker_class_has_insert_events (class) || tracker_class_has_delete_events (class)) {
 		TrackerResourcesPrivate *priv;
 		DBusMessageIter iter, deletes_iter, inserts_iter;
 		DBusMessage *message;
@@ -569,7 +569,7 @@ emit_class_signal (TrackerResources *self,
 		dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY,
 		                                  "(iii)", &deletes_iter);
 
-		tracker_events_foreach_delete_of (class, foreach_add_to_iter, &deletes_iter);
+		tracker_class_foreach_delete_event (class, foreach_add_to_iter, &deletes_iter);
 
 		dbus_message_iter_close_container (&iter, &deletes_iter);
 
@@ -577,7 +577,7 @@ emit_class_signal (TrackerResources *self,
 		dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY,
 		                                  "(iii)", &inserts_iter);
 
-		tracker_events_foreach_insert_of (class, foreach_add_to_iter, &inserts_iter);
+		tracker_class_foreach_insert_event (class, foreach_add_to_iter, &inserts_iter);
 
 		dbus_message_iter_close_container (&iter, &inserts_iter);
 



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