コード例 #1
0
        public void DelayedInitialize ()
        {
            // require for bundled version of NDesk.DBus
            NDesk.DBus.BusG.Init ();

            conn_map = new Dictionary <string, Connection> ();
            source_map = new Dictionary <string, IDictionary <Contact, ContactSource>> ();
            
            container = new ContactContainerSource (this);
            ServiceManager.SourceManager.AddSource (container);

            download_manager = new DownloadManagerUi ();
            upload_manager = new UploadManagerUi ();

            try {
                locator = new ConnectionLocator ();
            }
            catch (DBusProxyObjectNotFound e) {
                Log.Error (e.ToString ());
                return;
            }

            foreach (Account account in locator.GetConnections ()) {
                CreateConnection (account);
            }

            locator.ConnectionStatusChanged += OnConnectionStatusChanged;

            try {
                proxy_server = new StreamingHTTPProxyServer ();
                proxy_server.Start ();
            }
            catch (Exception e) {
                Log.Error ("Failed to start Banshee.Telepathy.StreamingHTTPProxyServer");
                Log.Exception (e);
            }

            try {
                streaming_server = new StreamingServer ();
                streaming_server.Start ();
            }
            catch (Exception e) {
                Log.Error ("Failed to start Banshee.Telepathy.StreamingHTTPProxyServer");
                Log.Exception (e);
            }
        }