Net::FreeDB2::Connection::HTTP - FreeDB/CDDB concrete connection class using the HTTP protocol
See Net::FreeDB2::Connection.
Net::FreeDB2::Connection::HTTP is a concrete FreeDB/CDDB connection class that uses the HTTP protocol to connect to FreeDB/CDDB servers.
Net::FreeDB2::Connection::HTTP
FreeDB/CDDB
Creates a new Net::FreeDB2::Connection::HTTP object. Throws a Error::Simple exception if a mandatory option is missing.
Error::Simple
See Net::FreeDB2::Connection for allowed/mandatory options for OPT_HASH_REF. Additionally the follwoing option is allowed:
OPT_HASH_REF
The FreeDB/CDDB cgi path. Defaults to ~cddb/cddb.cgi.
~cddb/cddb.cgi
hello is not supported under HTTP. This method does not do anything.
hello
Issues an lscat command on the FreeDB/CDDB database. Returns an ARRAY with available categories. Throws an Error::Simple exception if no connection is made, if the instanciation of an HTTP::Request object fails or if the HTTP request fails. Also, exceptions from mkHello () or mkUrlBase () may be thrown if an exceptional situation occurs.
lscat
ARRAY
HTTP::Request
mkHello ()
mkUrlBase ()
Queries the FreeDB/CDDB database using ENTRY which is a Net::FreeDB2::Entry object. Returns a Net::FreeDB2::Response::Query object. Throws an Error::Simple exception if no connection is made, if the instanciation of an HTTP::Request object fails or if the HTTP request fails. Also, exceptions from mkHello () or mkUrlBase () may be thrown if an exceptional situation occurs.
ENTRY
Net::FreeDB2::Entry
Net::FreeDB2::Response::Query
Reads an entry from the FreeDB/CDDB database using MATCH which is a Net::FreeDB2::Match object. Returns a Net::FreeDB2::Response::Read object. Throws an Error::Simple exception if no connection is made, if the instanciation of an HTTP::Request object fails or if the HTTP request fails. Also, exceptions from mkHello () or mkUrlBase () may be thrown if an exceptional situation occurs.
MATCH
Net::FreeDB2::Match
Net::FreeDB2::Response::Read
Quote from CDDBPROTO: 'All CDDBP commands are supported under HTTP, except for "cddb hello", "cddb write", "proto" and "quit".' Therefor this method only throws an Error::Simple exception.
Issues an log command on the FreeDB/CDDB database. TO BE IMPLEMENTED
log
Issues an motd command on the FreeDB/CDDB database. Returns an ARRAY containing the motd lines. Throws an Error::Simple exception if no connection is made, if the instanciation of an HTTP::Request object fails or if the HTTP request fails. Also, exceptions from mkHello () or mkUrlBase () may be thrown if an exceptional situation occurs.
motd
Issues an discid command on the FreeDB/CDDB database using the Net::FreeDB2::Entry object ENTRY. Returns the discid as calculated by FreeDB/CDDB. Throws an Error::Simple exception if no connection is made, if the instanciation of an HTTP::Request object fails or if the HTTP request fails. Also, exceptions from mkHello () or mkUrlBase () may be thrown if an exceptional situation occurs.
discid
Issues an proto command on the FreeDB/CDDB database. TO BE IMPLEMENTED
proto
Issues an sites command on the FreeDB/CDDB database. Returns an ARRAY with sites. Throws an Error::Simple exception if no connection is made, if the instanciation of an HTTP::Request object fails or if the HTTP request fails. Also, exceptions from mkHello () or mkUrlBase () may be thrown if an exceptional situation occurs.
sites
Issues an stat command on the FreeDB/CDDB database. TO BE IMPLEMENTED
stat
Issues an ver command on the FreeDB/CDDB database. TO BE IMPLEMENTED
ver
Issues an update command on the FreeDB/CDDB database. TO BE IMPLEMENTED
update
Issues an whom command on the FreeDB/CDDB database. TO BE IMPLEMENTED
whom
Connects to the FreeDB/CDDB database. Throws an Error::Simple exception if the instanciation of the LWP::UserAgent (which BTW forms the actiual connection) object fails.
LWP::UserAgent
Makes a FreeDB/CDDB HTTP hello string for uasage by other FreeDB/CDDB command methods and returns it. Throws an Error::Simple exception if client name, client version, client host or client user not set.
Makes a HTTP mase URL string for uasage by other FreeDB/CDDB command methods and returns it. Throws an Error::Simple exception if FreeDB/CDDB host or FreeDB/CDDB cgi not set.
Set the FreeDB/CDDB cgi (e.g. ~cddb/cddb.cgi) attribute. VALUE is the value.
VALUE
Returns the FreeDB/CDDB cgi attribute.
Net::FreeDB2::Entry, Net::FreeDB2::Match, Net::FreeDB2::Response, Net::FreeDB2::Response::Query and Net::FreeDB2::Response::Read
Not all FreeDB/CDDB commands are implemented (yet).
First development: September 2002
Vincenzo Zocca <Vincenzo@Zocca.com>
Copyright 2002, Vincenzo Zocca.
This file is part of the Net::FreeDB2 module hierarchy for Perl by Vincenzo Zocca.
Net::FreeDB2
The Net::FreeDB2 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 Net::FreeDB2 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 Net::FreeDB2 module hierarchy; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
To install Net::FreeDB2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::FreeDB2
CPAN shell
perl -MCPAN -e shell install Net::FreeDB2
For more information on module installation, please visit the detailed CPAN module installation guide.