libmusicbrainz3  3.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
release.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: release.h 9191 2007-06-20 19:55:32Z luks $
21  */
22 
23 #ifndef __MUSICBRAINZ3_RELEASE_H__
24 #define __MUSICBRAINZ3_RELEASE_H__
25 
26 #include <string>
28 #include <musicbrainz3/entity.h>
29 #include <musicbrainz3/lists.h>
30 
31 namespace MusicBrainz
32 {
33 
34  class Artist;
35 
47  class MB_API Release : public Entity
48  {
49  public:
50 
51  static const std::string TYPE_NONE;
52 
53  static const std::string TYPE_ALBUM;
54  static const std::string TYPE_SINGLE;
55  static const std::string TYPE_EP;
56  static const std::string TYPE_COMPILATION;
57  static const std::string TYPE_SOUNDTRACK;
58  static const std::string TYPE_SPOKENWORD;
59  static const std::string TYPE_INTERVIEW;
60  static const std::string TYPE_AUDIOBOOK;
61  static const std::string TYPE_LIVE;
62  static const std::string TYPE_REMIX;
63  static const std::string TYPE_OTHER;
64 
65  static const std::string TYPE_OFFICIAL;
66  static const std::string TYPE_PROMOTION;
67  static const std::string TYPE_BOOTLEG;
68  static const std::string TYPE_PSEUDO_RELEASE;
69 
76  Release(const std::string &id = std::string(),
77  const std::string &title = std::string());
78 
82  ~Release();
83 
95  std::string getTitle() const;
96 
104  void setTitle(const std::string &title);
105 
120  std::string getTextLanguage() const;
121 
129  void setTextLanguage(const std::string &language);
130 
144  std::string getTextScript() const;
145 
153  void setTextScript(const std::string &script);
154 
160  Artist *getArtist();
161 
167  void setArtist(Artist *artist);
168 
177  std::string getAsin() const;
178 
186  void setAsin(const std::string &asin);
187 
195  TrackList &getTracks();
196 
206  int getNumTracks() const;
207 
219  Track *getTrack(int index);
220 
233  int getTracksOffset() const;
234 
242  void setTracksOffset(const int offset);
243 
255  int getTracksCount() const;
256 
264  void setTracksCount(const int count);
265 
277  DiscList &getDiscs();
278 
288  int getNumDiscs() const;
289 
301  Disc *getDisc(int index);
302 
312  ReleaseEventList &getReleaseEvents();
313 
323  int getNumReleaseEvents() const;
324 
336  ReleaseEvent *getReleaseEvent(int index);
337 
343  void setTypes(const std::vector<std::string> &types);
344 
352  std::vector<std::string> &getTypes();
353 
359  int getNumTypes() const;
360 
373  std::string getType(int index) const;
374 
375  private:
376 
377  class ReleasePrivate;
378  ReleasePrivate *d;
379  };
380 
381 }
382 
383 #endif
384