Commit 15e3dea2 authored by Aaron Bockover's avatar Aaron Bockover Committed by Aaron Bockover

Call IndexerService.RegisterCleanupAndShutdown to notify any connected

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/


svn path=/trunk/banshee/; revision=4517
parent c7f3244c
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/
2008-09-11 Aaron Bockover <abock@gnome.org>
* src/Core/Banshee.Services/Banshee.Collection.Indexer/CollectionIndexerService.cs:
......@@ -112,8 +112,9 @@ namespace Beroe
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 ();
}
}
......
......@@ -49,6 +49,7 @@ namespace Banshee.Collection.Indexer
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 @@ namespace Banshee.Collection.Indexer
}
}
public void RequestCleanupAndShutdown ()
{
Hyena.Action handler = CleanupAndShutdown;
if (handler != null) {
handler ();
}
}
private void OnCollectionChanged ()
{
Hyena.Action handler = CollectionChanged;
......
......@@ -37,6 +37,8 @@ namespace Banshee.Collection.Indexer
public interface ICollectionIndexerService : IService, IDBusExportable
{
event Hyena.Action CollectionChanged;
event Hyena.Action CleanupAndShutdown;
void Hello ();
void Shutdown ();
ObjectPath CreateIndexer ();
......
#!/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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment