File indexing completed on 2025-02-23 04:28:48

0001 /****************************************************************************************
0002  * Copyright (c) 2008 Casey Link <unnamedrambler@gmail.com>                             *
0003  *                                                                                      *
0004  * This program is free software; you can redistribute it and/or modify it under        *
0005  * the terms of the GNU General Public License as published by the Free Software        *
0006  * Foundation; either version 2 of the License, or (at your option) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 #ifndef MP3TUNESHARMONYDOWNLOAD_H
0018 #define MP3TUNESHARMONYDOWNLOAD_H
0019 
0020 #include <QString>
0021 #include <QVariantMap>
0022 extern "C" {
0023    // Get libmp3tunes declarations
0024     #include "../libmp3tunes/harmony.h"
0025 }
0026 
0027 /**
0028  * A wrapper class for the libmp3tunes harmony download object.
0029  * It contains metadata for new tracks.
0030  * @author Casey Link <unnamedrambler@gmail.com>
0031  */
0032 class Mp3tunesHarmonyDownload {
0033     public:
0034         /**
0035          * Default constructor does nothing.
0036          */
0037         Mp3tunesHarmonyDownload();
0038         explicit Mp3tunesHarmonyDownload( const QVariantMap &map );
0039         explicit Mp3tunesHarmonyDownload( mp3tunes_harmony_download_t *download );
0040         ~Mp3tunesHarmonyDownload();
0041 
0042         QString fileKey() const;
0043         QString fileName() const;
0044         QString fileFormat() const;
0045         unsigned int fileSize() const;
0046         QString artistName() const;
0047         QString albumTitle() const;
0048         QString trackTitle() const;
0049         int trackNumber() const;
0050         QString deviceBitrate() const;
0051         QString fileBitrate() const;
0052         QString url() const;
0053     QVariantMap serialize() const;
0054 
0055     private:
0056         QString m_fileKey;
0057         QString m_fileName;
0058         QString m_fileFormat;
0059         unsigned int m_fileSize;
0060         QString m_artistName;
0061         QString m_albumTitle;
0062         QString m_trackTitle;
0063         int m_trackNumber;
0064         QString m_deviceBitrate;
0065         QString m_fileBitrate;
0066         QString m_url;
0067 };
0068 
0069 #endif
0070