Re: org.freedesktop.NetworkManager.Settings.PropertiesChanged deprecated

On Mittwoch, 14. Juli 2021 19:47:42 CEST Andrei Borzenkov via networkmanager-
list wrote:

yes, but because I also need to monitor VPN changes, I have to monitor
/o/f/ NM.

In your original mail you only said "monitor connectivity" so anything
is just guesswork.

Sorry, connectivity also includes VPNs for me.

I do not see any reference to object here so I have no idea what this
code does. The following certainly works

def properties_changed(interface_name, changed_properties,
    print (interface_name, changed_properties, invalidated_properties)

bus = dbus.SystemBus()
my $oBUS = Net::DBus->system || die $!;

obj = bus.get_object("org.freedesktop.NetworkManager",
my $nm = "org.freedesktop.NetworkManager";
my $oNMSVC = $oBUS->get_service( $nm ) || die $!;

iface = dbus.Interface(obj, "org.freedesktop.DBus.Properties")
my $busobjpath = "/org/freedesktop/DBus/Properties";
my $oBUSIF = $oNMSVC->get_object( $busobjpath );

iface.connect_to_signal("PropertiesChanged", properties_changed)
  "PropertiesChanged", sub {
    &{ \&dbnm_onNMPropertiesChanged }( $oNMSVC, @_ );

-> no signal with name 'PropertiesChanged' is exported in object '/org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]