aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Hal/Cdroms.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-01 16:17:04 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-01 16:17:04 +0000
commit0d4f995750dc61413421bf2f6ac6651f4e2abc8e (patch)
tree72817d42888473de71a3407e02ddcf0199548278 /lib/Hal/Cdroms.pm
parent85e43162dee6ef61d14698c9f2c669af0847e558 (diff)
downloadperl-Hal-Cdroms-0d4f995750dc61413421bf2f6ac6651f4e2abc8e.tar
perl-Hal-Cdroms-0d4f995750dc61413421bf2f6ac6651f4e2abc8e.tar.gz
perl-Hal-Cdroms-0d4f995750dc61413421bf2f6ac6651f4e2abc8e.tar.bz2
perl-Hal-Cdroms-0d4f995750dc61413421bf2f6ac6651f4e2abc8e.tar.xz
perl-Hal-Cdroms-0d4f995750dc61413421bf2f6ac6651f4e2abc8e.zip
rename 'hal_dn' as 'dn' since we no longuer use Hal
Diffstat (limited to 'lib/Hal/Cdroms.pm')
-rw-r--r--lib/Hal/Cdroms.pm14
1 files 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<hal_path>, 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;