Developping frontends to Burncenter
---------------------------------------

burncenter, starting with version 3, is more than a single program. It is also a Perl module (Burncenter.pm) that provides high-level access to CD burning-related functions.

This document tells about the methods exported by Burncenter:

Miscelleanous:
---------------

 getline($question, [$default])

	This function asks the user for question on standard input. If the users simply press enter, then $default is returned. 
	
 getlinebasedonconfig($question, $configvar, $default)
	This function does the same thing as getline, except that the default answer is based on configuration variable $configvar. If the variable is empty or does not exists, the $default string is used as default.

translatestring($msgid)

	This function returns the translated version of $msgid, or the $msgid if $msgid is not translated.


getconfig($var)

	This function returns the value of $var or an empty string if the variable does not exists.


CD to Disk functions
--------------------

makecdimage()

	This function makes an image of the CD currently in the cdreader and returns the name of this image.

copyalltracks()

	This function dumps all tracks of an Audio CD in a directory. It returns the name of the directory containing the WAVes tracks.

mp3towav()

	This functions converts all WAVes files to MP3s of a given directory. It returns nothing.


CD writing functions
--------------------

burncdimage($image, [$cdrecordflags)

	This functions burns $image on CD, maybe with passing $cdrecordflags on cdrecord's command line.

burnwavfiles($directory) 

	This function burns all WAVes files, in alphabetical order, of the directory $directory. 


CDRW functions
---------------

blankcdrw($type)

	This functions blanks a CDRW. It uses $type (fast, all) as argument. See cdrecord man page for more details.


ISO images
-----------

makefirstisoimage($dir)

	This function creates a Rockridge/Joliet ISO image of $dir and returns the name of this image. It doesn't import any previous session on disc.

makesecondisoimage($dir)

	This function does the same as above, except that it imports previously-written sessions.


Other functions
---------------

checkothersession()

	This function returns 0 if no other session has been written on disc, 1 if a previous session was written. You will typically use this function to know if you want to call makefirstisoimage() or makesecondisoimage().

playlist2dir($playlist)

	This functions read playlist $playlist, and copy all files in the playlist in a directory. Returns the name of the directory containing files.


------------------------------------------------------------------------

Other sources of information:


 * burncenter (the program) sources (/usr/local/bin/burncenter)
 * Burncenter.pm sources



TODO:

 * convert to POD 
 * add examples
 
Author:

 Alexandre Janon <alex14fr@yahoo.fr>



