libmusicbrainz3  3.0.3
 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  *
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 
174  ReleaseGroup *getReleaseGroup();
175 
181  void setReleaseGroup(ReleaseGroup *releaseGroup);
182 
191  std::string getAsin() const;
192 
200  void setAsin(const std::string &asin);
201 
209  TrackList &getTracks();
210 
220  int getNumTracks() const;
221 
233  Track *getTrack(int index);
234 
247  int getTracksOffset() const;
248 
256  void setTracksOffset(const int offset);
257 
269  int getTracksCount() const;
270 
278  void setTracksCount(const int count);
279 
291  DiscList &getDiscs();
292 
302  int getNumDiscs() const;
303 
315  Disc *getDisc(int index);
316 
326  ReleaseEventList &getReleaseEvents();
327 
337  int getNumReleaseEvents() const;
338 
350  ReleaseEvent *getReleaseEvent(int index);
351 
357  void setTypes(const std::vector<std::string> &types);
358 
366  std::vector<std::string> &getTypes();
367 
373  int getNumTypes() const;
374 
387  std::string getType(int index) const;
388 
389  private:
390 
391  class ReleasePrivate;
392  ReleasePrivate *d;
393  };
394 
395 }
396 
397 #endif
398