コード例 #1
0
ファイル: Client.cs プロジェクト: SyaskiMasyaski/banshee
        public static void Main()
        {
            if (!DBusConnection.ConnectTried)
            {
                DBusConnection.Connect();
            }

            if (!DBusConnection.Enabled)
            {
                Error("All commands ignored, DBus support is disabled");
                return;
            }
            else if (!DBusConnection.ApplicationInstanceAlreadyRunning)
            {
                Error("Banshee does not seem to be running");
                return;
            }

            command    = DBusServiceManager.FindInstance <DBusCommandService> ("/DBusCommandService");
            hide_field = ApplicationContext.CommandLine.Contains("hide-field");

            bool present = HandlePlayerCommands() && !ApplicationContext.CommandLine.Contains("indexer");

            HandleWindowCommands(present);
            HandleFiles();
        }
コード例 #2
0
        public CollectionIndexerService()
        {
            DBusConnection.Connect("CollectionIndexer");

            ServiceManager.SourceManager.SourceAdded   += OnSourceAdded;
            ServiceManager.SourceManager.SourceRemoved += OnSourceRemoved;

            foreach (Source source in ServiceManager.SourceManager.Sources)
            {
                MonitorLibrary(source as LibrarySource);
            }
        }