X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSDL%2FCdrom.pm;h=3777bd60328c43571ea059daa14002c6fdc4e468;hb=896b04ee008898e1c1edbdd432bedaa8643400dc;hp=1ad24717e21d42329098f0ef245e334b333d6c5f;hpb=084b921f85583af6a5b82572f6a561c94dd2fb5d;p=sdlgit%2FSDL_perl.git diff --git a/lib/SDL/Cdrom.pm b/lib/SDL/Cdrom.pm index 1ad2471..3777bd6 100644 --- a/lib/SDL/Cdrom.pm +++ b/lib/SDL/Cdrom.pm @@ -1,8 +1,31 @@ -# Cdrom.pm +#!/usr/bin/env perl # -# a SDL cdrom manipluation module +# Cdrom.pm # -# Copyright (C) 2000,2002 David J. Goehrig +# Copyright (C) 2005 David J. Goehrig +# +# ------------------------------------------------------------------------------ +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# ------------------------------------------------------------------------------ +# +# Please feel free to send questions, suggestions or improvements to: +# +# David J. Goehrig +# dgoehrig@cpan.org # package SDL::Cdrom; @@ -33,7 +56,7 @@ sub DESTROY { SDL::CDClose($$self); } -sub CD_NUM_DRIVES { +sub cd_num_drives { return SDL::CDNumDrives(); } @@ -109,102 +132,3 @@ sub current_frame { } 1; - -__END__; - -=pod - - - -=head1 NAME - -SDL::Cdrom - a SDL perl extension for managing CD-ROM drives - -=head1 SYNOPSIS - - use SDL::Cdrom; - $cdrom = SDL::Cdrom->new(0); - $cdrom->play(); - -=head1 EXPORTS - -=over 4 - -=item * - -C. - -=back - -=head1 DESCRIPTION - -Create a new SDL::Cdrom object. The passed $id is the number of the drive, -whereas 0 is the first drive etc. - - use SDL::Cdrom; - my $drive => SDL::Cdrom->new($id); - -=head1 METHODS - -=head2 CD_NUM_DRIVES() - -Returns the number of CD-ROM drives present. - -=head2 name() - -Returns the system dependent name of the CD-ROM device. - -=head2 status() - -Return the status of the drive. - -=head2 play() - -Play a track. - -=head2 pause() - -Pause the playing. - -=head2 resume() - -Resume the playing. - -=head2 stop() - -Stop the playing. - -=head2 eject() - -Eject the medium in the drive. - -=head2 id() - -Return the ID of the drive. - -=head2 num_tracks() - -Return the number of tracks on the medium. - -=head2 track() - -Returns the track description - -=head2 current() - -Return the current played track number. - -=head2 current_frame() - -Return the current frame. - -=head1 AUTHORS - -David J. Goehrig -Documentation by Tels . - -=head1 SEE ALSO - -L L L. - -=cut