MusicBrainz Namespace Reference


Classes

class  Artist
 Represents an artist. More...
class  ArtistAlias
 Represents an artist alias. More...
class  Disc
 Represents an Audio CD. More...
class  DiscError
 The Audio CD could not be read. More...
class  Entity
 A first-level MusicBrainz class. More...
class  IFactory
 A factory to instantiate classes from the domain model. More...
class  DefaultFactory
 A factory to instantiate classes from the domain model. More...
class  IFilter
 A filter for collections. More...
class  ArtistFilter
 A filter for the artist collection. More...
class  ReleaseFilter
 A filter for the release collection. More...
class  TrackFilter
 A filter for the track collection. More...
class  UserFilter
 A filter for the user collection. More...
class  IIncludes
 An interface implemented by include tag generators. More...
class  ArtistIncludes
 A specification on how much data to return with a track. More...
class  ReleaseIncludes
 A specification on how much data to return with a release. More...
class  TrackIncludes
 A specification on how much data to return with a track. More...
class  IWebService
 An interface all concrete web service classes have to implement. More...
class  Label
 Represents a record label. More...
class  LabelAlias
 Represents a label alias. More...
class  ParseError
 Exception to be thrown if a parse error occurs. More...
class  MbXmlParser
 A parser for the Music Metadata XML format. More...
class  Metadata
 Represents a parsed Music Metadata XML document. More...
class  Exception
class  ValueError
class  Query
 A simple interface to the MusicBrainz web service. More...
class  Relation
 Represents a relation between two Entities. More...
class  Release
 Represents a Release. More...
class  ReleaseEvent
 A release event, indicating where and when a release took place. More...
class  Result
 Represents generic search result. More...
class  ArtistResult
 Represents an artist result. More...
class  ReleaseResult
 Represents an release result. More...
class  TrackResult
 Represents an track result. More...
class  Tag
class  Track
 Represents a track. More...
class  User
 Represents a MusicBrainz user. More...
class  WebServiceError
 A web service error has occurred. More...
class  ConnectionError
 Getting a server connection failed. More...
class  TimeOutError
 Connection to a server timed out. More...
class  ResourceNotFoundError
 No resource with the given ID exists. More...
class  AuthenticationError
 Authentication failed. More...
class  ResponseError
 The returned resource was invalid. More...
class  RequestError
 An invalid request was made. More...
class  WebService
 An interface to the MusicBrainz XML web service via HTTP. More...

Typedefs

typedef std::vector< Artist * > ArtistList
 A vector of pointers to Artist objects.
typedef std::vector
< ArtistAlias * > 
ArtistAliasList
 A vector of pointers to ArtistAlias objects.
typedef std::vector
< ArtistResult * > 
ArtistResultList
 A vector of pointers to ArtistResult objects.
typedef std::vector< Disc * > DiscList
 A vector of pointers to Disc objects.
typedef std::vector< Relation * > RelationList
 A vector of pointers to Relation objects.
typedef std::vector< Release * > ReleaseList
 A vector of pointers to Release objects.
typedef std::vector
< ReleaseEvent * > 
ReleaseEventList
 A vector of pointers to ReleaseEvent objects.
typedef std::vector
< ReleaseResult * > 
ReleaseResultList
 A vector of pointers to ReleaseResult objects.
typedef std::vector< Result * > ResultList
 A vector of pointers to Result objects.
typedef std::vector< Track * > TrackList
 A vector of pointers to Track objects.
typedef std::vector
< TrackResult * > 
TrackResultList
 A vector of pointers to TrackResult objects.
typedef std::vector< User * > UserList
 A vector of pointers to User objects.
typedef std::vector< Tag * > TagList
 A vector of pointers to Tag objects.
typedef std::vector< Label * > LabelList
 A vector of pointers to Label objects.
typedef std::vector< LabelAlias * > LabelAliasList
 A vector of pointers to LabelAlias objects.

Functions

DiscreadDisc (const std::string &deviceName=std::string())
 Reads an Audio CD in the disc drive.
std::string getSubmissionUrl (Disc *disc, const std::string &host="mm.musicbrainz.org", int port=80)
 Returns a URL for adding a disc to the MusicBrainz database.
std::string extractFragment (const std::string &uriStr)
 Extract the fragment part from a URI.
std::string extractUuid (const std::string &uriStr)
 Extract the UUID part from a MusicBrainz identifier.
std::string getCountryName (const std::string &id)
 Returns a country's name based on an ISO-3166 country code.
std::string getScriptName (const std::string &id)
 Returns a script name based on an ISO-15924 code.
std::string getLanguageName (const std::string &id)
 Returns a language name based on an ISO-639-2/T code.
std::string getReleaseTypeName (const std::string &releaseType)
 Returns the name of a release type URI.

Variables

static const std::string VARIOUS_ARTISTS_ID = "http://musicbrainz.org/artist/89ad4ac3-39f7-470e-963a-56509c546377"
 The ID of the special 'Various Artists' artist.
static const std::string NS_MMD_1 = "http://musicbrainz.org/ns/mmd-1.0#"
 Default namespace prefix for all MusicBrainz metadata.
static const std::string NS_REL_1 = "http://musicbrainz.org/ns/rel-1.0#"
 Namespace prefix for relations.
static const std::string NS_EXT_1 = "http://musicbrainz.org/ns/ext-1.0#"
 Namespace prefix for MusicBrainz extensions.


Typedef Documentation

typedef std::vector<ArtistAlias *> MusicBrainz::ArtistAliasList

A vector of pointers to ArtistAlias objects.

typedef std::vector<Artist *> MusicBrainz::ArtistList

