libmusicbrainz3 3.0.3
|
00001 /* 00002 * MusicBrainz -- The Internet music metadatabase 00003 * 00004 * Copyright (C) 2006 Lukas Lalinsky 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 * 00020 * 00021 */ 00022 00023 #ifndef __MUSICBRAINZ3_MUSICBRAINZ_H__ 00024 #define __MUSICBRAINZ3_MUSICBRAINZ_H__ 00025 00026 #include <musicbrainz3/defines.h> 00027 00028 #include <exception> 00029 #include <string> 00030 00031 namespace MusicBrainz 00032 { 00033 00034 class MB_API Exception : public std::exception 00035 { 00036 public: 00037 Exception(const std::string &msg = std::string()) : msg(msg) {} 00038 virtual ~Exception() throw() {} 00039 const char *what() const throw() { return msg.c_str(); } 00040 private: 00041 std::string msg; 00042 }; 00043 00044 class MB_API ValueError : public Exception 00045 { 00046 public: 00047 ValueError(const std::string &msg = std::string()) : Exception(msg) {} 00048 }; 00049 00053 static const std::string VARIOUS_ARTISTS_ID = "http://musicbrainz.org/artist/89ad4ac3-39f7-470e-963a-56509c546377"; 00054 00058 static const std::string NS_MMD_1 = "http://musicbrainz.org/ns/mmd-1.0#"; 00059 00063 static const std::string NS_REL_1 = "http://musicbrainz.org/ns/rel-1.0#"; 00064 00068 static const std::string NS_EXT_1 = "http://musicbrainz.org/ns/ext-1.0#"; 00069 00070 } 00071 00072 #endif