aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;