diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-29 03:28:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-29 03:28:48 +0000 |
commit | 1638144c728d327fe3587ca133efcd1ab347e9ae (patch) | |
tree | c7db208b9e0fd13f729e9f54c77ce61ae978a20a /lib/Hal | |
parent | 108f07d5fa72f4ab678ea28646a6c1fd970c9276 (diff) | |
download | perl-Hal-Cdroms-1638144c728d327fe3587ca133efcd1ab347e9ae.tar perl-Hal-Cdroms-1638144c728d327fe3587ca133efcd1ab347e9ae.tar.gz perl-Hal-Cdroms-1638144c728d327fe3587ca133efcd1ab347e9ae.tar.bz2 perl-Hal-Cdroms-1638144c728d327fe3587ca133efcd1ab347e9ae.tar.xz perl-Hal-Cdroms-1638144c728d327fe3587ca133efcd1ab347e9ae.zip |
(new,list,wait_for_insert,wait_for_mounted) connect to udisks instead of HAL
Diffstat (limited to 'lib/Hal')
-rw-r--r-- | lib/Hal/Cdroms.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Hal/Cdroms.pm b/lib/Hal/Cdroms.pm index 491bfa5..5a8ff38 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.Hal'; +my $hal_dn = 'org.freedesktop.UDisks'; =head2 Hal::Cdroms->new @@ -73,8 +73,8 @@ Returns the list of C<hal_path> of the cdroms (mounted or not). sub list { my ($o) = @_; - my $manager = $o->{hal}->get_object("/org/freedesktop/Hal/Manager", - "$hal_dn.Manager"); + my $manager = $o->{hal}->get_object("/org/freedesktop/UDisks", + $hal_dn); @{$manager->FindDeviceByCapability('volume.disc')}; } @@ -235,7 +235,7 @@ You can give an optional timeout in milliseconds. sub wait_for_insert { my ($o, $o_timeout) = @_; - _reactor_wait($o->{dbus}, "$hal_dn.Manager", $o_timeout, sub { + _reactor_wait($o->{dbus}, $hal_dn, $o_timeout, sub { my ($msg) = @_; $msg->get_member eq 'DeviceAdded' && ($msg->get_args_list)[0]; }); @@ -253,7 +253,7 @@ You can give an optional timeout in milliseconds. sub wait_for_mounted { my ($o, $o_timeout) = @_; - _reactor_wait($o->{dbus}, "$hal_dn.Device", $o_timeout, sub { + _reactor_wait($o->{dbus}, $hal_dn, $o_timeout, sub { my ($msg) = @_; $msg->get_member eq 'PropertyModified' or return; |