public ConnectionManager() { SystemConnectionManager = new DBusObject<IConnectionManager> (SystemBus, SettingsObjectPath); //SystemConnectionManager.BusObject.NewConnection += OnConnectionAdded; UserConnectionManager = new DBusObject<IConnectionManager> (UserBus, SettingsObjectPath); //UserConnectionManager.BusObject.NewConnection += OnConnectionAdded; UserConnections = new List<NetworkConnection> (); SystemConnections = new List<NetworkConnection> (); UpdateConnections (); //this workaround is necessary because NM emits bad signals, multiple times with bad data. GLib.Timeout.Add (1000*60*5, delegate { UpdateConnections(); return true; }); }
public bool Visit(string path, XElement nodeXml) { var interfaces = nodeXml.Elements("interface") .Select(i => i.Attribute("name").Value) .Where(i => !s_skipInterfaces.Contains(i)); if (interfaces.Any()) { var o = new DBusObject() { Path = path, Interfaces = interfaces.OrderBy(s => s).ToList() }; Objects.Add(o); } return true; }