libmusicbrainz3
3.0.2
|
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 * $Id: track.h 8794 2007-01-18 23:37:36Z luks $ 00021 */ 00022 00023 #ifndef __MUSICBRAINZ3_TRACK_H__ 00024 #define __MUSICBRAINZ3_TRACK_H__ 00025 00026 #include <string> 00027 #include <musicbrainz3/musicbrainz.h> 00028 #include <musicbrainz3/entity.h> 00029 00030 namespace MusicBrainz 00031 { 00032 00033 class Artist; 00034 00051 class MB_API Track : public Entity 00052 { 00053 public: 00054 00061 Track(const std::string &id = std::string(), 00062 const std::string &title = std::string()); 00063 00067 virtual ~Track(); 00068 00080 std::string getTitle() const; 00081 00089 void setTitle(const std::string &title); 00090 00096 Artist *getArtist(); 00097 00103 void setArtist(Artist *artist); 00104 00110 int getDuration() const; 00111 00117 void setDuration(const int duration); 00118 00128 ReleaseList &getReleases(); 00129 00139 int getNumReleases() const; 00140 00150 Release *getRelease(int index); 00151 00157 void addRelease(Release *release); 00158 00171 int getReleasesOffset() const; 00172 00180 void setReleasesOffset(const int offset); 00181 00193 int getReleasesCount() const; 00194 00202 void setReleasesCount(const int count); 00203 00204 private: 00205 00206 class TrackPrivate; 00207 TrackPrivate *d; 00208 }; 00209 00210 } 00211 00212 #endif 00213