public static void Main() { if (!DBusConnection.Enabled) { Log.Error("All commands ignored, DBus support is disabled"); return; } else if (ApplicationContext.CommandLine.Contains("client")) { ActAsRemoteClient(); return; } else if (DBusConnection.ApplicationInstanceAlreadyRunning) { Log.Error("Banshee is already running"); return; } else if (DBusConnection.NameHasOwner("CollectionIndexer")) { Log.Error("Another indexer is already running"); return; } Log.Information("Indexer client started"); Startup(); }
public static void Main() { Application.InitializePaths(); if (CheckHelpVersion()) { return; } if (DBusConnection.ApplicationInstanceAlreadyRunning) { // DBus Command/Query/File Proxy Client BootClient("Halie"); NotifyStartupComplete(); } else if (DBusConnection.NameHasOwner("CollectionIndexer")) { // Tell the existing indexer to start Banshee when it's done IIndexerClient indexer = DBusServiceManager.FindInstance <IIndexerClient> ("CollectionIndexer", "/IndexerClient"); try { indexer.Hello(); indexer.RebootWhenFinished(Environment.GetCommandLineArgs()); Log.Warning("The Banshee indexer is currently running. Banshee will be started when the indexer finishes."); } catch (Exception e) { Log.Exception("CollectionIndexer found on the Bus, but doesn't say Hello", e); } } else if (ApplicationContext.CommandLine.Contains("indexer")) { // Indexer Client BootClient("Beroe"); } else if (ApplicationContext.CommandLine.Contains("client")) { BootClient(Path.GetFileNameWithoutExtension(ApplicationContext.CommandLine["client"])); } else { if (PlatformDetection.IsMeeGo) { BootClient("MeeGo"); } else { BootClient("Nereid"); } } }