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__
24 #include <glibmm/ustring.h>
29 #include <pbd/statefuldestructible.h>
30 #include <pbd/xml++.h>
37 /** Represents metadata associated to a Session
38 * Metadata can be accessed and edited via this class.
39 * Exported files can also be tagged with this data.
41 class SessionMetadata : public PBD::StatefulDestructible
48 ustring comment () const;
49 ustring copyright () const;
50 ustring isrc () const;
51 uint32_t year () const;
53 ustring grouping () const;
54 ustring title () const;
55 ustring subtitle () const;
57 ustring artist () const;
58 ustring album_artist () const;
59 ustring lyricist () const;
60 ustring composer () const;
61 ustring conductor () const;
62 ustring remixer () const;
63 ustring arranger () const;
64 ustring engineer () const;
65 ustring producer () const;
66 ustring dj_mixer () const;
67 ustring mixer () const;
69 ustring album () const;
70 ustring compilation () const;
71 ustring disc_subtitle () const;
72 uint32_t disc_number () const;
73 uint32_t total_discs () const;
74 uint32_t track_number () const;
75 uint32_t total_tracks () const;
77 ustring genre () const;
80 void set_comment (const ustring &);
81 void set_copyright (const ustring &);
82 void set_isrc (const ustring &);
83 void set_year (uint32_t);
85 void set_grouping (const ustring &);
86 void set_title (const ustring &);
87 void set_subtitle (const ustring &);
89 void set_artist (const ustring &);
90 void set_album_artist (const ustring &);
91 void set_lyricist (const ustring &);
92 void set_composer (const ustring &);
93 void set_conductor (const ustring &);
94 void set_remixer (const ustring &);
95 void set_arranger (const ustring &);
96 void set_engineer (const ustring &);
97 void set_producer (const ustring &);
98 void set_dj_mixer (const ustring &);
99 void set_mixer (const ustring &);
101 void set_album (const ustring &);
102 void set_compilation (const ustring &);
103 void set_disc_subtitle (const ustring &);
104 void set_disc_number (uint32_t);
105 void set_total_discs (uint32_t);
106 void set_track_number (uint32_t);
107 void set_total_tracks (uint32_t);
109 void set_genre (const ustring &);
111 /*** Serialization ***/
112 XMLNode & get_state ();
113 int set_state (const XMLNode &);
117 typedef std::pair<ustring, ustring> Property;
118 typedef std::map<ustring, ustring> PropertyMap;
121 XMLNode * get_xml (const ustring & name);
123 ustring get_value (const ustring & name) const;
124 uint32_t get_uint_value (const ustring & name) const;
126 void set_value (const ustring & name, const ustring & value);
127 void set_value (const ustring & name, uint32_t value);
130 } // namespace ARDOUR
132 #endif // __ardour_session_metadata_h__