4 template<
typename t_values>
5 void operator() (
const char * p_name,
const t_values & p_values) {
7 for(
typename t_values::const_iterator iter = p_values.first(); iter.is_valid(); ++iter) {
19 template<
typename t_values>
20 void operator() (
const char * p_name,
const t_values & p_values) {
21 if (p_values.get_count() > 0) {
24 for(
typename t_values::const_iterator iter = p_values.first(); iter.is_valid(); ++iter) {
42 t_content
const &
content()
const {
return m_data;}
44 void add(
const char * p_name,
const char * p_value,
t_size p_value_len = ~0) {
46 _add(p_name).insert_last()->set_string(p_value,p_value_len);
50 void remove(
const char * p_name) {
51 m_data.remove(p_name);
53 void set(
const char * p_name,
const char * p_value,
t_size p_value_len = ~0) {
55 t_entry & entry = _add(p_name);
57 entry.
insert_last()->set_string(p_value,p_value_len);
60 t_entry &
add(
const char * p_name) {
66 if (!m_data.query_ptr(name, e))
return;
70 const char * v = *iter;
77 if (!m_data.query_ptr(name, e))
return;
81 deduplicate(
"album artist");
82 deduplicate(
"publisher");
83 keep_one(
"totaltracks");
84 keep_one(
"totaldiscs");
99 from_info_overwrite(p_info);
103 from_info_overwrite(p_info);
114 for(
t_size metawalk = 0, metacount = p_info.
meta_get_count(); metawalk < metacount; ++metawalk ) {
116 if (valuecount > 0) {
119 for(
t_size valuewalk = 0; valuewalk < valuecount; ++valuewalk) {
128 static const char cmp[] =
"itunescompilation";
129 if (m_data.have_item(cmp)) {
131 if (!m_data.have_item(
"album artist")) add(
"album artist",
"Various Artists");
136 t_entry &
_add(
const char * p_name) {
137 return m_data.find_or_add(p_name);
bool add_item_check(t_param const &item)
Returns true when the list has been altered, false when the item was already present before...
bool format_track_gain(char p_buffer[text_buffer_size]) const
void info(const char *p_message)
virtual t_size meta_enum_value_count(t_size p_index) const =0
Retrieves count of values in metadata entry of specified index. The value is always equal to or great...
Differences between chain_list_v2_t<> and old chain_list_t<>: Iterators pointing to removed items as...
virtual const char * meta_enum_value(t_size p_index, t_size p_value_number) const =0
Retrieves specified value from specified metadata entry. Return value is a null-terminated UTF-8 enco...
static const replaygain_info replaygain_info_invalid
void meta_add_value(t_size p_index, const char *p_value)
bool format_album_peak(char p_buffer[text_buffer_size]) const
Structure containing ReplayGain scan results from some playable object, also providing various helper...
bool info_set_replaygain(const char *p_name, const char *p_value)
t_size __meta_add_unsafe(const char *p_name, const char *p_value)
Unsafe - does not check whether the field already exists and will result in duplicates if it does - c...
void remove(const_iterator const &p_iter)
Main interface class for information about some playable object.
virtual t_size meta_get_count() const =0
Retrieves count of metadata entries.
bool format_track_peak(char p_buffer[text_buffer_size]) const
virtual void set_replaygain(const replaygain_info &p_info)=0
Sets ReplayGain information.
bool format_album_gain(char p_buffer[text_buffer_size]) const
static bool g_is_valid_field_name(const char *p_name, t_size p_length=pfc_infinite)
virtual replaygain_info get_replaygain() const =0
Retrieves ReplayGain information.
PFC_NORETURN void SHARED_EXPORT uBugCheck()
char t_text_buffer[text_buffer_size]
virtual const char * meta_enum_name(t_size p_index) const =0
Retrieves the name of metadata entry of specified index. Return value is a null-terminated UTF-8 enco...