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



On Donnerstag, 15. Juli 2021 06:45:06 CEST Andrei Borzenkov via 
networkmanager-list wrote:
[...]
#!/usr/bin/perl -w

use strict;

use Data::Dumper;
$Data::Dumper::Sortkeys = 1;
$Data::Dumper::Indent = 1;
use Net::DBus;
use Net::DBus::Dumper;
use Net::DBus::Reactor;

my $oBUS = Net::DBus->system || die $!;
my $nm = "org.freedesktop.NetworkManager";
my $oNM = $oBUS->get_service( $nm ) || die $!;
my $nmobjpath = "/org/freedesktop/NetworkManager";
my $nmif = "org.freedesktop.NetworkManager";
my $oNMIF = $oNM->get_object( $nmobjpath, $nmif ) || die $!;

$nmobjpath = "/org/freedesktop/NetworkManager/Settings";
$nmif = "org.freedesktop.NetworkManager.Settings";
my $oNMIFS = $oNM->get_object( $nmobjpath, $nmif ) || die $!;

$oNMIF->connect_to_signal(

  "PropertiesChanged", sub {
  
    &{ \&dbnm_onNMPropertiesChanged }( $oNM, $oNMIF, $oNMIFS, @_ );
  
  }

);
my $reactor = Net::DBus::Reactor->main() || die $!;
$reactor->run() || die $!;

sub dbnm_onNMPropertiesChanged {

  my( $oNM, $oNMIF, $oNMIFS, $props ) = @_;
  print "\n- props -\n", Dumper( $props ), "\n--\n";

}

NM PropertiesChanged and D-Bus
org.freedesktop.DBus.Properties.PropertiesChanged have different
signatures. You are dumping interface name, not properties dictionary.

I am not sure, I understand this:
The example above is the one for NetworkManager's PropertiesChanged signal.
It worked perfectly as long as this signal existed.

Besides that, what does "signature" mean in this context? Different 
parameters?

Bye.
Michael.




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