Banshee.ServiceStack.DBusConnection.Connect C# (CSharp) Method

Connect() private static method

private static Connect ( string serviceName, bool init ) : RequestNameReply
serviceName string
init bool
return RequestNameReply
        private static RequestNameReply Connect (string serviceName, bool init)
        {
            connect_tried = true;

            if (init) {
                BusG.Init ();
            }

            string bus_name = MakeBusName (serviceName);
            RequestNameReply name_reply = Bus.Session.RequestName (bus_name);
            Log.DebugFormat ("Bus.Session.RequestName ('{0}') replied with {1}", bus_name, name_reply);
            return name_reply;
        }

Same methods

DBusConnection::Connect ( ) : bool
DBusConnection::Connect ( string serviceName ) : bool

Usage Example

Beispiel #1
0
        public static void Run()
        {
#if WIN32
            // There are two sets of environement variables we need to impact with our LANG.
            // refer to : http://article.gmane.org/gmane.comp.gnu.mingw.user/8272
            var    lang_code = CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;
            string env       = String.Concat("LANG=", lang_code);
            Environment.SetEnvironmentVariable("LANG", lang_code);
            _putenv(env);
#endif

            Catalog.Init(Application.InternalName, System.IO.Path.Combine(
                             Hyena.Paths.InstalledApplicationDataRoot, "locale"));

            if (!DBusConnection.ConnectTried)
            {
                DBusConnection.Connect();
            }

            ServiceManager.Run();

            ServiceManager.SourceManager.AddSource(new MusicLibrarySource(), true);
            ServiceManager.SourceManager.AddSource(new VideoLibrarySource(), false);
            ServiceManager.SourceManager.LoadExtensionSources();
        }
All Usage Examples Of Banshee.ServiceStack.DBusConnection::Connect