/** * Copyright (c) 2005 Claudio Bustos * This code is hereby licensed for public consumption under the * GNU GPL v2. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * Archivo de cabecera para la extensión rb_cdio */ #ifndef __RUBY_CDIO_H__ #define __RUBY_CDIO_H__ #include #include #include #include #include #include #include #include #include #define GET_CDIO(self,p) \ CdIo* p; \ Data_Get_Struct(self, CdIo, p); \ if(NULL==p) {rb_raise(rb_eException,"No pointer to CdIo");} #undef CDIO_DRIVE_CAP_WRITE_DVD #define CDIO_DRIVE_CAP_WRITE_DVD ( \ CDIO_DRIVE_CAP_WRITE_DVD_R \ | CDIO_DRIVE_CAP_WRITE_DVD_PR \ | CDIO_DRIVE_CAP_WRITE_DVD_RAM \ | CDIO_DRIVE_CAP_WRITE_DVD_RW \ | CDIO_DRIVE_CAP_WRITE_DVD_RPW \ ) VALUE mCdIo; VALUE cCdIoCd; VALUE cCdIoTrack; VALUE cCdIoTrackIso9660; VALUE cCdIoTracks; int Init_CdIo(); // Metodos para el módulo CdIo VALUE rb_cdio_open(int argc, VALUE * argv, VALUE module); VALUE rb_cdio_get_devices(int argc, VALUE * argv, VALUE module); // ok VALUE rb_cdio_get_default_device(int argc, VALUE * argv, VALUE module); // ok, // con // cero // argumentos VALUE rb_cdio_get_drive_cap_dev(VALUE module, VALUE device); VALUE rb_cdio_driver_describe(VALUE module, VALUE driver); VALUE rb_cdio_track_format_describe(VALUE module, VALUE track_format); // creado // por // mi VALUE rb_cdio_track_type_describe(VALUE module, VALUE track_type); // creada // por // mi VALUE rb_cdio_discmode_describe(VALUE module, VALUE discmode); // creada // por // mi VALUE rb_cdio_is_binfile(VALUE module, VALUE name); VALUE rb_cdio_is_cuefile(VALUE module, VALUE name); VALUE rb_cdio_is_nrg(VALUE module, VALUE name); VALUE rb_cdio_is_tocfile(VALUE module, VALUE name); VALUE rb_cdio_is_device(int argc, VALUE * argv, VALUE module); /* * Métodos para clase CdIo::Cd */ VALUE rb_cdio_cd_new(int argc, VALUE * argv, VALUE class); // ok VALUE rb_cdio_cd_init(VALUE class, VALUE device, VALUE driver); // ok VALUE rb_cdio_cd_get_tracks(VALUE class); // ok VALUE rb_cdio_cd_get_first_track(VALUE class); // ok VALUE rb_cdio_cd_get_arg(VALUE obj, VALUE arg); VALUE rb_cdio_cd_is_cd(VALUE obj); VALUE rb_cdio_cd_is_dvd(VALUE obj); VALUE rb_cdio_cd_get_freedb(VALUE obj); VALUE rb_cdio_cd_get_drive_cap(VALUE obj); VALUE rb_cdio_cd_get_hwinfo(VALUE obj); VALUE rb_cdio_cd_close(VALUE obj); VALUE rb_cdio_cd_get_cdtext(VALUE obj); /** * Métodos para la clase CdIo::Tracks */ VALUE rb_cdio_tracks_init(VALUE obj, VALUE cd); VALUE rb_cdio_tracks_each(int argc, VALUE * argv, VALUE obj); VALUE rb_cdio_tracks_diff(VALUE obj, VALUE a, VALUE b); VALUE rb_cdio_tracks_index(VALUE obj, VALUE index); /* * Métodos para la clase CdIo::Track */ VALUE rb_cdio_track_init(VALUE obj, VALUE oCd, VALUE i_track); // ok VALUE rb_cdio_track_green(VALUE obj); // ok VALUE rb_cdio_track_get_cdtext(VALUE obj); /* TrackIso9660*/ VALUE rb_cdio_trackiso9660_init(VALUE obj, VALUE oCd, VALUE i_track); /* * Métodos comunes */ VALUE get_cap(cdio_drive_read_cap_t * read_cap, cdio_drive_write_cap_t * write_cap, cdio_drive_misc_cap_t * misc_cap); VALUE get_cdtext(const cdtext_t * cdtext); VALUE get_track(VALUE obj, track_t i); #endif