libmusicbrainz4
4.0.3
|
00001 /* -------------------------------------------------------------------------- 00002 00003 libmusicbrainz4 - Client library to access MusicBrainz 00004 00005 Copyright (C) 2011 Andrew Hawkins 00006 00007 This file is part of libmusicbrainz4. 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of v2 of the GNU Lesser General Public 00011 License as published by the Free Software Foundation. 00012 00013 libmusicbrainz4 is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this library. If not, see <http://www.gnu.org/licenses/>. 00020 00021 $Id$ 00022 00023 ----------------------------------------------------------------------------*/ 00024 00025 #ifndef _MUSICBRAINZ4_RECORDING_H 00026 #define _MUSICBRAINZ4_RECORDING_H 00027 00028 #include <string> 00029 #include <iostream> 00030 00031 namespace MusicBrainz4 00032 { 00033 class CRecording; 00034 } 00035 00036 #include "musicbrainz4/Entity.h" 00037 #include "musicbrainz4/ReleaseList.h" 00038 #include "musicbrainz4/PUIDList.h" 00039 #include "musicbrainz4/ISRCList.h" 00040 #include "musicbrainz4/RelationList.h" 00041 #include "musicbrainz4/TagList.h" 00042 #include "musicbrainz4/UserTagList.h" 00043 00044 #include "musicbrainz4/xmlParser.h" 00045 00046 namespace MusicBrainz4 00047 { 00048 class CRecordingPrivate; 00049 00050 class CArtistCredit; 00051 class CRating; 00052 class CUserRating; 00053 00054 class CRecording: public CEntity 00055 { 00056 public: 00057 CRecording(const XMLNode& Node=XMLNode::emptyNode()); 00058 CRecording(const CRecording& Other); 00059 CRecording& operator =(const CRecording& Other); 00060 virtual ~CRecording(); 00061 00062 virtual CRecording *Clone(); 00063 00064 std::string ID() const; 00065 std::string Title() const; 00066 int Length() const; 00067 std::string Disambiguation() const; 00068 CArtistCredit *ArtistCredit() const; 00069 CReleaseList *ReleaseList() const; 00070 CPUIDList *PUIDList() const; 00071 CISRCList *ISRCList() const; 00072 00084 LIBMB4_DEPRECATED(MusicBrainz4::CRecording::RelationListList) CRelationList *RelationList() const; 00085 CRelationListList *RelationListList() const; 00086 CTagList *TagList() const; 00087 CUserTagList *UserTagList() const; 00088 CRating *Rating() const; 00089 CUserRating *UserRating() const; 00090 00091 virtual std::ostream& Serialise(std::ostream& os) const; 00092 static std::string GetElementName(); 00093 00094 protected: 00095 virtual void ParseAttribute(const std::string& Name, const std::string& Value); 00096 virtual void ParseElement(const XMLNode& Node); 00097 00098 private: 00099 void Cleanup(); 00100 00101 CRecordingPrivate * const m_d; 00102 }; 00103 } 00104 00105 #endif