47
|
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: Playback Data provider for playback view.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MPPLAYBACKDATA_H
|
|
19 |
#define MPPLAYBACKDATA_H
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <QString>
|
|
23 |
#include <QPixmap>
|
|
24 |
|
|
25 |
#include <hbicon.h>
|
|
26 |
|
59
|
27 |
//forward declarations
|
47
|
28 |
|
|
29 |
class MpPlaybackData : public QObject
|
|
30 |
{
|
|
31 |
Q_OBJECT
|
|
32 |
|
|
33 |
public:
|
|
34 |
|
|
35 |
enum SimplifiedState {
|
|
36 |
NotPlaying,
|
|
37 |
Playing,
|
|
38 |
Paused,
|
|
39 |
Stopped
|
|
40 |
};
|
|
41 |
|
|
42 |
explicit MpPlaybackData( QObject *parent=0 );
|
|
43 |
virtual ~MpPlaybackData();
|
|
44 |
|
|
45 |
int duration() const;
|
|
46 |
int position() const;
|
|
47 |
|
|
48 |
const QString& title() const;
|
|
49 |
const QString& artist() const;
|
|
50 |
const QString& album() const;
|
|
51 |
const QString& uri() const;
|
|
52 |
void albumArt( HbIcon& icon ) const;
|
|
53 |
int albumId();
|
|
54 |
bool setId( int id );
|
|
55 |
int id();
|
|
56 |
bool realAudio();
|
|
57 |
MpPlaybackData::SimplifiedState playbackState() const;
|
|
58 |
|
|
59 |
void commitPlaybackInfo();
|
|
60 |
void resetData();
|
|
61 |
|
|
62 |
signals:
|
|
63 |
|
|
64 |
void durationChanged();
|
|
65 |
void positionChanged();
|
|
66 |
void albumArtReady();
|
|
67 |
void playbackStateChanged();
|
|
68 |
void playbackInfoChanged();
|
59
|
69 |
void collectionPlaylistOpened();
|
|
70 |
|
47
|
71 |
|
|
72 |
public:
|
|
73 |
|
|
74 |
int mReqId;
|
|
75 |
|
|
76 |
int mDuration;
|
|
77 |
int mPosition;
|
|
78 |
QString mTitle;
|
|
79 |
QString mAlbum;
|
|
80 |
QString mArtist;
|
|
81 |
QString mUri;
|
|
82 |
int mAlbumId;
|
|
83 |
int mId;
|
|
84 |
HbIcon mAlbumArt;
|
|
85 |
SimplifiedState mPlaybackState;
|
|
86 |
bool mRealAudio;
|
|
87 |
};
|
|
88 |
|
|
89 |
#endif // MPPLAYBACKDATA_H
|