aboutsummaryrefslogtreecommitdiffstats
path: root/taglib/dsdiff/dsdiffdiintag.h
blob: 0eff545e237f4d6939b8c6c8c1282c098a0bf050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/***************************************************************************
 copyright            : (C) 2016 by Damien Plisson, Audirvana
 email                : damien78@audirvana.com
 ***************************************************************************/

/***************************************************************************
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Lesser General Public License version   *
 *   2.1 as published by the Free Software Foundation.                     *
 *                                                                         *
 *   This library is distributed in the hope that it will be useful, but   *
 *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
 *   Lesser General Public License for more details.                       *
 *                                                                         *
 *   You should have received a copy of the GNU Lesser General Public      *
 *   License along with this library; if not, write to the Free Software   *
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA         *
 *   02110-1301  USA                                                       *
 *                                                                         *
 *   Alternatively, this file is available under the Mozilla Public        *
 *   License Version 1.1.  You may obtain a copy of the License at         *
 *   http://www.mozilla.org/MPL/                                           *
 ***************************************************************************/

#ifndef TAGLIB_DSDIFFDIINTAG_H
#define TAGLIB_DSDIFFDIINTAG_H

#include "tag.h"

namespace TagLib {

  namespace DSDIFF {

    namespace DIIN {

      /*!
       * Tags from the Edited Master Chunk Info
       *
       * Only Title and Artist tags are supported
       */
      class TAGLIB_EXPORT Tag : public TagLib::Tag
      {
      public:
        Tag();
        virtual ~Tag();

        /*!
         * Returns the track name; if no track name is present in the tag
         * String() will be returned.
         */
        String title() const;

        /*!
         * Returns the artist name; if no artist name is present in the tag
         * String() will be returned.
         */
        String artist() const;

        /*!
         * Not supported.  Therefore always returns String().
         */
        String album() const;

        /*!
         * Not supported.  Therefore always returns String().
         */
        String comment() const;

        /*!
         * Not supported.  Therefore always returns String().
         */
        String genre() const;

        /*!
         * Not supported.  Therefore always returns 0.
         */
        unsigned int year() const;

        /*!
         * Not supported.  Therefore always returns 0.
         */
        unsigned int track() const;

        /*!
         * Sets the title to \a title.  If \a title is String() then this
         * value will be cleared.
         */
        void setTitle(const String &title);

        /*!
         * Sets the artist to \a artist.  If \a artist is String() then this
         * value will be cleared.
         */
        void setArtist(const String &artist);

        /*!
         * Not supported and therefore ignored.
         */
        void setAlbum(const String &album);

        /*!
         * Not supported and therefore ignored.
         */
        void setComment(const String &comment);

        /*!
         * Not supported and therefore ignored.
         */
        void setGenre(const String &genre);

        /*!
         * Not supported and therefore ignored.
         */
        void setYear(unsigned int year);

        /*!
         * Not supported and therefore ignored.
         */
        void setTrack(unsigned int track);

        /*!
         * Implements the unified property interface -- export function.
         * Since the DIIN tag is very limited, the exported map is as well.
         */
        PropertyMap properties() const;

        /*!
         * Implements the unified property interface -- import function.
         * Because of the limitations of the DIIN file tag, any tags besides
         * TITLE and ARTIST, will be
         * returned. Additionally, if the map contains tags with multiple values,
         * all but the first will be contained in the returned map of unsupported
         * properties.
         */
        PropertyMap setProperties(const PropertyMap &);

      private:
        Tag(const Tag &);
        Tag &operator=(const Tag &);

        class TagPrivate;
        TagPrivate *d;
      };
    }
  }
}

#endif