banshee r4513 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Indexer
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4513 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Indexer
- Date: Thu, 11 Sep 2008 01:49:54 +0000 (UTC)
Author: abock
Date: Thu Sep 11 01:49:54 2008
New Revision: 4513
URL: http://svn.gnome.org/viewvc/banshee?rev=4513&view=rev
Log:
2008-09-10 Aaron Bockover <abock gnome org>
* src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs:
* src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexerService.cs:
Fixed query, implemented Hello
* src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexer.cs:
* src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexer.cs:
Use the Action delegate
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexer.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexer.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexerService.cs
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexer.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexer.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexer.cs Thu Sep 11 01:49:54 2008
@@ -50,8 +50,8 @@
private List<CachedList<DatabaseTrackInfo>> model_caches = new List<CachedList<DatabaseTrackInfo>> ();
private string [] export_fields;
- private event IndexingFinishedHandler indexing_finished;
- event IndexingFinishedHandler ICollectionIndexer.IndexingFinished {
+ private event Action indexing_finished;
+ event Action ICollectionIndexer.IndexingFinished {
add { indexing_finished += value; }
remove { indexing_finished -= value; }
}
@@ -239,7 +239,7 @@
handler (this, EventArgs.Empty);
}
- IndexingFinishedHandler dbus_handler = indexing_finished;
+ Action dbus_handler = indexing_finished;
if (dbus_handler != null) {
dbus_handler ();
}
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs Thu Sep 11 01:49:54 2008
@@ -72,6 +72,11 @@
}
}
+ void ICollectionIndexerService.Hello ()
+ {
+ Hyena.Log.DebugFormat ("Hello called on {0}", GetType ());
+ }
+
public void Shutdown ()
{
lock (this) {
@@ -120,11 +125,9 @@
}
foreach (LibrarySource library in libraries) {
- string query = String.Format ("SELECT MAX(CoreTracks.DateUpdatedStamp) {0}",
- ((DatabaseTrackListModel)library.TrackModel).UnfilteredQuery);
- using (HyenaDataReader reader = new HyenaDataReader (ServiceManager.DbConnection.Query (query))) {
- last_updated = Math.Max (last_updated, reader.Get<long> (0));
- }
+ last_updated = Math.Max (last_updated, ServiceManager.DbConnection.Query<long> (
+ String.Format ("SELECT MAX(CoreTracks.DateUpdatedStamp) {0}",
+ library.DatabaseTrackModel.UnfilteredQuery)));
}
return last_updated > time;
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexer.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexer.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexer.cs Thu Sep 11 01:49:54 2008
@@ -34,13 +34,12 @@
namespace Banshee.Collection.Indexer
{
- public delegate void IndexingFinishedHandler ();
public delegate void SaveToXmlFinishedHandler (bool success, string path);
[Interface ("org.bansheeproject.Banshee.CollectionIndexer")]
public interface ICollectionIndexer : IService, IDBusExportable
{
- event IndexingFinishedHandler IndexingFinished;
+ event Action IndexingFinished;
event SaveToXmlFinishedHandler SaveToXmlFinished;
void Index ();
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexerService.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexerService.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexerService.cs Thu Sep 11 01:49:54 2008
@@ -37,7 +37,7 @@
public interface ICollectionIndexerService : IService, IDBusExportable
{
event Action CollectionChanged;
-
+ void Hello ();
void Shutdown ();
ObjectPath CreateIndexer ();
string [] GetAvailableExportFields ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]