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


On Mittwoch, 14. Juli 2021 16:52:53 CEST Andrei Borzenkov via networkmanager-
list wrote:

Probably there is a fundamental misunderstanding regaring the concept on

You have object which has properties. When properties change, you get
signal *from this object*. If you want to monitor for connectivity
changes, you need to monitor active connection.

The examples/python/dbus/ in NM source tree does precisely
that - it monitors for connectivity changes on current connection.

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

If you want to monitor overall connectivity, you need to monitor main
/o/f/NM object.

This is, what I did before NetworkManager's PropertiesChanged signal got 
My problem is to understand, what path and what interface I have to use in 
this part of my code, after the PropertiesChanged signal moved from 
NetworkManager to DBus:

my $busobjpath = "org.freedesktop.NetworkManager";
my $busif = "org.freedesktop.DBus.Properties";
my $oBUSIF = $oBUSSVC->get_object( $busobjpath, $busif ) || die $!;
  "PropertiesChanged", sub {
    &{ \&onPropertiesChanged }( @_ )
  } || die $!;

The original code now tells me

no signal PropertiesChanged in interface org.freedesktop.NetworkManager at /
usr/lib/perl5/vendor_perl/5.32.1/x86_64-linux-thread-multi/Net/DBus/Binding/ line 420.

which seemed clear to me, because it got deprecated.

Thx and bye.

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