InfoSys::FreeDB::Connection::CDDBP - FreeDB CDDBP connection
require InfoSys::FreeDB; require InfoSys::FreeDB::Entry; # Read entry from the default CD device my $entry = InfoSys::FreeDB::Entry->new_from_cdparanoia(); # Create a CDDBP connection my $fact = InfoSys::FreeDB->new(); my $conn = $fact->create_connection( { client_name => 'testing-InfoSys::FreeDB', client_version => $InfoSys::FreeDB::VERSION, protocol => 'CDDBP', } ); # Query FreeDB my $res_q = $conn->query( $entry ); scalar( $res_q->get_match() ) || die 'no matches found for the disck in the default CD-Rom drive'; # Read the first match my $res_r = $conn->read( ( $res_q->get_match() )[0] ); # Write the entry to STDERR use IO::Handle; my $fh = IO::Handle->new_from_fd( fileno(STDERR), 'w' ); $res_r->get_entry()->write_fh( $fh );
FreeDB CDDBP connection
InfoSys::FreeDB::Connection::CDDBP is the CDDBP implementation of the InfoSys::FreeDB::Connection abstract class.
InfoSys::FreeDB::Connection::CDDBP
InfoSys::FreeDB::Connection
Creates a new InfoSys::FreeDB::Connection::CDDBP object. OPT_HASH_REF is a hash reference used to pass initialization options. OPT_HASH_REF is mandatory. On error an exception Error::Simple is thrown.
OPT_HASH_REF
Error::Simple
Options for OPT_HASH_REF may include:
sign_on_response
Passed to set_sign_on_response().
Options for OPT_HASH_REF inherited through package InfoSys::FreeDB::Connection may include:
client_host
Passed to set_client_host(). Mandatory option.
client_name
Passed to set_client_name(). Mandatory option.
client_user
Passed to set_client_user(). Mandatory option.
client_version
Passed to set_client_version(). Mandatory option.
freedb_host
Passed to set_freedb_host(). Mandatory option.
freedb_port
Passed to set_freedb_port(). Mandatory option.
proto_level
Passed to set_proto_level(). Defaults to 1.
proxy_host
Passed to set_proxy_host().
proxy_passwd
Passed to set_proxy_passwd().
proxy_port
Passed to set_proxy_port(). Defaults to 8080.
proxy_user
Passed to set_proxy_user().
This method is an implementation from package InfoSys::FreeDB::Connection. Connects the object to the FreeDB information service using the object's attributes. A hello commend is sent out, the protocol level is queried and set to the highest level available. On error an exception Error::Simple is thrown.
hello
This method is inherited from package InfoSys::FreeDB::Connection. Issues a discid command on the FreeDB database. ENTRY is a InfoSys::FreeDB::Entry object. On error an exception Error::Simple is thrown.
discid
ENTRY
InfoSys::FreeDB::Entry
This method is overloaded from package InfoSys::FreeDB::Connection. Disconnects the object from the FreeDB information service.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the connecting client host.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the connecting client name.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the connecting client user.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the connecting client version.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the FreeDB host.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the FreeDB port.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the current protocol level.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the proxy host to use.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the proxy password to use.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the proxy port to use.
This method is inherited from package InfoSys::FreeDB::Connection. Returns the proxy user name to use.
Returns the sign-on response.
Sends a hello command to the FreeDB server. Returns a InfoSys::FreeDB::Response::Hello object. On error an exception Error::Simple is thrown.
InfoSys::FreeDB::Response::Hello
This method is inherited from package InfoSys::FreeDB::Connection. Issues a log command on the FreeDB database. TO BE SPECIFIED
log
This method is inherited from package InfoSys::FreeDB::Connection. Issues an lscat command on the FreeDB database. Returns a InfoSys::FreeDB::Response::LsCat object. On error an exception Error::Simple is thrown.
lscat
InfoSys::FreeDB::Response::LsCat
This method is inherited from package InfoSys::FreeDB::Connection. Issues an motd command on the FreeDB database. Returns InfoSys::FreeDB::Response::Motd object. On error an exception Error::Simple is thrown.
motd
InfoSys::FreeDB::Response::Motd
This method is an implementation from package InfoSys::FreeDB::Connection. Issues a proto command on the FreeDB database. If LEVEL is not specified, the protocol level is queried. If LEVEL is specified it is used to set the protocol level. Returns InfoSys::FreeDB::Response::Proto object. On error an exception Error::Simple is thrown.
proto
LEVEL
InfoSys::FreeDB::Response::Proto
This method is inherited from package InfoSys::FreeDB::Connection. Queries the FreeDB database. ENTRY is a InfoSys::FreeDB::Entry object. Returns a InfoSys::FreeDB::Response::Query object. On error an exception Error::Simple is thrown.
InfoSys::FreeDB::Response::Query
This method is an implementation from package InfoSys::FreeDB::Connection. Issues a quit command on the FreeDB database and disconnects. Returns InfoSys::FreeDB::Response::Quit object. On error an exception Error::Simple is thrown.
quit
InfoSys::FreeDB::Response::Quit
This method is inherited from package InfoSys::FreeDB::Connection. Reads an entry from the FreeDB database. MATCH is a InfoSys::FreeDB::Match object. Returns a InfoSys::FreeDB::Response::Match object. On error an exception Error::Simple is thrown.
MATCH
InfoSys::FreeDB::Match
InfoSys::FreeDB::Response::Match
This method is inherited from package InfoSys::FreeDB::Connection. Set the connecting client host. VALUE is the value. VALUE may not be undef. On error an exception Error::Simple is thrown.
VALUE
undef
This method is inherited from package InfoSys::FreeDB::Connection. Set the connecting client name. VALUE is the value. VALUE may not be undef. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Set the connecting client user. VALUE is the value. VALUE may not be undef. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Set the connecting client version. VALUE is the value. VALUE may not be undef. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Set the FreeDB host. VALUE is the value. VALUE may not be undef. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Set the FreeDB port. VALUE is the value. VALUE may not be undef. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Set the current protocol level. VALUE is the value. Default value at initialization is 1. On error an exception Error::Simple is thrown.
1
This method is inherited from package InfoSys::FreeDB::Connection. Set the proxy host to use. VALUE is the value. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Set the proxy password to use. VALUE is the value. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Set the proxy port to use. VALUE is the value. Default value at initialization is 8080. On error an exception Error::Simple is thrown.
8080
This method is inherited from package InfoSys::FreeDB::Connection. Set the proxy user name to use. VALUE is the value. On error an exception Error::Simple is thrown.
Set the sign-on response. VALUE is the value. On error an exception Error::Simple is thrown.
This method is inherited from package InfoSys::FreeDB::Connection. Issues a sites command on the FreeDB database. Returns a InfoSys::FreeDB::Response::Sites object. On error an exception Error::Simple is thrown.
sites
InfoSys::FreeDB::Response::Sites
This method is inherited from package InfoSys::FreeDB::Connection. Issues a stat command on the FreeDB database. Returns a InfoSys::FreeDB::Response::Stat object. On error an exception Error::Simple is thrown.
stat
InfoSys::FreeDB::Response::Stat
This method is an implementation from package InfoSys::FreeDB::Connection. THIS METHOD IS NOT YET IMPLEMENTED Issues a update command on the FreeDB database. TO BE SPECIFIED_
update
This method is inherited from package InfoSys::FreeDB::Connection. Issues a ver command on the FreeDB database. Returns a InfoSys::FreeDB::Response::Ver object. On error an exception Error::Simple is thrown.
ver
InfoSys::FreeDB::Response::Ver
This method is inherited from package InfoSys::FreeDB::Connection. Issues a whom command on the FreeDB database. Returns a InfoSys::FreeDB::Response::Whom object. On error an exception Error::Simple is thrown.
whom
InfoSys::FreeDB::Response::Whom
This method is an implementation from package InfoSys::FreeDB::Connection. THIS METHOD IS NOT YET TESTED Writes an entry to the FreeDB database. ENTRY is a InfoSys::FreeDB::Entry object. CATEGORY is a valid FreeDB category. Returns a InfoSys::FreeDB::Response::Write::1 object in the case an error occurred in the first pass of the writing. Otherwise a InfoSys::FreeDB::Response::Write::2 object is returned. On error an exception Error::Simple is thrown._
CATEGORY
InfoSys::FreeDB::Response::Write::1
InfoSys::FreeDB::Response::Write::2
InfoSys::FreeDB, InfoSys::FreeDB::Connection, InfoSys::FreeDB::Connection::HTTP, InfoSys::FreeDB::Entry, InfoSys::FreeDB::Entry::Track, InfoSys::FreeDB::Match, InfoSys::FreeDB::Response, InfoSys::FreeDB::Response::DiscId, InfoSys::FreeDB::Response::Hello, InfoSys::FreeDB::Response::LsCat, InfoSys::FreeDB::Response::Motd, InfoSys::FreeDB::Response::Proto, InfoSys::FreeDB::Response::Query, InfoSys::FreeDB::Response::Quit, InfoSys::FreeDB::Response::Read, InfoSys::FreeDB::Response::SignOn, InfoSys::FreeDB::Response::Sites, InfoSys::FreeDB::Response::Stat, InfoSys::FreeDB::Response::Ver, InfoSys::FreeDB::Response::Whom, InfoSys::FreeDB::Response::Write::1, InfoSys::FreeDB::Response::Write::2, InfoSys::FreeDB::Site
None known (yet.)
First development: September 2003 Last update: December 2003
Vincenzo Zocca
Copyright 2003 by Vincenzo Zocca
This file is part of the InfoSys::FreeDB module hierarchy for Perl by Vincenzo Zocca.
InfoSys::FreeDB
The InfoSys::FreeDB module hierarchy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
The InfoSys::FreeDB module hierarchy 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with the InfoSys::FreeDB module hierarchy; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
To install InfoSys::FreeDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm InfoSys::FreeDB
CPAN shell
perl -MCPAN -e shell install InfoSys::FreeDB
For more information on module installation, please visit the detailed CPAN module installation guide.