35
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Metadata of song for details view.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MPSONGDATA_H
|
|
19 |
#define MPSONGDATA_H
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <QString>
|
|
23 |
#include <QPixmap>
|
|
24 |
|
43
|
25 |
class MpSongDataPrivate;
|
|
26 |
class CMPXMedia;
|
|
27 |
class HbIcon;
|
35
|
28 |
class ThumbnailManager;
|
|
29 |
|
|
30 |
#if defined(BUILD_MPDATA_LIB)
|
|
31 |
#define MPDATA_EXPORT Q_DECL_EXPORT
|
|
32 |
#else
|
|
33 |
#define MPDATA_EXPORT Q_DECL_IMPORT
|
|
34 |
#endif
|
|
35 |
|
|
36 |
//class declaration
|
|
37 |
class MPDATA_EXPORT MpSongData : public QObject
|
|
38 |
{
|
|
39 |
Q_OBJECT
|
|
40 |
|
43
|
41 |
friend class MpSongDataPrivate;
|
|
42 |
|
35
|
43 |
public:
|
|
44 |
explicit MpSongData( QObject *parent=0 );
|
|
45 |
virtual ~MpSongData();
|
|
46 |
|
|
47 |
QString title() const;
|
|
48 |
QString album() const;
|
|
49 |
QString artist() const;
|
|
50 |
QString comment() const;
|
|
51 |
void albumArt( HbIcon& icon ) const;
|
|
52 |
QString year() const;
|
|
53 |
QString genre() const;
|
|
54 |
QString composer() const;
|
|
55 |
QString albumTrack() const;
|
|
56 |
QString link() const;
|
|
57 |
QString fileName() const;
|
|
58 |
QString mimeType() const;
|
|
59 |
QString duration() const;
|
|
60 |
QString bitRate() const;
|
|
61 |
QString sampleRate() const;
|
|
62 |
QString size() const;
|
|
63 |
QString modified() const;
|
|
64 |
QString copyright() const;
|
|
65 |
QString musicURL() const;
|
|
66 |
bool isDrmProtected() const;
|
43
|
67 |
|
35
|
68 |
QString albumArtBase64() const;
|
43
|
69 |
void removeAlbumArtFile() const; //TODO: Remove when base64 starts to work
|
|
70 |
|
|
71 |
void setLink( const QString &link );
|
|
72 |
void setMpxMedia( const CMPXMedia& aMedia );
|
35
|
73 |
|
|
74 |
signals:
|
43
|
75 |
|
35
|
76 |
void albumArtReady();
|
|
77 |
void playbackInfoChanged();
|
43
|
78 |
void songDetailInfoChanged();
|
|
79 |
|
|
80 |
public slots:
|
|
81 |
|
|
82 |
int reservedLength() const;
|
|
83 |
void thumbnailReady( QPixmap pixmap, void *data, int id, int error );
|
35
|
84 |
|
|
85 |
private:
|
43
|
86 |
|
35
|
87 |
Q_DISABLE_COPY(MpSongData)
|
43
|
88 |
MpSongDataPrivate *d_ptr;
|
|
89 |
ThumbnailManager *mThumbnailManager; // Owned
|
|
90 |
|
35
|
91 |
};
|
|
92 |
|
|
93 |
#endif // MPSONGDATA_H
|
43
|
94 |
|