Ardour
9.0-pre0-582-g084a23a80d
session_metadata.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2008-2015 Paul Davis <paul@linuxaudiosystems.com>
3
* Copyright (C) 2009 Carl Hetherington <carl@carlh.net>
4
* Copyright (C) 2009 David Robillard <d@drobilla.net>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program 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
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program; if not, write to the Free Software Foundation, Inc.,
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
*/
20
21
#pragma once
22
23
#include <string>
24
25
#include <map>
26
#include <utility>
27
28
#include "
pbd/statefuldestructible.h
"
29
#include "
pbd/xml++.h
"
30
31
#include "
ardour/libardour_visibility.h
"
32
33
namespace
ARDOUR
{
34
39
class
LIBARDOUR_API
SessionMetadata
:
public
PBD::StatefulDestructible
40
{
41
public
:
42
//singleton instance:
43
static
SessionMetadata
*
Metadata
() {
if
(_metadata == NULL) _metadata =
new
SessionMetadata
();
return
_metadata; }
44
45
SessionMetadata
();
46
~SessionMetadata
();
47
48
/*** Accessing ***/
49
std::string
description
()
const
;
50
51
std::string
comment
()
const
;
52
std::string
copyright
()
const
;
53
std::string
isrc
()
const
;
54
uint32_t
year
()
const
;
55
56
std::string
grouping
()
const
;
57
std::string
barcode
()
const
;
58
std::string
title
()
const
;
59
std::string
subtitle
()
const
;
60
61
std::string
artist
()
const
;
62
std::string
album_artist
()
const
;
63
std::string
lyricist
()
const
;
64
std::string
composer
()
const
;
65
std::string
conductor
()
const
;
66
std::string
remixer
()
const
;
67
std::string
arranger
()
const
;
68
std::string
engineer
()
const
;
69
std::string
producer
()
const
;
70
std::string
dj_mixer
()
const
;
71
std::string
mixer
()
const
;
72
73
std::string
album
()
const
;
74
std::string
compilation
()
const
;
75
std::string
disc_subtitle
()
const
;
76
uint32_t
disc_number
()
const
;
77
uint32_t
total_discs
()
const
;
78
uint32_t
track_number
()
const
;
79
uint32_t
total_tracks
()
const
;
80
81
std::string
genre
()
const
;
82
83
std::string
instructor
()
const
;
84
std::string
course
()
const
;
85
86
std::string
user_name
()
const
;
87
std::string
user_email
()
const
;
88
std::string
user_web
()
const
;
89
std::string
organization
()
const
;
90
std::string
country
()
const
;
91
92
/*** Editing ***/
93
void
set_description
(
const
std::string &);
94
void
set_comment
(
const
std::string &);
95
void
set_copyright
(
const
std::string &);
96
void
set_isrc
(
const
std::string &);
97
void
set_year
(uint32_t);
98
99
void
set_grouping
(
const
std::string &);
100
void
set_barcode
(
const
std::string &);
101
void
set_title
(
const
std::string &);
102
void
set_subtitle
(
const
std::string &);
103
104
void
set_artist
(
const
std::string &);
105
void
set_album_artist
(
const
std::string &);
106
void
set_lyricist
(
const
std::string &);
107
void
set_composer
(
const
std::string &);
108
void
set_conductor
(
const
std::string &);
109
void
set_remixer
(
const
std::string &);
110
void
set_arranger
(
const
std::string &);
111
void
set_engineer
(
const
std::string &);
112
void
set_producer
(
const
std::string &);
113
void
set_dj_mixer
(
const
std::string &);
114
void
set_mixer
(
const
std::string &);
115
116
void
set_album
(
const
std::string &);
117
void
set_compilation
(
const
std::string &);
118
void
set_disc_subtitle
(
const
std::string &);
119
void
set_disc_number
(uint32_t);
120
void
set_total_discs
(uint32_t);
121
void
set_track_number
(uint32_t);
122
void
set_total_tracks
(uint32_t);
123
124
void
set_genre
(
const
std::string &);
125
126
void
set_instructor
(
const
std::string &);
127
void
set_course
(
const
std::string &);
128
129
void
set_user_name
(
const
std::string &);
130
void
set_user_email
(
const
std::string &);
131
void
set_user_web
(
const
std::string &);
132
void
set_organization
(
const
std::string &);
133
void
set_country
(
const
std::string &);
134
135
/*** Export ***/
136
typedef
std::map<std::string,std::string>
MetaDataMap
;
137
void
av_export_tag
(
MetaDataMap
&)
const
;
138
139
/*** Serialization ***/
140
XMLNode
&
get_state
()
const
;
//serializes stuff in the map, to be stored in session file
141
XMLNode
&
get_user_state
();
//serializes stuff in the user_map, to be stored in user's config file
142
int
set_state
(
const
XMLNode
&,
int
version_num);
143
144
private
:
145
146
static
SessionMetadata
*
_metadata
;
//singleton instance
147
148
typedef
std::pair<std::string, std::string>
Property
;
149
typedef
std::map<std::string, std::string>
PropertyMap
;
150
PropertyMap
map
;
151
PropertyMap
user_map
;
152
153
XMLNode
*
get_xml
(
const
std::string &
name
)
const
;
154
155
std::string
get_value
(
const
std::string &
name
)
const
;
156
uint32_t
get_uint_value
(
const
std::string &
name
)
const
;
157
158
void
set_value
(
const
std::string &
name
,
const
std::string & value);
159
void
set_value
(
const
std::string &
name
, uint32_t value);
160
};
161
162
}
// namespace ARDOUR
163
ARDOUR::SessionMetadata
Definition:
session_metadata.h:40
ARDOUR::SessionMetadata::set_disc_subtitle
void set_disc_subtitle(const std::string &)
ARDOUR::SessionMetadata::set_copyright
void set_copyright(const std::string &)
ARDOUR::SessionMetadata::SessionMetadata
SessionMetadata()
ARDOUR::SessionMetadata::disc_number
uint32_t disc_number() const
ARDOUR::SessionMetadata::track_number
uint32_t track_number() const
ARDOUR::SessionMetadata::disc_subtitle
std::string disc_subtitle() const
ARDOUR::SessionMetadata::set_composer
void set_composer(const std::string &)
ARDOUR::SessionMetadata::mixer
std::string mixer() const
ARDOUR::SessionMetadata::genre
std::string genre() const
ARDOUR::SessionMetadata::country
std::string country() const
ARDOUR::SessionMetadata::set_total_tracks
void set_total_tracks(uint32_t)
ARDOUR::SessionMetadata::set_engineer
void set_engineer(const std::string &)
ARDOUR::SessionMetadata::set_remixer
void set_remixer(const std::string &)
ARDOUR::SessionMetadata::user_web
std::string user_web() const
ARDOUR::SessionMetadata::set_isrc
void set_isrc(const std::string &)
ARDOUR::SessionMetadata::subtitle
std::string subtitle() const
ARDOUR::SessionMetadata::album
std::string album() const
ARDOUR::SessionMetadata::set_user_email
void set_user_email(const std::string &)
ARDOUR::SessionMetadata::av_export_tag
void av_export_tag(MetaDataMap &) const
ARDOUR::SessionMetadata::set_organization
void set_organization(const std::string &)
ARDOUR::SessionMetadata::set_subtitle
void set_subtitle(const std::string &)
ARDOUR::SessionMetadata::set_track_number
void set_track_number(uint32_t)
ARDOUR::SessionMetadata::set_instructor
void set_instructor(const std::string &)
ARDOUR::SessionMetadata::set_album_artist
void set_album_artist(const std::string &)
ARDOUR::SessionMetadata::set_genre
void set_genre(const std::string &)
ARDOUR::SessionMetadata::~SessionMetadata
~SessionMetadata()
ARDOUR::SessionMetadata::set_compilation
void set_compilation(const std::string &)
ARDOUR::SessionMetadata::set_state
int set_state(const XMLNode &, int version_num)
ARDOUR::SessionMetadata::set_title
void set_title(const std::string &)
ARDOUR::SessionMetadata::copyright
std::string copyright() const
ARDOUR::SessionMetadata::title
std::string title() const
ARDOUR::SessionMetadata::set_artist
void set_artist(const std::string &)
ARDOUR::SessionMetadata::Property
std::pair< std::string, std::string > Property
Definition:
session_metadata.h:148
ARDOUR::SessionMetadata::engineer
std::string engineer() const
ARDOUR::SessionMetadata::Metadata
static SessionMetadata * Metadata()
Definition:
session_metadata.h:43
ARDOUR::SessionMetadata::set_arranger
void set_arranger(const std::string &)
ARDOUR::SessionMetadata::lyricist
std::string lyricist() const
ARDOUR::SessionMetadata::set_country
void set_country(const std::string &)
ARDOUR::SessionMetadata::comment
std::string comment() const
ARDOUR::SessionMetadata::_metadata
static SessionMetadata * _metadata
Definition:
session_metadata.h:146
ARDOUR::SessionMetadata::compilation
std::string compilation() const
ARDOUR::SessionMetadata::set_comment
void set_comment(const std::string &)
ARDOUR::SessionMetadata::set_album
void set_album(const std::string &)
ARDOUR::SessionMetadata::get_user_state
XMLNode & get_user_state()
ARDOUR::SessionMetadata::set_producer
void set_producer(const std::string &)
ARDOUR::SessionMetadata::set_lyricist
void set_lyricist(const std::string &)
ARDOUR::SessionMetadata::composer
std::string composer() const
ARDOUR::SessionMetadata::MetaDataMap
std::map< std::string, std::string > MetaDataMap
Definition:
session_metadata.h:136
ARDOUR::SessionMetadata::conductor
std::string conductor() const
ARDOUR::SessionMetadata::map
PropertyMap map
Definition:
session_metadata.h:150
ARDOUR::SessionMetadata::set_disc_number
void set_disc_number(uint32_t)
ARDOUR::SessionMetadata::get_xml
XMLNode * get_xml(const std::string &name) const
ARDOUR::SessionMetadata::grouping
std::string grouping() const
ARDOUR::SessionMetadata::set_value
void set_value(const std::string &name, uint32_t value)
ARDOUR::SessionMetadata::get_state
XMLNode & get_state() const
ARDOUR::SessionMetadata::description
std::string description() const
ARDOUR::SessionMetadata::total_discs
uint32_t total_discs() const
ARDOUR::SessionMetadata::instructor
std::string instructor() const
ARDOUR::SessionMetadata::dj_mixer
std::string dj_mixer() const
ARDOUR::SessionMetadata::set_user_web
void set_user_web(const std::string &)
ARDOUR::SessionMetadata::get_uint_value
uint32_t get_uint_value(const std::string &name) const
ARDOUR::SessionMetadata::arranger
std::string arranger() const
ARDOUR::SessionMetadata::barcode
std::string barcode() const
ARDOUR::SessionMetadata::get_value
std::string get_value(const std::string &name) const
ARDOUR::SessionMetadata::set_description
void set_description(const std::string &)
ARDOUR::SessionMetadata::set_user_name
void set_user_name(const std::string &)
ARDOUR::SessionMetadata::course
std::string course() const
ARDOUR::SessionMetadata::set_conductor
void set_conductor(const std::string &)
ARDOUR::SessionMetadata::set_value
void set_value(const std::string &name, const std::string &value)
ARDOUR::SessionMetadata::total_tracks
uint32_t total_tracks() const
ARDOUR::SessionMetadata::year
uint32_t year() const
ARDOUR::SessionMetadata::set_mixer
void set_mixer(const std::string &)
ARDOUR::SessionMetadata::album_artist
std::string album_artist() const
ARDOUR::SessionMetadata::set_year
void set_year(uint32_t)
ARDOUR::SessionMetadata::set_dj_mixer
void set_dj_mixer(const std::string &)
ARDOUR::SessionMetadata::producer
std::string producer() const
ARDOUR::SessionMetadata::user_email
std::string user_email() const
ARDOUR::SessionMetadata::user_name
std::string user_name() const
ARDOUR::SessionMetadata::organization
std::string organization() const
ARDOUR::SessionMetadata::set_barcode
void set_barcode(const std::string &)
ARDOUR::SessionMetadata::user_map
PropertyMap user_map
Definition:
session_metadata.h:151
ARDOUR::SessionMetadata::artist
std::string artist() const
ARDOUR::SessionMetadata::isrc
std::string isrc() const
ARDOUR::SessionMetadata::set_course
void set_course(const std::string &)
ARDOUR::SessionMetadata::set_grouping
void set_grouping(const std::string &)
ARDOUR::SessionMetadata::PropertyMap
std::map< std::string, std::string > PropertyMap
Definition:
session_metadata.h:149
ARDOUR::SessionMetadata::set_total_discs
void set_total_discs(uint32_t)
ARDOUR::SessionMetadata::remixer
std::string remixer() const
PBD::StatefulDestructible
Definition:
statefuldestructible.h:29
XMLNode
Definition:
xml++.h:114
name
GtkImageIconNameData name
Definition:
gtkimage.h:6
libardour_visibility.h
LIBARDOUR_API
#define LIBARDOUR_API
Definition:
libardour_visibility.h:38
ARDOUR
Definition:
analysis_window.h:44
statefuldestructible.h
xml++.h
libs
ardour
ardour
session_metadata.h
Generated on Wed Dec 25 2024 05:44:47 for Ardour by
1.9.1