$Id: README,v 1.5 2002/04/07 13:40:20 moumar Exp $
-----Ruby/FreeDB-----

-- Contributors --

Stephane D'Alu <sdalu@loria.fr> 
  -> Fixed a bug in get_cdrom() on FreeBSD

OGAWA Takaya <t-ogawa@triaez.kaisei.org>
  -> get_cdrom() buffer overrun fixed

-- Changelog --

0.3 => 07/04/2002:	* fetch() replaced by fetch_net() however i created an alias to fetch()
			* fetch_cgi() added
			* discid read-only attribute added
			* free() bug on FreeBSD fixed in get_cdrom()
			  (Thanks to Stephane D'Alu <sdalu@loria.fr>)
			* get_cdrom() buffer overrun fixed 
			  (Thanks to OGAWA Takaya <t-ogawa@triaez.kaisei.org>)

0.2 => 19/01/2002: 	* Big cleaning of code.
		   	* Minimum code ( just the CDROM access ) written in C. Other is in pure Ruby.
			* Module now called 'freedb' instead of 'Freedb'.
			* Deleted specific exceptions. There is only one now (FreedbError).

0.1 => 18/12/2001: 	* Initial version

-- Description --

Ruby/FreeDB is a Ruby library who provide access to cddb/freedb servers. 
You have the possibility to dump the DISCID from a Audio-CD.
You can also be aware of the existence of multiple match of a given DISCID in the database.


-- Installation --

$ ruby extconf.rb
$ make
$ make install


-- Testing --

(insert your audio-cd)
$ ./test.rb

This source is a good example of the utilisation of this class.

-- API --

  **** Exceptions ****

  FreedbError (parent StandardError)     => Error (cd-rom, network or protocol)

  **** Class Freedb ****

    ** Class methods **

      ******
      * new(param = "/dev/cdrom", is_discid? = false) -> aFreedb
      ******

  If "is_discid?" is false, the unique ID of the CD in "param" is dumped.
  Else "param" is considered as a valid freedb discid and is used directly.

  Return an instance of Freedb.

    ** Instance methods **

      ******
      ** fetch_net(server = "us.freedb.org", port = 8880) **
      ******

    Query "server" on port "port" for the current CD.
    Fill the "results" array with multiple results.
  
      ******
      * alias fetch fetch_net
      ******

      ******
      * fetch_cgi(server = "www.freedb.org", port = 80, proxy = nil, proxy_port = nil,
      *		  address = "/~cddb/cddb.cgi")
      ******
    
    Query "server" on port "port" using proxy "proxy" on port "proxy_port" at address "address" using
    CGI (HTTP) method.
    Fill the "results" array with multiple results.
      
      ******
      * get_result(anInteger) -> nil
      ******

    Fill the object with results[anInteger] informations.

      ******
      * results -> anArray
      ******

  Return an array with each possible results returned by the server for this CD-Audio.

      ******
      * discid -> aString
      ******

  Return the complete string used to query the server.

      ******
      * artist -> aString
      ******

  Return the disc's artist.
  
      ******
      * title -> aString
      ******

  Return the disc's title.

      ******
      * tracks -> anArray
      ******

  Return an array of strings containing tracks title.

-- License --

GPL



Guillaume Pierronnet <moumar@netcourrier.com>

