From 0d4f995750dc61413421bf2f6ac6651f4e2abc8e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 1 Oct 2012 16:17:04 +0000 Subject: rename 'hal_dn' as 'dn' since we no longuer use Hal --- lib/Hal/Cdroms.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Hal/Cdroms.pm b/lib/Hal/Cdroms.pm index 53bcba4..454a67e 100644 --- a/lib/Hal/Cdroms.pm +++ b/lib/Hal/Cdroms.pm @@ -44,7 +44,7 @@ Access cdroms through HAL and D-Bus. =cut # internal constant -my $hal_dn = 'org.freedesktop.UDisks'; +my $dn = 'org.freedesktop.UDisks'; =head2 Hal::Cdroms->new @@ -59,7 +59,7 @@ sub new { require Net::DBus; require Net::DBus::Reactor; # must be done before line below: my $dbus = Net::DBus->system; - my $service = $dbus->get_service($hal_dn); + my $service = $dbus->get_service($dn); bless { dbus => $dbus, service => $service }, $class; } @@ -74,7 +74,7 @@ sub list { my ($o) = @_; my $manager = $o->{service}->get_object("/org/freedesktop/UDisks", - $hal_dn); + $dn); grep { _GetProperty(_get_device($o, $_), 'DeviceIsOpticalDisc') } @{$manager->EnumerateDevices}; @@ -88,7 +88,7 @@ Return the mount point associated to the C, or undef it is not mounted sub _get_udisks_device { my ($o, $hal_path) = @_; - $o->{service}->get_object($hal_path, "$hal_dn.Device"); + $o->{service}->get_object($hal_path, "$dn.Device"); } sub _get_device { @@ -98,7 +98,7 @@ sub _get_device { sub _get_volume { my ($o, $hal_path) = @_; - $o->{service}->get_object($hal_path, "$hal_dn.Device.Volume"); + $o->{service}->get_object($hal_path, "$dn.Device.Volume"); } sub _GetProperty { @@ -249,7 +249,7 @@ sub wait_for_insert { return if $o->list; - _reactor_wait($o->{dbus}, $hal_dn, $o_timeout, sub { + _reactor_wait($o->{dbus}, $dn, $o_timeout, sub { my ($msg) = @_; my $path; return unless member($msg->get_member, 'DeviceChanged', 'DeviceAdded') && ($path = ($msg->get_args_list)[0]); @@ -269,7 +269,7 @@ You can give an optional timeout in milliseconds. sub wait_for_mounted { my ($o, $o_timeout) = @_; - _reactor_wait($o->{dbus}, $hal_dn, $o_timeout, sub { + _reactor_wait($o->{dbus}, $dn, $o_timeout, sub { my ($msg) = @_; $msg->get_member eq 'PropertyModified' or return; -- cgit v1.2.1