Re: org.freedesktop.NetworkManager.Settings.PropertiesChanged deprecated
- From: Andrei Borzenkov <arvidjaar gmail com>
- To: networkmanager-list gnome org
- Subject: Re: org.freedesktop.NetworkManager.Settings.PropertiesChanged deprecated
- Date: Wed, 14 Jul 2021 20:47:42 +0300
On 14.07.2021 19:58, mh mike franken de wrote:
Hi,
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
my
side.
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/create-bond.py 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/
NM.
In your original mail you only said "monitor connectivity" so anything
is just guesswork.
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
deprecated.
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 $!;
$oBUSIF->connect_to_signal(
"PropertiesChanged", sub {
&{ \&onPropertiesChanged }( @_ )
} || die $!;
}
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,
invalidated_properties):
print (interface_name, changed_properties, invalidated_properties)
bus = dbus.SystemBus()
obj = bus.get_object("org.freedesktop.NetworkManager",
"/org/freedesktop/NetworkManager")
iface = dbus.Interface(obj, "org.freedesktop.DBus.Properties")
iface.connect_to_signal("PropertiesChanged", properties_changed)
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/
Introspector.pm line 420.
which seemed clear to me, because it got deprecated.
Thx and bye.
Michael.
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]