2 Copyright (C) 2008 Paul Davis
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2 of the License, or (at your option)
10 This program is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_session_metadata_h__
21 #define __ardour_session_metadata_h__
28 #include "pbd/statefuldestructible.h"
29 #include "pbd/xml++.h"
33 /** Represents metadata associated to a Session
34 * Metadata can be accessed and edited via this class.
35 * Exported files can also be tagged with this data.
37 class SessionMetadata : public PBD::StatefulDestructible
44 std::string comment () const;
45 std::string copyright () const;
46 std::string isrc () const;
47 uint32_t year () const;
49 std::string grouping () const;
50 std::string title () const;
51 std::string subtitle () const;
53 std::string artist () const;
54 std::string album_artist () const;
55 std::string lyricist () const;
56 std::string composer () const;
57 std::string conductor () const;
58 std::string remixer () const;
59 std::string arranger () const;
60 std::string engineer () const;
61 std::string producer () const;
62 std::string dj_mixer () const;
63 std::string mixer () const;
65 std::string album () const;
66 std::string compilation () const;
67 std::string disc_subtitle () const;
68 uint32_t disc_number () const;
69 uint32_t total_discs () const;
70 uint32_t track_number () const;
71 uint32_t total_tracks () const;
73 std::string genre () const;
76 void set_comment (const std::string &);
77 void set_copyright (const std::string &);
78 void set_isrc (const std::string &);
79 void set_year (uint32_t);
81 void set_grouping (const std::string &);
82 void set_title (const std::string &);
83 void set_subtitle (const std::string &);
85 void set_artist (const std::string &);
86 void set_album_artist (const std::string &);
87 void set_lyricist (const std::string &);
88 void set_composer (const std::string &);
89 void set_conductor (const std::string &);
90 void set_remixer (const std::string &);
91 void set_arranger (const std::string &);
92 void set_engineer (const std::string &);
93 void set_producer (const std::string &);
94 void set_dj_mixer (const std::string &);
95 void set_mixer (const std::string &);
97 void set_album (const std::string &);
98 void set_compilation (const std::string &);
99 void set_disc_subtitle (const std::string &);
100 void set_disc_number (uint32_t);
101 void set_total_discs (uint32_t);
102 void set_track_number (uint32_t);
103 void set_total_tracks (uint32_t);
105 void set_genre (const std::string &);
107 /*** Serialization ***/
108 XMLNode & get_state ();
109 int set_state (const XMLNode &, int version);
113 typedef std::pair<std::string, std::string> Property;
114 typedef std::map<std::string, std::string> PropertyMap;
117 XMLNode * get_xml (const std::string & name);
119 std::string get_value (const std::string & name) const;
120 uint32_t get_uint_value (const std::string & name) const;
122 void set_value (const std::string & name, const std::string & value);
123 void set_value (const std::string & name, uint32_t value);
126 } // namespace ARDOUR
128 #endif // __ardour_session_metadata_h__