A vector of pointers to Artist objects.

A vector of pointers to ArtistResult objects.

typedef std::vector<Disc *> MusicBrainz::DiscList

A vector of pointers to Disc objects.

typedef std::vector<LabelAlias *> MusicBrainz::LabelAliasList

A vector of pointers to LabelAlias objects.

typedef std::vector<Label *> MusicBrainz::LabelList

A vector of pointers to Label objects.

typedef std::vector<Relation *> MusicBrainz::RelationList

A vector of pointers to Relation objects.

A vector of pointers to ReleaseEvent objects.

typedef std::vector<Release *> MusicBrainz::ReleaseList

A vector of pointers to Release objects.

A vector of pointers to ReleaseResult objects.

typedef std::vector<Result *> MusicBrainz::ResultList

A vector of pointers to Result objects.

typedef std::vector<Tag *> MusicBrainz::TagList

A vector of pointers to Tag objects.

typedef std::vector<Track *> MusicBrainz::TrackList

A vector of pointers to Track objects.

typedef std::vector<TrackResult *> MusicBrainz::TrackResultList

A vector of pointers to TrackResult objects.

typedef std::vector<User *> MusicBrainz::UserList

A vector of pointers to User objects.


Function Documentation

std::string MusicBrainz::extractFragment ( const std::string &  uriStr  ) 

Extract the fragment part from a URI.

If uriStr no absolute URI, then it is returned unchanged.

Parameters:
uriStr a string containing an absolute URI
Returns:
a string containing the fragment

std::string MusicBrainz::extractUuid ( const std::string &  uriStr  ) 

Extract the UUID part from a MusicBrainz identifier.

This function takes a MusicBrainz ID (an absolute URI) as the input and returns the UUID part of the URI, thus turning it into a relative URI. If uriStr is empty or a relative URI, then it is returned unchanged.

std::string MusicBrainz::getCountryName ( const std::string &  id  ) 

Returns a country's name based on an ISO-3166 country code.

The country table this function is based on has been modified for MusicBrainz purposes by using the extension mechanism defined in ISO-3166. All IDs are still valid ISO-3166 country codes, but some IDs have been added to include historic countries and some of the country names have been modified to make them better suited for display purposes.

If the country ID is not found, an empty string is returned. This may happen for example, when new countries are added to the MusicBrainz web service which aren't known to this library yet.

Parameters:
id a two-letter upper case string containing an ISO-3166 code
Returns:
: a string containing the country's name

std::string MusicBrainz::getLanguageName ( const std::string &  id  ) 

Returns a language name based on an ISO-639-2/T code.

This function uses a subset of the ISO-639-2/T code table to map language IDs (terminologic, not bibliographic ones!) to names.

Parameters:
id a three-letter upper case string containing an ISO-639-2/T code
Returns:
a string containing the language's name

std::string MusicBrainz::getReleaseTypeName ( const std::string &  releaseType  ) 

Returns the name of a release type URI.

Parameters:
releaseType a string containing a release type URI
Returns:
a string containing a printable name for the release type
See also:
Release

std::string MusicBrainz::getScriptName ( const std::string &  id  ) 

Returns a script name based on an ISO-15924 code.

This function uses a subset of the ISO-15924 code table to map script IDs to names.

Parameters:
id a four-letter string containing an ISO-15924 script code
Returns:
a string containing the script's name

std::string MusicBrainz::getSubmissionUrl ( Disc *  disc,
const std::string &  host = "mm.musicbrainz.org",
int  port = 80 
)

Returns a URL for adding a disc to the MusicBrainz database.

A fully initialized Disc object is needed, as returned by readDisc. A disc object returned by the web service doesn't provide the necessary information.

Note that the created URL is intended for interactive use and points to the MusicBrainz disc submission wizard by default. This method just returns a URL, no network connection is needed. The disc drive isn't used.

Parameters:
disc a fully initialized Disc object
host a string containing a host name
port an integer containing a port number
Returns:
a string containing the submission URL
See also:
readDisc

Disc* MusicBrainz::readDisc ( const std::string &  deviceName = std::string()  ) 

Reads an Audio CD in the disc drive.

This reads a CD's table of contents (TOC) and calculates the MusicBrainz DiscID, which is a 28 character ASCII string. This DiscID can be used to retrieve a list of matching releases from the web service (see MusicBrainz::Query).

Note that an Audio CD has to be in drive for this to work. The deviceName argument may be used to set the device. The default depends on the operating system (on linux, it's "/dev/cdrom"). No network connection is needed for this function.

If the device doesn't exist or there's no valid Audio CD in the drive, a DiscError exception is raised.

Parameters:
deviceName a string containing the CD drive's device name
Returns:
a pointer to Disc object
Exceptions:
DiscError if there was a problem reading the disc


Variable Documentation

const std::string MusicBrainz::NS_EXT_1 = "http://musicbrainz.org/ns/ext-1.0#" [static]

Namespace prefix for MusicBrainz extensions.

const std::string MusicBrainz::NS_MMD_1 = "http://musicbrainz.org/ns/mmd-1.0#" [static]

Default namespace prefix for all MusicBrainz metadata.

const std::string MusicBrainz::NS_REL_1 = "http://musicbrainz.org/ns/rel-1.0#" [static]

Namespace prefix for relations.

const std::string MusicBrainz::VARIOUS_ARTISTS_ID = "http://musicbrainz.org/artist/89ad4ac3-39f7-470e-963a-56509c546377" [static]

The ID of the special 'Various Artists' artist.


Generated on Mon Nov 24 17:06:10 2008 for libmusicbrainz3 by  doxygen 1.5.6