tracker r2519 - in trunk: . data/db src/libtracker-data src/tracker-indexer
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2519 - in trunk: . data/db src/libtracker-data src/tracker-indexer
- Date: Tue, 18 Nov 2008 16:06:29 +0000 (UTC)
Author: juergbi
Date: Tue Nov 18 16:06:29 2008
New Revision: 2519
URL: http://svn.gnome.org/viewvc/tracker?rev=2519&view=rev
Log:
2008-11-18 JÃrg Billeter <j bitron ch>
* data/db/sqlite-stored-procs.sql:
* src/libtracker-data/tracker-data-update.[ch]:
* src/tracker-indexer/tracker-indexer.c:
Add tracker_data_update_disable_all_volumes function to disable
all volumes on startup
Modified:
trunk/ChangeLog
trunk/data/db/sqlite-stored-procs.sql
trunk/src/libtracker-data/tracker-data-update.c
trunk/src/libtracker-data/tracker-data-update.h
trunk/src/tracker-indexer/tracker-indexer.c
Modified: trunk/data/db/sqlite-stored-procs.sql
==============================================================================
--- trunk/data/db/sqlite-stored-procs.sql (original)
+++ trunk/data/db/sqlite-stored-procs.sql Tue Nov 18 16:06:29 2008
@@ -137,6 +137,7 @@
InsertVolume INSERT INTO Volumes (MountPath, UDI, Enabled) VALUES (?, ?, 1);
EnableVolume UPDATE Volumes SET MountPath = ?, Enabled = 1 WHERE UDI = ?;
DisableVolume UPDATE Volumes SET Enabled = 0 WHERE UDI = ?;
+DisableAllVolumes UPDATE Volumes SET Enabled = 0;
/*
* XESAM queries
Modified: trunk/src/libtracker-data/tracker-data-update.c
==============================================================================
--- trunk/src/libtracker-data/tracker-data-update.c (original)
+++ trunk/src/libtracker-data/tracker-data-update.c Tue Nov 18 16:06:29 2008
@@ -571,8 +571,8 @@
}
void
-tracker_data_update_add_volume (const gchar *udi,
- const gchar *mount_path)
+tracker_data_update_enable_volume (const gchar *udi,
+ const gchar *mount_path)
{
TrackerDBInterface *iface;
TrackerDBResultSet *result_set;
@@ -610,7 +610,7 @@
}
void
-tracker_data_update_remove_volume (const gchar *udi)
+tracker_data_update_disable_volume (const gchar *udi)
{
TrackerDBInterface *iface;
@@ -624,3 +624,15 @@
NULL);
}
+void
+tracker_data_update_disable_all_volumes (void)
+{
+ TrackerDBInterface *iface;
+
+ iface = tracker_db_manager_get_db_interface (TRACKER_DB_COMMON);
+
+ tracker_db_interface_execute_procedure (iface, NULL,
+ "DisableAllVolumes",
+ NULL);
+}
+
Modified: trunk/src/libtracker-data/tracker-data-update.h
==============================================================================
--- trunk/src/libtracker-data/tracker-data-update.h (original)
+++ trunk/src/libtracker-data/tracker-data-update.h Tue Nov 18 16:06:29 2008
@@ -81,9 +81,10 @@
void tracker_data_update_delete_handled_events (TrackerDBInterface *iface);
/* Volume handling */
-void tracker_data_update_add_volume (const gchar *udi,
+void tracker_data_update_enable_volume (const gchar *udi,
const gchar *mount_path);
-void tracker_data_update_remove_volume (const gchar *udi);
+void tracker_data_update_disable_volume (const gchar *udi);
+void tracker_data_update_disable_all_volumes (void);
G_END_DECLS
Modified: trunk/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- trunk/src/tracker-indexer/tracker-indexer.c (original)
+++ trunk/src/tracker-indexer/tracker-indexer.c Tue Nov 18 16:06:29 2008
@@ -2606,6 +2606,8 @@
"DBus request to disable all volumes");
+ tracker_data_update_disable_all_volumes ();
+
dbus_g_method_return (context);
tracker_dbus_request_success (request_id);
}
@@ -2634,9 +2636,9 @@
enabled ? "yes" : "no");
if (enabled) {
- tracker_data_update_add_volume (volume_uuid, path);
+ tracker_data_update_enable_volume (volume_uuid, path);
} else {
- tracker_data_update_remove_volume (volume_uuid);
+ tracker_data_update_disable_volume (volume_uuid);
}
dbus_g_method_return (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]