summaryrefslogtreecommitdiffstats
path: root/src/metadata/tagengine.h
blob: e21a48cafa51b566b559ae2b195e0ce89aca2e61 (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


#ifndef TAGENGINE_H
#define TAGENGINE_H

#include <qstring.h>
#include <qstringlist.h>

/**
 * @short All metainformation can be stored in this class
 * @author Daniel Faust <[email protected]>
 * @version 0.3
 */
class TagData
{
public:
    /**
     * Constructor
     */
    TagData( const QString& _artist = QString::null, const QString& _composer = QString::null,
             const QString& _album = QString::null, const QString& _title = QString::null,
             const QString& _genre = QString::null, const QString& _comment = QString::null,
             int _track = 0, int _disc = 0, int _year = 0,
             int _length = 0, int _fileSize = 0, int _bitrate = 0, int _samplingRate = 0 );

    /**
     * Destructor
     */
    virtual ~TagData();

    /** The tags */
    QString artist;
    QString composer;
    QString album;
    QString title;
    QString genre;
    QString comment;
    int track;
    int disc;
    int year;
    float track_gain;
    float album_gain;

    /** The technical information */
    int length;
    int fileSize;
    int bitrate;
    int samplingRate;
};


/**
 * @short Manages everything that has something to do with tags
 * @author Daniel Faust <[email protected]>
 * @version 0.3
 */
class TagEngine
{
public:
    /**
     * Constructor
     */
    TagEngine();

    /**
     * Destructor
     */
    virtual ~TagEngine();

    /** A list of all genre */
    QStringList genreList;

    TagData* readTags( const QString& file );
    bool writeTags( const QString& file, TagData* tagData );

//     bool canWrite( QString format ); // NOTE no const because this string is being modyfied
};

#endif // TAGENGINE_H