banshee r4517 - in trunk/banshee: . src src/Clients/Beroe/Beroe src/Core/Banshee.Services/Banshee.Collection.Indexer



Author: abock
Date: Thu Sep 11 21:54:51 2008
New Revision: 4517
URL: http://svn.gnome.org/viewvc/banshee?rev=4517&view=rev

Log:
2008-09-11  Aaron Bockover  <abock gnome org>

    * src/Clients/Beroe/Beroe/IndexerClient.cs: Call 
    IndexerService.RegisterCleanupAndShutdown to notify any connected client
    using the indexer that it should release it and let the user use Banshee

    * src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs:
    * src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexerService.cs:
    Added CleanupAndShutdown event for the DBus interface and a method
    for the client to trigger the raising of the event

    * src/generate-dbus-docs: Stupid script to dump DBus interfaces to an
    HTML blob that I can update on the web site:
    http://banshee-project.org/contribute/write-code/dbus-interfaces/



Added:
   trunk/banshee/src/generate-dbus-docs   (contents, props changed)
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Clients/Beroe/Beroe/IndexerClient.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Indexer/ICollectionIndexerService.cs

Modified: trunk/banshee/src/Clients/Beroe/Beroe/IndexerClient.cs
==============================================================================
--- trunk/banshee/src/Clients/Beroe/Beroe/IndexerClient.cs	(original)
+++ trunk/banshee/src/Clients/Beroe/Beroe/IndexerClient.cs	Thu Sep 11 21:54:51 2008
@@ -112,8 +112,9 @@
         public void RebootWhenFinished (string [] args)
         {
             lock (this) {
-                Log.Debug ("Banshee will be started when the indexer finishes");
+                Log.Debug ("Banshee will be started when the indexer finishes. Notifying indexer that it should hurry!");
                 reboot_args = args;
+                ServiceManager.Get<CollectionIndexerService> ().RequestCleanupAndShutdown ();
             }
         }
         

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 21:54:51 2008
@@ -49,6 +49,7 @@
         private int open_indexers;
         
         public event Hyena.Action CollectionChanged;
+        public event Hyena.Action CleanupAndShutdown;
         
         private Hyena.Action shutdown_handler;
         public Hyena.Action ShutdownHandler {
@@ -209,6 +210,14 @@
             }
         }
         
+        public void RequestCleanupAndShutdown ()
+        {
+            Hyena.Action handler = CleanupAndShutdown;
+            if (handler != null) {
+                handler ();
+            }
+        }
+        
         private void OnCollectionChanged ()
         {
             Hyena.Action handler = CollectionChanged;

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 21:54:51 2008
@@ -37,6 +37,8 @@
     public interface ICollectionIndexerService : IService, IDBusExportable
     {
         event Hyena.Action CollectionChanged;
+        event Hyena.Action CleanupAndShutdown;
+        
         void Hello ();
         void Shutdown ();
         ObjectPath CreateIndexer ();

Added: trunk/banshee/src/generate-dbus-docs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/generate-dbus-docs	Thu Sep 11 21:54:51 2008
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+files=$(grep -ERl '^[\t ]+\[Interface.*\("org.banshee' Core/* | grep -v .svn)
+
+for file in $files; do 
+	start_at=$(grep -En '^namespace {1}.*' $file | head -n1 | cut -f1 -d:)
+	echo "<h4><a href=\"http://svn.gnome.org/svn/banshee/trunk/banshee/src/$file\";>$file</a></h4>"
+	echo "<pre>"
+	tail -n+$start_at < $file | tail -n+3 | head -n-1 | sed -r 's,^[ ]{4},,g'
+	echo "</pre>"
+done
+



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