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