libmusicbrainz3
3.0.2
|
Classes | |
class | Artist |
Represents an artist. More... | |
class | ArtistAlias |
Represents an artist alias. More... | |
class | ArtistFilter |
A filter for the artist collection. More... | |
class | ArtistIncludes |
A specification on how much data to return with a track. More... | |
class | ArtistResult |
Represents an artist result. More... | |
class | AuthenticationError |
Authentication failed. More... | |
class | ConnectionError |
Getting a server connection failed. More... | |
class | DefaultFactory |
A factory to instantiate classes from the domain model. 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 | Exception |
class | IFactory |
A factory to instantiate classes from the domain model. More... | |
class | IFilter |
A filter for collections. More... | |
class | IIncludes |
An interface implemented by include tag generators. 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 | MbXmlParser |
A parser for the Music Metadata XML format. More... | |
class | Metadata |
Represents a parsed Music Metadata XML document. More... | |
class | ParseError |
Exception to be thrown if a parse error occurs. More... | |
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 | ReleaseFilter |
A filter for the release collection. More... | |
class | ReleaseIncludes |
A specification on how much data to return with a release. More... | |
class | ReleaseResult |
Represents an release result. More... | |
class | RequestError |
An invalid request was made. More... | |
class | ResourceNotFoundError |
No resource with the given ID exists. More... | |
class | ResponseError |
The returned resource was invalid. More... | |
class | Result |
Represents generic search result. More... | |
class | Tag |
class | TimeOutError |
Connection to a server timed out. More... | |
class | Track |
Represents a track. More... | |
class | TrackFilter |
A filter for the track collection. More... | |
class | TrackIncludes |
A specification on how much data to return with a track. More... | |
class | TrackResult |
Represents an track result. More... | |
class | User |
Represents a MusicBrainz user. More... | |
class | UserFilter |
A filter for the user collection. More... | |
class | ValueError |
class | WebService |
An interface to the MusicBrainz XML web service via HTTP. More... | |
class | WebServiceError |
A web service error has occurred. More... | |
Typedefs | |
typedef std::vector< Artist * > | ArtistList |
A vector of pointers to Artist objects. More... | |
typedef std::vector< ArtistAlias * > | ArtistAliasList |
A vector of pointers to ArtistAlias objects. More... | |
typedef std::vector< ArtistResult * > | ArtistResultList |
A vector of pointers to ArtistResult objects. More... | |
typedef std::vector< Disc * > | DiscList |
A vector of pointers to Disc objects. More... | |
typedef std::vector< Relation * > | RelationList |
A vector of pointers to Relation objects. More... | |
typedef std::vector< Release * > | ReleaseList |
A vector of pointers to Release objects. More... | |
typedef std::vector< ReleaseEvent * > | ReleaseEventList |
A vector of pointers to ReleaseEvent objects. More... | |
typedef std::vector< ReleaseResult * > | ReleaseResultList |
A vector of pointers to ReleaseResult objects. More... | |
typedef std::vector< Result * > | ResultList |
A vector of pointers to Result objects. More... | |
typedef std::vector< Track * > | TrackList |
A vector of pointers to Track objects. More... | |
typedef std::vector< TrackResult * > | TrackResultList |
A vector of pointers to TrackResult objects. More... | |
typedef std::vector< User * > | UserList |
A vector of pointers to User objects. More... | |
typedef std::vector< Tag * > | TagList |
A vector of pointers to Tag objects. More... | |
typedef std::vector< Label * > | LabelList |
A vector of pointers to Label objects. More... | |
typedef std::vector< LabelAlias * > | LabelAliasList |
A vector of pointers to LabelAlias objects. More... | |
Functions | |
Disc * | readDisc (const std::string &deviceName=std::string()) |
Reads an Audio CD in the disc drive. More... | |
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. More... | |
std::string | extractFragment (const std::string &uriStr) |
Extract the fragment part from a URI. More... | |
std::string | extractUuid (const std::string &uriStr) |
Extract the UUID part from a MusicBrainz identifier. More... | |
std::string | getCountryName (const std::string &id) |
Returns a country's name based on an ISO-3166 country code. More... | |
std::string | getScriptName (const std::string &id) |
Returns a script name based on an ISO-15924 code. More... | |
std::string | getLanguageName (const std::string &id) |
Returns a language name based on an ISO-639-2/T code. More... | |
std::string | getReleaseTypeName (const std::string &releaseType) |
Returns the name of a release type URI. More... | |
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. More... | |
static const std::string | NS_MMD_1 = "http://musicbrainz.org/ns/mmd-1.0#" |
Default namespace prefix for all MusicBrainz metadata. More... | |
static const std::string | NS_REL_1 = "http://musicbrainz.org/ns/rel-1.0#" |
Namespace prefix for relations. More... | |
static const std::string | NS_EXT_1 = "http://musicbrainz.org/ns/ext-1.0#" |
Namespace prefix for MusicBrainz extensions. More... | |
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.
typedef std::vector<ArtistResult *> MusicBrainz::ArtistResultList |
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.
typedef std::vector<ReleaseEvent *> MusicBrainz::ReleaseEventList |
A vector of pointers to ReleaseEvent objects.
typedef std::vector<Release *> MusicBrainz::ReleaseList |
A vector of pointers to Release objects.
typedef std::vector<ReleaseResult *> MusicBrainz::ReleaseResultList |
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.
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.
uriStr | a string containing an absolute URI |
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.
id | a two-letter upper case string containing an ISO-3166 code |
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.
id | a three-letter upper case string containing an ISO-639-2/T code |
std::string MusicBrainz::getReleaseTypeName | ( | const std::string & | releaseType | ) |
Returns the name of a release type URI.
releaseType | a string containing a release type URI |
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.
id | a four-letter string containing an ISO-15924 script code |
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.
disc | a fully initialized Disc object |
host | a string containing a host name |
port | an integer containing a port number |
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.
deviceName | a string containing the CD drive's device name |
DiscError | if there was a problem reading the disc |
|
static |
Namespace prefix for MusicBrainz extensions.
|
static |
Default namespace prefix for all MusicBrainz metadata.
|
static |
Namespace prefix for relations.
|
static |
The ID of the special 'Various Artists' artist.