libmusicbrainz3  3.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
musicbrainz.h
Go to the documentation of this file.
1 /*
2  * MusicBrainz -- The Internet music metadatabase
3  *
4  * Copyright (C) 2006 Lukas Lalinsky
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  * $Id: musicbrainz.h 8466 2006-09-05 08:59:44Z luks $
21  */
22 
23 #ifndef __MUSICBRAINZ3_MUSICBRAINZ_H__
24 #define __MUSICBRAINZ3_MUSICBRAINZ_H__
25 
26 #include <musicbrainz3/defines.h>
27 
28 #include <exception>
29 #include <string>
30 
31 namespace MusicBrainz
32 {
33 
34  class MB_API Exception : public std::exception
35  {
36  public:
37  Exception(const std::string &msg = std::string()) : msg(msg) {}
38  virtual ~Exception() throw() {}
39  const char *what() const throw() { return msg.c_str(); }
40  private:
41  std::string msg;
42  };
43 
44  class MB_API ValueError : public Exception
45  {
46  public:
47  ValueError(const std::string &msg = std::string()) : Exception(msg) {}
48  };
49 
53  static const std::string VARIOUS_ARTISTS_ID = "http://musicbrainz.org/artist/89ad4ac3-39f7-470e-963a-56509c546377";
54 
58  static const std::string NS_MMD_1 = "http://musicbrainz.org/ns/mmd-1.0#";
59 
63  static const std::string NS_REL_1 = "http://musicbrainz.org/ns/rel-1.0#";
64 
68  static const std::string NS_EXT_1 = "http://musicbrainz.org/ns/ext-1.0#";
69 
70 }
71 
72 #endif
static const std::string NS_REL_1
Namespace prefix for relations.
Definition: musicbrainz.h:63
Definition: musicbrainz.h:34
static const std::string VARIOUS_ARTISTS_ID
The ID of the special 'Various Artists' artist.
Definition: musicbrainz.h:53
Exception(const std::string &msg=std::string())
Definition: musicbrainz.h:37
static const std::string NS_EXT_1
Namespace prefix for MusicBrainz extensions.
Definition: musicbrainz.h:68
const char * what() const
Definition: musicbrainz.h:39
virtual ~Exception()
Definition: musicbrainz.h:38
Definition: musicbrainz.h:44
#define MB_API
Definition: defines.h:40
static const std::string NS_MMD_1
Default namespace prefix for all MusicBrainz metadata.
Definition: musicbrainz.h:58
ValueError(const std::string &msg=std::string())
Definition: musicbrainz.h:47